From 4aa1af72a305cd2a87e1b375cb2220f2fea1501c Mon Sep 17 00:00:00 2001 From: Helen Ye Date: Tue, 17 Dec 2024 01:26:31 -0500 Subject: [PATCH] Add all params --- lib/stripe/resources/account.rb | 5145 ++++++- lib/stripe/resources/account_link.rb | 47 + lib/stripe/resources/account_notice.rb | 84 +- lib/stripe/resources/account_session.rb | 858 +- lib/stripe/resources/apple_pay_domain.rb | 62 +- lib/stripe/resources/application_fee.rb | 71 +- lib/stripe/resources/apps/secret.rb | 133 +- lib/stripe/resources/balance.rb | 97 +- lib/stripe/resources/balance_transaction.rb | 87 +- lib/stripe/resources/bank_account.rb | 34 +- lib/stripe/resources/billing/alert.rb | 139 +- .../billing/credit_balance_summary.rb | 65 +- .../billing/credit_balance_transaction.rb | 90 +- lib/stripe/resources/billing/credit_grant.rb | 177 +- lib/stripe/resources/billing/meter.rb | 151 +- .../resources/billing/meter_error_report.rb | 23 +- lib/stripe/resources/billing/meter_event.rb | 21 + .../billing/meter_event_adjustment.rb | 29 + .../resources/billing_portal/configuration.rb | 540 +- .../resources/billing_portal/session.rb | 236 +- lib/stripe/resources/capability.rb | 58 +- .../resources/capital/financing_offer.rb | 106 +- .../resources/capital/financing_summary.rb | 37 +- .../capital/financing_transaction.rb | 77 +- lib/stripe/resources/card.rb | 3 +- lib/stripe/resources/cash_balance.rb | 5 +- lib/stripe/resources/charge.rb | 2753 +++- lib/stripe/resources/checkout/session.rb | 3395 +++- lib/stripe/resources/climate/order.rb | 136 +- lib/stripe/resources/climate/product.rb | 40 +- lib/stripe/resources/climate/supplier.rb | 44 +- lib/stripe/resources/confirmation_token.rb | 1337 +- lib/stripe/resources/country_spec.rb | 48 +- lib/stripe/resources/coupon.rb | 166 +- lib/stripe/resources/credit_note.rb | 605 +- lib/stripe/resources/credit_note_line_item.rb | 25 +- lib/stripe/resources/customer.rb | 798 +- .../customer_cash_balance_transaction.rb | 49 +- lib/stripe/resources/customer_session.rb | 137 +- lib/stripe/resources/dispute.rb | 566 +- .../entitlements/active_entitlement.rb | 41 +- lib/stripe/resources/entitlements/feature.rb | 83 +- lib/stripe/resources/ephemeral_key.rb | 9 + lib/stripe/resources/event.rb | 103 +- lib/stripe/resources/exchange_rate.rb | 32 +- lib/stripe/resources/file.rb | 97 +- lib/stripe/resources/file_link.rb | 102 +- .../financial_connections/account.rb | 197 +- .../financial_connections/institution.rb | 46 +- .../financial_connections/session.rb | 120 +- .../financial_connections/transaction.rb | 83 +- lib/stripe/resources/forwarding/request.rb | 145 +- lib/stripe/resources/funding_instructions.rb | 266 +- lib/stripe/resources/gift_cards/card.rb | 138 +- .../resources/gift_cards/transaction.rb | 167 +- .../resources/identity/verification_report.rb | 215 +- .../identity/verification_session.rb | 316 +- lib/stripe/resources/invoice.rb | 8118 +++++++++- lib/stripe/resources/invoice_item.rb | 412 +- lib/stripe/resources/invoice_line_item.rb | 271 +- lib/stripe/resources/invoice_payment.rb | 14 +- .../resources/invoice_rendering_template.rb | 58 +- lib/stripe/resources/issuing/authorization.rb | 1071 +- lib/stripe/resources/issuing/card.rb | 626 +- lib/stripe/resources/issuing/cardholder.rb | 629 +- .../issuing/credit_underwriting_record.rb | 512 +- lib/stripe/resources/issuing/dispute.rb | 774 +- .../issuing/dispute_settlement_detail.rb | 41 +- .../issuing/fraud_liability_debit.rb | 59 +- .../issuing/personalization_design.rb | 270 +- .../resources/issuing/physical_bundle.rb | 53 +- lib/stripe/resources/issuing/token.rb | 149 +- lib/stripe/resources/issuing/transaction.rb | 886 +- lib/stripe/resources/line_item.rb | 33 +- lib/stripe/resources/mandate.rb | 110 +- lib/stripe/resources/margin.rb | 76 +- lib/stripe/resources/order.rb | 2700 +++- .../resources/payment_attempt_record.rb | 112 +- lib/stripe/resources/payment_intent.rb | 12819 +++++++++++++++- lib/stripe/resources/payment_link.rb | 1472 +- lib/stripe/resources/payment_method.rb | 1388 +- .../resources/payment_method_configuration.rb | 2794 +++- lib/stripe/resources/payment_method_domain.rb | 115 +- lib/stripe/resources/payment_record.rb | 573 +- lib/stripe/resources/payout.rb | 176 +- lib/stripe/resources/person.rb | 167 +- lib/stripe/resources/plan.rb | 281 +- lib/stripe/resources/price.rb | 611 +- lib/stripe/resources/product.rb | 507 +- lib/stripe/resources/promotion_code.rb | 201 +- lib/stripe/resources/quote.rb | 2812 +++- lib/stripe/resources/quote_line.rb | 178 +- lib/stripe/resources/quote_preview_invoice.rb | 348 +- .../quote_preview_subscription_schedule.rb | 248 +- .../resources/radar/early_fraud_warning.rb | 67 +- lib/stripe/resources/radar/value_list.rb | 111 +- lib/stripe/resources/radar/value_list_item.rb | 86 +- lib/stripe/resources/refund.rb | 312 +- lib/stripe/resources/reporting/report_run.rb | 132 +- lib/stripe/resources/reporting/report_type.rb | 23 +- lib/stripe/resources/review.rb | 84 +- lib/stripe/resources/setup_attempt.rb | 300 +- lib/stripe/resources/setup_intent.rb | 3862 ++++- lib/stripe/resources/shipping_rate.rb | 243 +- .../resources/sigma/scheduled_query_run.rb | 34 +- lib/stripe/resources/source.rb | 1120 +- .../resources/source_mandate_notification.rb | 9 +- lib/stripe/resources/source_transaction.rb | 47 +- lib/stripe/resources/subscription.rb | 1987 ++- lib/stripe/resources/subscription_item.rb | 411 +- lib/stripe/resources/subscription_schedule.rb | 2402 ++- lib/stripe/resources/tax/association.rb | 40 +- lib/stripe/resources/tax/calculation.rb | 347 +- .../resources/tax/calculation_line_item.rb | 29 +- lib/stripe/resources/tax/form.rb | 120 +- lib/stripe/resources/tax/registration.rb | 1751 ++- lib/stripe/resources/tax/settings.rb | 104 +- lib/stripe/resources/tax/transaction.rb | 221 +- .../resources/tax/transaction_line_item.rb | 1 + lib/stripe/resources/tax_code.rb | 32 +- lib/stripe/resources/tax_id.rb | 104 +- lib/stripe/resources/tax_rate.rb | 169 +- .../resources/terminal/configuration.rb | 988 +- .../resources/terminal/connection_token.rb | 12 + lib/stripe/resources/terminal/location.rb | 167 +- lib/stripe/resources/terminal/reader.rb | 670 +- .../terminal/reader_collected_data.rb | 11 + .../resources/test_helpers/test_clock.rb | 67 +- lib/stripe/resources/token.rb | 1157 ++ lib/stripe/resources/topup.rb | 152 +- lib/stripe/resources/transfer.rb | 127 +- .../resources/treasury/credit_reversal.rb | 67 +- .../resources/treasury/debit_reversal.rb | 72 +- .../resources/treasury/financial_account.rb | 700 +- .../treasury/financial_account_features.rb | 140 +- .../resources/treasury/inbound_transfer.rb | 191 +- .../resources/treasury/outbound_payment.rb | 454 +- .../resources/treasury/outbound_transfer.rb | 318 +- .../resources/treasury/received_credit.rb | 237 +- .../resources/treasury/received_debit.rb | 204 +- lib/stripe/resources/treasury/transaction.rb | 149 +- .../resources/treasury/transaction_entry.rb | 135 +- lib/stripe/resources/usage_record_summary.rb | 5 +- .../v2/billing/meter_event_adjustment.rb | 1 + lib/stripe/resources/v2/event.rb | 10 +- lib/stripe/resources/v2/event_destination.rb | 14 +- lib/stripe/resources/webhook_endpoint.rb | 108 +- .../services/account_capability_service.rb | 35 + .../account_external_account_service.rb | 259 + lib/stripe/services/account_link_service.rb | 48 + .../services/account_login_link_service.rb | 10 + lib/stripe/services/account_notice_service.rb | 66 + lib/stripe/services/account_person_service.rb | 910 ++ lib/stripe/services/account_service.rb | 4595 ++++++ .../services/account_session_service.rb | 704 + .../services/apple_pay_domain_service.rb | 54 + .../application_fee_refund_service.rb | 58 + .../services/application_fee_service.rb | 60 + lib/stripe/services/apps/secret_service.rb | 124 + lib/stripe/services/balance_service.rb | 10 + .../services/balance_transaction_service.rb | 72 + lib/stripe/services/billing/alert_service.rb | 121 + .../billing/credit_balance_summary_service.rb | 40 + .../credit_balance_transaction_service.rb | 42 + .../services/billing/credit_grant_service.rb | 161 + .../billing/meter_event_adjustment_service.rb | 28 + .../services/billing/meter_event_service.rb | 22 + .../billing/meter_event_summary_service.rb | 40 + lib/stripe/services/billing/meter_service.rb | 139 + .../billing_portal/configuration_service.rb | 472 + .../billing_portal/session_service.rb | 185 + .../capital/financing_offer_service.rb | 74 + .../capital/financing_summary_service.rb | 10 + .../capital/financing_transaction_service.rb | 50 + lib/stripe/services/charge_service.rb | 1808 +++ .../checkout/session_line_item_service.rb | 19 + .../services/checkout/session_service.rb | 2585 ++++ lib/stripe/services/climate/order_service.rb | 109 + .../services/climate/product_service.rb | 29 + .../services/climate/supplier_service.rb | 29 + .../services/confirmation_token_service.rb | 10 + lib/stripe/services/country_spec_service.rb | 29 + lib/stripe/services/coupon_service.rb | 160 + .../services/credit_note_line_item_service.rb | 19 + .../credit_note_preview_lines_service.rb | 161 + lib/stripe/services/credit_note_service.rb | 388 + .../customer_balance_transaction_service.rb | 67 + .../services/customer_cash_balance_service.rb | 32 + ...stomer_cash_balance_transaction_service.rb | 29 + .../customer_funding_instructions_service.rb | 45 + .../customer_payment_method_service.rb | 42 + .../customer_payment_source_service.rb | 187 + lib/stripe/services/customer_service.rb | 618 + .../services/customer_session_service.rb | 102 + .../services/customer_tax_id_service.rb | 48 + lib/stripe/services/dispute_service.rb | 387 + .../active_entitlement_service.rb | 38 + .../services/entitlements/feature_service.rb | 80 + lib/stripe/services/ephemeral_key_service.rb | 38 + lib/stripe/services/event_service.rb | 68 + lib/stripe/services/exchange_rate_service.rb | 29 + lib/stripe/services/file_link_service.rb | 99 + lib/stripe/services/file_service.rb | 94 + .../account_inferred_balance_service.rb | 19 + .../account_owner_service.rb | 28 + .../financial_connections/account_service.rb | 103 + .../institution_service.rb | 29 + .../financial_connections/session_service.rb | 103 + .../transaction_service.rb | 74 + .../services/forwarding/request_service.rb | 112 + .../services/gift_cards/card_service.rb | 114 + .../gift_cards/transaction_service.rb | 143 + .../identity/verification_report_service.rb | 68 + .../identity/verification_session_service.rb | 244 + lib/stripe/services/invoice_item_service.rb | 403 + .../services/invoice_line_item_service.rb | 247 + .../services/invoice_payment_service.rb | 29 + .../invoice_rendering_template_service.rb | 55 + lib/stripe/services/invoice_service.rb | 5813 +++++++ .../invoice_upcoming_lines_service.rb | 1960 +++ .../services/issuing/authorization_service.rb | 110 + lib/stripe/services/issuing/card_service.rb | 474 + .../services/issuing/cardholder_service.rb | 553 + .../credit_underwriting_record_service.rb | 456 + .../services/issuing/dispute_service.rb | 658 + .../dispute_settlement_detail_service.rb | 38 + .../issuing/fraud_liability_debit_service.rb | 56 + .../issuing/personalization_design_service.rb | 202 + .../issuing/physical_bundle_service.rb | 42 + lib/stripe/services/issuing/token_service.rb | 77 + .../services/issuing/transaction_service.rb | 85 + lib/stripe/services/mandate_service.rb | 10 + lib/stripe/services/margin_service.rb | 73 + .../services/order_line_item_service.rb | 19 + lib/stripe/services/order_service.rb | 2275 +++ .../payment_attempt_record_service.rb | 23 + lib/stripe/services/payment_intent_service.rb | 11312 ++++++++++++++ .../payment_link_line_item_service.rb | 19 + lib/stripe/services/payment_link_service.rb | 1283 ++ .../payment_method_configuration_service.rb | 2238 +++ .../services/payment_method_domain_service.rb | 81 + lib/stripe/services/payment_method_service.rb | 900 ++ lib/stripe/services/payment_record_service.rb | 488 + lib/stripe/services/payout_service.rb | 167 + lib/stripe/services/plan_service.rb | 261 + lib/stripe/services/price_service.rb | 535 + .../services/product_feature_service.rb | 45 + lib/stripe/services/product_service.rb | 478 + lib/stripe/services/promotion_code_service.rb | 187 + ...ote_computed_upfront_line_items_service.rb | 19 + .../services/quote_line_item_service.rb | 19 + lib/stripe/services/quote_line_service.rb | 19 + .../services/quote_preview_invoice_service.rb | 19 + ...e_preview_subscription_schedule_service.rb | 19 + lib/stripe/services/quote_service.rb | 2401 +++ .../radar/early_fraud_warning_service.rb | 64 + .../services/radar/value_list_item_service.rb | 83 + .../services/radar/value_list_service.rb | 108 + lib/stripe/services/refund_service.rb | 143 + .../services/reporting/report_run_service.rb | 111 + .../services/reporting/report_type_service.rb | 20 + lib/stripe/services/review_service.rb | 60 + lib/stripe/services/setup_attempt_service.rb | 53 + lib/stripe/services/setup_intent_service.rb | 3624 +++++ lib/stripe/services/shipping_rate_service.rb | 212 + .../sigma/scheduled_query_run_service.rb | 29 + lib/stripe/services/source_service.rb | 628 + .../services/source_transaction_service.rb | 19 + .../services/subscription_item_service.rb | 401 + .../subscription_item_usage_record_service.rb | 19 + ...ption_item_usage_record_summary_service.rb | 19 + .../services/subscription_schedule_service.rb | 2157 +++ lib/stripe/services/subscription_service.rb | 1814 +++ .../services/tax/association_service.rb | 13 + .../tax/calculation_line_item_service.rb | 19 + .../services/tax/calculation_service.rb | 214 + lib/stripe/services/tax/form_service.rb | 67 + .../services/tax/registration_service.rb | 1393 ++ lib/stripe/services/tax/settings_service.rb | 79 + .../tax/transaction_line_item_service.rb | 19 + .../services/tax/transaction_service.rb | 116 + lib/stripe/services/tax_code_service.rb | 29 + lib/stripe/services/tax_id_service.rb | 84 + lib/stripe/services/tax_rate_service.rb | 160 + .../terminal/configuration_service.rb | 839 + .../terminal/connection_token_service.rb | 13 + .../services/terminal/location_service.rb | 150 + .../terminal/reader_collected_data_service.rb | 10 + .../services/terminal/reader_service.rb | 435 + .../confirmation_token_service.rb | 698 + .../services/test_helpers/customer_service.rb | 19 + .../issuing/authorization_service.rb | 784 + .../test_helpers/issuing/card_service.rb | 50 + .../issuing/personalization_design_service.rb | 45 + .../issuing/transaction_service.rb | 661 + .../services/test_helpers/refund_service.rb | 10 + .../test_helpers/terminal/reader_service.rb | 47 + .../test_helpers/test_clock_service.rb | 61 + .../treasury/inbound_transfer_service.rb | 42 + .../treasury/outbound_payment_service.rb | 95 + .../treasury/outbound_transfer_service.rb | 95 + .../treasury/received_credit_service.rb | 89 + .../treasury/received_debit_service.rb | 89 + lib/stripe/services/token_service.rb | 1158 ++ lib/stripe/services/topup_service.rb | 149 + .../services/transfer_reversal_service.rb | 70 + lib/stripe/services/transfer_service.rb | 124 + .../treasury/credit_reversal_service.rb | 62 + .../treasury/debit_reversal_service.rb | 66 + .../financial_account_features_service.rb | 184 + .../treasury/financial_account_service.rb | 480 + .../treasury/inbound_transfer_service.rb | 92 + .../treasury/outbound_payment_service.rb | 270 + .../treasury/outbound_transfer_service.rb | 140 + .../treasury/received_credit_service.rb | 55 + .../treasury/received_debit_service.rb | 42 + .../treasury/transaction_entry_service.rb | 91 + .../services/treasury/transaction_service.rb | 100 + .../billing/meter_event_adjustment_service.rb | 25 + .../v2/billing/meter_event_service.rb | 26 + .../v2/billing/meter_event_session_service.rb | 3 + .../v2/billing/meter_event_stream_service.rb | 35 + .../v2/core/event_destination_service.rb | 153 + lib/stripe/services/v2/core/event_service.rb | 19 + .../services/webhook_endpoint_service.rb | 100 + lib/stripe/stripe_client.rb | 2 +- rbi/stripe/resources/account.rbi | 4456 +++++- rbi/stripe/resources/account_link.rbi | 58 +- rbi/stripe/resources/account_notice.rbi | 102 +- rbi/stripe/resources/account_session.rbi | 799 +- rbi/stripe/resources/apple_pay_domain.rbi | 82 +- rbi/stripe/resources/application.rbi | 8 +- rbi/stripe/resources/application_fee.rbi | 92 +- .../resources/application_fee_refund.rbi | 16 +- rbi/stripe/resources/apps/secret.rbi | 161 +- rbi/stripe/resources/balance.rbi | 59 +- rbi/stripe/resources/balance_transaction.rbi | 108 +- rbi/stripe/resources/bank_account.rbi | 54 +- rbi/stripe/resources/billing/alert.rbi | 172 +- .../resources/billing/alert_triggered.rbi | 12 +- .../billing/credit_balance_summary.rbi | 57 +- .../billing/credit_balance_transaction.rbi | 81 +- rbi/stripe/resources/billing/credit_grant.rbi | 221 +- rbi/stripe/resources/billing/meter.rbi | 189 +- .../resources/billing/meter_error_report.rbi | 24 +- rbi/stripe/resources/billing/meter_event.rbi | 46 +- .../billing/meter_event_adjustment.rbi | 43 +- .../resources/billing/meter_event_summary.rbi | 14 +- .../billing_portal/configuration.rbi | 534 +- .../resources/billing_portal/session.rbi | 236 +- rbi/stripe/resources/capability.rbi | 42 +- .../resources/capital/financing_offer.rbi | 131 +- .../resources/capital/financing_summary.rbi | 28 +- .../capital/financing_transaction.rbi | 83 +- rbi/stripe/resources/card.rbi | 71 +- rbi/stripe/resources/cash_balance.rbi | 12 +- rbi/stripe/resources/charge.rbi | 2344 ++- rbi/stripe/resources/checkout/session.rbi | 3151 +++- rbi/stripe/resources/climate/order.rbi | 188 +- rbi/stripe/resources/climate/product.rbi | 51 +- rbi/stripe/resources/climate/supplier.rbi | 49 +- rbi/stripe/resources/confirmation_token.rbi | 1002 +- .../resources/connect_collection_transfer.rbi | 12 +- rbi/stripe/resources/country_spec.rbi | 52 +- rbi/stripe/resources/coupon.rbi | 220 +- rbi/stripe/resources/credit_note.rbi | 658 +- .../resources/credit_note_line_item.rbi | 45 +- rbi/stripe/resources/customer.rbi | 878 +- .../customer_balance_transaction.rbi | 26 +- .../customer_cash_balance_transaction.rbi | 54 +- rbi/stripe/resources/customer_session.rbi | 137 +- rbi/stripe/resources/discount.rbi | 26 +- rbi/stripe/resources/dispute.rbi | 533 +- .../entitlements/active_entitlement.rbi | 49 +- .../active_entitlement_summary.rbi | 8 +- rbi/stripe/resources/entitlements/feature.rbi | 105 +- rbi/stripe/resources/ephemeral_key.rbi | 30 +- rbi/stripe/resources/event.rbi | 103 +- rbi/stripe/resources/exchange_rate.rbi | 36 +- rbi/stripe/resources/file.rbi | 122 +- rbi/stripe/resources/file_link.rbi | 126 +- .../financial_connections/account.rbi | 252 +- .../account_inferred_balance.rbi | 8 +- .../financial_connections/account_owner.rbi | 16 +- .../account_ownership.rbi | 8 +- .../financial_connections/institution.rbi | 54 +- .../financial_connections/session.rbi | 132 +- .../financial_connections/transaction.rbi | 98 +- rbi/stripe/resources/forwarding/request.rbi | 148 +- rbi/stripe/resources/funding_instructions.rbi | 133 +- rbi/stripe/resources/gift_cards/card.rbi | 157 +- .../resources/gift_cards/transaction.rbi | 203 +- .../identity/verification_report.rbi | 158 +- .../identity/verification_session.rbi | 394 +- rbi/stripe/resources/invoice.rbi | 8426 +++++++++- rbi/stripe/resources/invoice_item.rbi | 464 +- rbi/stripe/resources/invoice_line_item.rbi | 309 +- rbi/stripe/resources/invoice_payment.rbi | 32 +- .../resources/invoice_rendering_template.rbi | 96 +- .../resources/issuing/authorization.rbi | 1030 +- rbi/stripe/resources/issuing/card.rbi | 591 +- rbi/stripe/resources/issuing/cardholder.rbi | 610 +- .../issuing/credit_underwriting_record.rbi | 536 +- rbi/stripe/resources/issuing/dispute.rbi | 752 +- .../issuing/dispute_settlement_detail.rbi | 61 +- .../issuing/fraud_liability_debit.rbi | 71 +- .../issuing/personalization_design.rbi | 287 +- .../resources/issuing/physical_bundle.rbi | 60 +- rbi/stripe/resources/issuing/settlement.rbi | 34 +- rbi/stripe/resources/issuing/token.rbi | 134 +- rbi/stripe/resources/issuing/transaction.rbi | 863 +- rbi/stripe/resources/line_item.rbi | 49 +- rbi/stripe/resources/login_link.rbi | 6 +- rbi/stripe/resources/mandate.rbi | 76 +- rbi/stripe/resources/margin.rbi | 108 +- rbi/stripe/resources/order.rbi | 2616 +++- .../resources/payment_attempt_record.rbi | 91 +- rbi/stripe/resources/payment_intent.rbi | 12346 ++++++++++++++- rbi/stripe/resources/payment_link.rbi | 1377 +- rbi/stripe/resources/payment_method.rbi | 1246 +- .../payment_method_configuration.rbi | 2451 ++- .../resources/payment_method_domain.rbi | 144 +- rbi/stripe/resources/payment_record.rbi | 598 +- rbi/stripe/resources/payout.rbi | 251 +- rbi/stripe/resources/person.rbi | 140 +- rbi/stripe/resources/plan.rbi | 329 +- rbi/stripe/resources/price.rbi | 612 +- rbi/stripe/resources/product.rbi | 544 +- rbi/stripe/resources/product_feature.rbi | 10 +- rbi/stripe/resources/promotion_code.rbi | 227 +- rbi/stripe/resources/quote.rbi | 2738 +++- rbi/stripe/resources/quote_line.rbi | 107 +- .../resources/quote_preview_invoice.rbi | 347 +- .../quote_preview_subscription_schedule.rbi | 156 +- .../resources/radar/early_fraud_warning.rbi | 79 +- rbi/stripe/resources/radar/value_list.rbi | 151 +- .../resources/radar/value_list_item.rbi | 113 +- rbi/stripe/resources/refund.rbi | 291 +- rbi/stripe/resources/reporting/report_run.rbi | 143 +- .../resources/reporting/report_type.rbi | 37 +- rbi/stripe/resources/reserve_transaction.rbi | 10 +- rbi/stripe/resources/reversal.rbi | 20 +- rbi/stripe/resources/review.rbi | 111 +- rbi/stripe/resources/setup_attempt.rbi | 223 +- rbi/stripe/resources/setup_intent.rbi | 3732 ++++- rbi/stripe/resources/shipping_rate.rbi | 256 +- .../resources/sigma/scheduled_query_run.rbi | 53 +- rbi/stripe/resources/source.rbi | 942 +- .../resources/source_mandate_notification.rbi | 29 +- rbi/stripe/resources/source_transaction.rbi | 49 +- rbi/stripe/resources/subscription.rbi | 2024 ++- rbi/stripe/resources/subscription_item.rbi | 433 +- .../resources/subscription_schedule.rbi | 2341 ++- rbi/stripe/resources/tax/association.rbi | 39 +- rbi/stripe/resources/tax/calculation.rbi | 323 +- .../resources/tax/calculation_line_item.rbi | 35 +- rbi/stripe/resources/tax/form.rbi | 129 +- rbi/stripe/resources/tax/registration.rbi | 1429 +- rbi/stripe/resources/tax/settings.rbi | 94 +- rbi/stripe/resources/tax/transaction.rbi | 227 +- .../resources/tax/transaction_line_item.rbi | 27 +- rbi/stripe/resources/tax_code.rbi | 38 +- .../resources/tax_deducted_at_source.rbi | 10 +- rbi/stripe/resources/tax_id.rbi | 133 +- rbi/stripe/resources/tax_rate.rbi | 207 +- .../resources/terminal/configuration.rbi | 894 +- .../resources/terminal/connection_token.rbi | 21 +- rbi/stripe/resources/terminal/location.rbi | 196 +- rbi/stripe/resources/terminal/reader.rbi | 702 +- .../terminal/reader_collected_data.rbi | 20 +- .../resources/test_helpers/test_clock.rbi | 108 +- rbi/stripe/resources/token.rbi | 1124 +- rbi/stripe/resources/topup.rbi | 196 +- rbi/stripe/resources/transfer.rbi | 169 +- .../resources/treasury/credit_reversal.rbi | 97 +- .../resources/treasury/debit_reversal.rbi | 104 +- .../resources/treasury/financial_account.rbi | 730 +- .../treasury/financial_account_features.rbi | 77 +- .../resources/treasury/inbound_transfer.rbi | 205 +- .../resources/treasury/outbound_payment.rbi | 454 +- .../resources/treasury/outbound_transfer.rbi | 316 +- .../resources/treasury/received_credit.rbi | 223 +- .../resources/treasury/received_debit.rbi | 197 +- rbi/stripe/resources/treasury/transaction.rbi | 156 +- .../resources/treasury/transaction_entry.rbi | 141 +- rbi/stripe/resources/usage_record.rbi | 12 +- rbi/stripe/resources/usage_record_summary.rbi | 16 +- .../resources/v2/billing/meter_event.rbi | 14 +- .../v2/billing/meter_event_adjustment.rbi | 17 +- .../v2/billing/meter_event_session.rbi | 12 +- rbi/stripe/resources/v2/event.rbi | 18 +- rbi/stripe/resources/v2/event_destination.rbi | 41 +- rbi/stripe/resources/webhook_endpoint.rbi | 149 +- .../services/account_capability_service.rbi | 51 + .../account_external_account_service.rbi | 306 + rbi/stripe/services/account_link_service.rbi | 58 + .../services/account_login_link_service.rbi | 22 + .../services/account_notice_service.rbi | 90 + .../services/account_person_service.rbi | 903 ++ rbi/stripe/services/account_service.rbi | 4177 +++++ .../services/account_session_service.rbi | 757 + .../services/apple_pay_domain_service.rbi | 78 + .../application_fee_refund_service.rbi | 91 + .../services/application_fee_service.rbi | 74 + rbi/stripe/services/apps/secret_service.rbi | 151 + rbi/stripe/services/apps_service.rbi | 9 + rbi/stripe/services/balance_service.rbi | 21 + .../services/balance_transaction_service.rbi | 89 + rbi/stripe/services/billing/alert_service.rbi | 152 + .../credit_balance_summary_service.rbi | 54 + .../credit_balance_transaction_service.rbi | 59 + .../services/billing/credit_grant_service.rbi | 191 + .../meter_event_adjustment_service.rbi | 40 + .../services/billing/meter_event_service.rbi | 42 + .../billing/meter_event_summary_service.rbi | 54 + rbi/stripe/services/billing/meter_service.rbi | 163 + .../billing_portal/configuration_service.rbi | 497 + .../billing_portal/session_service.rbi | 202 + .../services/billing_portal_service.rbi | 10 + rbi/stripe/services/billing_service.rbi | 15 + .../capital/financing_offer_service.rbi | 95 + .../capital/financing_summary_service.rbi | 22 + .../capital/financing_transaction_service.rbi | 68 + rbi/stripe/services/capital_service.rbi | 11 + rbi/stripe/services/charge_service.rbi | 1816 +++ .../checkout/session_line_item_service.rbi | 33 + .../services/checkout/session_service.rbi | 2580 ++++ rbi/stripe/services/checkout_service.rbi | 9 + rbi/stripe/services/climate/order_service.rbi | 140 + .../services/climate/product_service.rbi | 46 + .../services/climate/supplier_service.rbi | 46 + rbi/stripe/services/climate_service.rbi | 11 + .../services/confirmation_token_service.rbi | 20 + rbi/stripe/services/country_spec_service.rbi | 44 + rbi/stripe/services/coupon_service.rbi | 190 + .../credit_note_line_item_service.rbi | 31 + .../credit_note_preview_lines_service.rbi | 167 + rbi/stripe/services/credit_note_service.rbi | 420 + .../customer_balance_transaction_service.rbi | 92 + .../customer_cash_balance_service.rbi | 45 + ...tomer_cash_balance_transaction_service.rbi | 44 + .../customer_funding_instructions_service.rbi | 59 + .../customer_payment_method_service.rbi | 57 + .../customer_payment_source_service.rbi | 228 + rbi/stripe/services/customer_service.rbi | 647 + .../services/customer_session_service.rbi | 110 + .../services/customer_tax_id_service.rbi | 72 + rbi/stripe/services/dispute_service.rbi | 422 + .../active_entitlement_service.rbi | 55 + .../services/entitlements/feature_service.rbi | 107 + rbi/stripe/services/entitlements_service.rbi | 10 + rbi/stripe/services/ephemeral_key_service.rbi | 53 + rbi/stripe/services/event_service.rbi | 81 + rbi/stripe/services/exchange_rate_service.rbi | 44 + rbi/stripe/services/file_link_service.rbi | 122 + rbi/stripe/services/file_service.rbi | 114 + .../account_inferred_balance_service.rbi | 33 + .../account_owner_service.rbi | 42 + .../financial_connections/account_service.rbi | 132 + .../institution_service.rbi | 46 + .../financial_connections/session_service.rbi | 111 + .../transaction_service.rbi | 90 + .../financial_connections_service.rbi | 12 + .../services/forwarding/request_service.rbi | 132 + rbi/stripe/services/forwarding_service.rbi | 9 + .../services/gift_cards/card_service.rbi | 142 + .../gift_cards/transaction_service.rbi | 174 + rbi/stripe/services/gift_cards_service.rbi | 10 + .../identity/verification_report_service.rbi | 85 + .../identity/verification_session_service.rbi | 317 + rbi/stripe/services/identity_service.rbi | 10 + rbi/stripe/services/invoice_item_service.rbi | 424 + .../services/invoice_line_item_service.rbi | 270 + .../services/invoice_payment_service.rbi | 44 + .../invoice_rendering_template_service.rbi | 82 + rbi/stripe/services/invoice_service.rbi | 6040 ++++++++ .../invoice_upcoming_lines_service.rbi | 2023 +++ .../issuing/authorization_service.rbi | 140 + rbi/stripe/services/issuing/card_service.rbi | 479 + .../services/issuing/cardholder_service.rbi | 568 + .../credit_underwriting_record_service.rbi | 498 + .../services/issuing/dispute_service.rbi | 701 + .../dispute_settlement_detail_service.rbi | 55 + .../issuing/fraud_liability_debit_service.rbi | 73 + .../personalization_design_service.rbi | 233 + .../issuing/physical_bundle_service.rbi | 59 + rbi/stripe/services/issuing/token_service.rbi | 95 + .../services/issuing/transaction_service.rbi | 103 + rbi/stripe/services/issuing_service.rbi | 19 + rbi/stripe/services/mandate_service.rbi | 20 + rbi/stripe/services/margin_service.rbi | 104 + .../services/order_line_item_service.rbi | 31 + rbi/stripe/services/order_service.rbi | 2306 +++ .../payment_attempt_record_service.rbi | 36 + .../services/payment_intent_service.rbi | 11429 ++++++++++++++ .../payment_link_line_item_service.rbi | 31 + rbi/stripe/services/payment_link_service.rbi | 1237 ++ .../payment_method_configuration_service.rbi | 2171 +++ .../payment_method_domain_service.rbi | 110 + .../services/payment_method_service.rbi | 883 ++ .../services/payment_record_service.rbi | 521 + rbi/stripe/services/payout_service.rbi | 197 + rbi/stripe/services/plan_service.rbi | 286 + rbi/stripe/services/price_service.rbi | 551 + .../services/product_feature_service.rbi | 69 + rbi/stripe/services/product_service.rbi | 503 + .../services/promotion_code_service.rbi | 210 + ...te_computed_upfront_line_items_service.rbi | 31 + .../services/quote_line_item_service.rbi | 31 + rbi/stripe/services/quote_line_service.rbi | 31 + .../quote_preview_invoice_service.rbi | 31 + ..._preview_subscription_schedule_service.rbi | 31 + rbi/stripe/services/quote_service.rbi | 2390 +++ .../radar/early_fraud_warning_service.rbi | 83 + .../radar/value_list_item_service.rbi | 107 + .../services/radar/value_list_service.rbi | 139 + rbi/stripe/services/radar_service.rbi | 11 + rbi/stripe/services/refund_service.rbi | 181 + .../services/reporting/report_run_service.rbi | 131 + .../reporting/report_type_service.rbi | 35 + rbi/stripe/services/reporting_service.rbi | 10 + rbi/stripe/services/review_service.rbi | 82 + rbi/stripe/services/setup_attempt_service.rbi | 63 + rbi/stripe/services/setup_intent_service.rbi | 3609 +++++ rbi/stripe/services/shipping_rate_service.rbi | 235 + .../sigma/scheduled_query_run_service.rbi | 46 + rbi/stripe/services/sigma_service.rbi | 9 + rbi/stripe/services/source_service.rbi | 647 + .../services/source_transaction_service.rbi | 31 + .../services/subscription_item_service.rbi | 422 + ...subscription_item_usage_record_service.rbi | 37 + ...tion_item_usage_record_summary_service.rbi | 33 + .../subscription_schedule_service.rbi | 2208 +++ rbi/stripe/services/subscription_service.rbi | 1870 +++ .../services/tax/association_service.rbi | 25 + .../tax/calculation_line_item_service.rbi | 33 + .../services/tax/calculation_service.rbi | 228 + rbi/stripe/services/tax/form_service.rbi | 85 + .../services/tax/registration_service.rbi | 1286 ++ rbi/stripe/services/tax/settings_service.rbi | 93 + .../tax/transaction_line_item_service.rbi | 33 + .../services/tax/transaction_service.rbi | 142 + rbi/stripe/services/tax_code_service.rbi | 44 + rbi/stripe/services/tax_id_service.rbi | 112 + rbi/stripe/services/tax_rate_service.rbi | 183 + rbi/stripe/services/tax_service.rbi | 14 + .../terminal/configuration_service.rbi | 822 + .../terminal/connection_token_service.rbi | 25 + .../services/terminal/location_service.rbi | 184 + .../reader_collected_data_service.rbi | 22 + .../services/terminal/reader_service.rbi | 513 + rbi/stripe/services/terminal_service.rbi | 13 + .../confirmation_token_service.rbi | 778 + .../test_helpers/customer_service.rbi | 33 + .../issuing/authorization_service.rbi | 836 + .../test_helpers/issuing/card_service.rbi | 76 + .../personalization_design_service.rbi | 67 + .../issuing/transaction_service.rbi | 705 + .../services/test_helpers/issuing_service.rbi | 14 + .../services/test_helpers/refund_service.rbi | 22 + .../test_helpers/terminal/reader_service.rbi | 62 + .../test_helpers/terminal_service.rbi | 11 + .../test_helpers/test_clock_service.rbi | 90 + .../treasury/inbound_transfer_service.rbi | 64 + .../treasury/outbound_payment_service.rbi | 123 + .../treasury/outbound_transfer_service.rbi | 123 + .../treasury/received_credit_service.rbi | 114 + .../treasury/received_debit_service.rbi | 114 + .../test_helpers/treasury_service.rbi | 15 + rbi/stripe/services/test_helpers_service.rbi | 15 + rbi/stripe/services/token_service.rbi | 1132 ++ rbi/stripe/services/topup_service.rbi | 172 + .../services/transfer_reversal_service.rbi | 99 + rbi/stripe/services/transfer_service.rbi | 150 + .../treasury/credit_reversal_service.rbi | 84 + .../treasury/debit_reversal_service.rbi | 88 + .../financial_account_features_service.rbi | 201 + .../treasury/financial_account_service.rbi | 506 + .../treasury/inbound_transfer_service.rbi | 117 + .../treasury/outbound_payment_service.rbi | 300 + .../treasury/outbound_transfer_service.rbi | 166 + .../treasury/received_credit_service.rbi | 70 + .../treasury/received_debit_service.rbi | 59 + .../treasury/transaction_entry_service.rbi | 107 + .../services/treasury/transaction_service.rbi | 114 + rbi/stripe/services/treasury_service.rbi | 18 + rbi/stripe/services/v1_services.rbi | 83 + .../meter_event_adjustment_service.rbi | 39 + .../v2/billing/meter_event_service.rbi | 42 + .../billing/meter_event_session_service.rbi | 20 + .../v2/billing/meter_event_stream_service.rbi | 55 + rbi/stripe/services/v2/billing_service.rbi | 14 + .../v2/core/event_destination_service.rbi | 203 + rbi/stripe/services/v2/core/event_service.rbi | 39 + rbi/stripe/services/v2/core_service.rbi | 12 + rbi/stripe/services/v2_services.rbi | 10 + .../services/webhook_endpoint_service.rbi | 131 + test/stripe/request_params_test.rb | 11 + 698 files changed, 303753 insertions(+), 4134 deletions(-) create mode 100644 rbi/stripe/services/account_capability_service.rbi create mode 100644 rbi/stripe/services/account_external_account_service.rbi create mode 100644 rbi/stripe/services/account_link_service.rbi create mode 100644 rbi/stripe/services/account_login_link_service.rbi create mode 100644 rbi/stripe/services/account_notice_service.rbi create mode 100644 rbi/stripe/services/account_person_service.rbi create mode 100644 rbi/stripe/services/account_service.rbi create mode 100644 rbi/stripe/services/account_session_service.rbi create mode 100644 rbi/stripe/services/apple_pay_domain_service.rbi create mode 100644 rbi/stripe/services/application_fee_refund_service.rbi create mode 100644 rbi/stripe/services/application_fee_service.rbi create mode 100644 rbi/stripe/services/apps/secret_service.rbi create mode 100644 rbi/stripe/services/apps_service.rbi create mode 100644 rbi/stripe/services/balance_service.rbi create mode 100644 rbi/stripe/services/balance_transaction_service.rbi create mode 100644 rbi/stripe/services/billing/alert_service.rbi create mode 100644 rbi/stripe/services/billing/credit_balance_summary_service.rbi create mode 100644 rbi/stripe/services/billing/credit_balance_transaction_service.rbi create mode 100644 rbi/stripe/services/billing/credit_grant_service.rbi create mode 100644 rbi/stripe/services/billing/meter_event_adjustment_service.rbi create mode 100644 rbi/stripe/services/billing/meter_event_service.rbi create mode 100644 rbi/stripe/services/billing/meter_event_summary_service.rbi create mode 100644 rbi/stripe/services/billing/meter_service.rbi create mode 100644 rbi/stripe/services/billing_portal/configuration_service.rbi create mode 100644 rbi/stripe/services/billing_portal/session_service.rbi create mode 100644 rbi/stripe/services/billing_portal_service.rbi create mode 100644 rbi/stripe/services/billing_service.rbi create mode 100644 rbi/stripe/services/capital/financing_offer_service.rbi create mode 100644 rbi/stripe/services/capital/financing_summary_service.rbi create mode 100644 rbi/stripe/services/capital/financing_transaction_service.rbi create mode 100644 rbi/stripe/services/capital_service.rbi create mode 100644 rbi/stripe/services/charge_service.rbi create mode 100644 rbi/stripe/services/checkout/session_line_item_service.rbi create mode 100644 rbi/stripe/services/checkout/session_service.rbi create mode 100644 rbi/stripe/services/checkout_service.rbi create mode 100644 rbi/stripe/services/climate/order_service.rbi create mode 100644 rbi/stripe/services/climate/product_service.rbi create mode 100644 rbi/stripe/services/climate/supplier_service.rbi create mode 100644 rbi/stripe/services/climate_service.rbi create mode 100644 rbi/stripe/services/confirmation_token_service.rbi create mode 100644 rbi/stripe/services/country_spec_service.rbi create mode 100644 rbi/stripe/services/coupon_service.rbi create mode 100644 rbi/stripe/services/credit_note_line_item_service.rbi create mode 100644 rbi/stripe/services/credit_note_preview_lines_service.rbi create mode 100644 rbi/stripe/services/credit_note_service.rbi create mode 100644 rbi/stripe/services/customer_balance_transaction_service.rbi create mode 100644 rbi/stripe/services/customer_cash_balance_service.rbi create mode 100644 rbi/stripe/services/customer_cash_balance_transaction_service.rbi create mode 100644 rbi/stripe/services/customer_funding_instructions_service.rbi create mode 100644 rbi/stripe/services/customer_payment_method_service.rbi create mode 100644 rbi/stripe/services/customer_payment_source_service.rbi create mode 100644 rbi/stripe/services/customer_service.rbi create mode 100644 rbi/stripe/services/customer_session_service.rbi create mode 100644 rbi/stripe/services/customer_tax_id_service.rbi create mode 100644 rbi/stripe/services/dispute_service.rbi create mode 100644 rbi/stripe/services/entitlements/active_entitlement_service.rbi create mode 100644 rbi/stripe/services/entitlements/feature_service.rbi create mode 100644 rbi/stripe/services/entitlements_service.rbi create mode 100644 rbi/stripe/services/ephemeral_key_service.rbi create mode 100644 rbi/stripe/services/event_service.rbi create mode 100644 rbi/stripe/services/exchange_rate_service.rbi create mode 100644 rbi/stripe/services/file_link_service.rbi create mode 100644 rbi/stripe/services/file_service.rbi create mode 100644 rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi create mode 100644 rbi/stripe/services/financial_connections/account_owner_service.rbi create mode 100644 rbi/stripe/services/financial_connections/account_service.rbi create mode 100644 rbi/stripe/services/financial_connections/institution_service.rbi create mode 100644 rbi/stripe/services/financial_connections/session_service.rbi create mode 100644 rbi/stripe/services/financial_connections/transaction_service.rbi create mode 100644 rbi/stripe/services/financial_connections_service.rbi create mode 100644 rbi/stripe/services/forwarding/request_service.rbi create mode 100644 rbi/stripe/services/forwarding_service.rbi create mode 100644 rbi/stripe/services/gift_cards/card_service.rbi create mode 100644 rbi/stripe/services/gift_cards/transaction_service.rbi create mode 100644 rbi/stripe/services/gift_cards_service.rbi create mode 100644 rbi/stripe/services/identity/verification_report_service.rbi create mode 100644 rbi/stripe/services/identity/verification_session_service.rbi create mode 100644 rbi/stripe/services/identity_service.rbi create mode 100644 rbi/stripe/services/invoice_item_service.rbi create mode 100644 rbi/stripe/services/invoice_line_item_service.rbi create mode 100644 rbi/stripe/services/invoice_payment_service.rbi create mode 100644 rbi/stripe/services/invoice_rendering_template_service.rbi create mode 100644 rbi/stripe/services/invoice_service.rbi create mode 100644 rbi/stripe/services/invoice_upcoming_lines_service.rbi create mode 100644 rbi/stripe/services/issuing/authorization_service.rbi create mode 100644 rbi/stripe/services/issuing/card_service.rbi create mode 100644 rbi/stripe/services/issuing/cardholder_service.rbi create mode 100644 rbi/stripe/services/issuing/credit_underwriting_record_service.rbi create mode 100644 rbi/stripe/services/issuing/dispute_service.rbi create mode 100644 rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi create mode 100644 rbi/stripe/services/issuing/fraud_liability_debit_service.rbi create mode 100644 rbi/stripe/services/issuing/personalization_design_service.rbi create mode 100644 rbi/stripe/services/issuing/physical_bundle_service.rbi create mode 100644 rbi/stripe/services/issuing/token_service.rbi create mode 100644 rbi/stripe/services/issuing/transaction_service.rbi create mode 100644 rbi/stripe/services/issuing_service.rbi create mode 100644 rbi/stripe/services/mandate_service.rbi create mode 100644 rbi/stripe/services/margin_service.rbi create mode 100644 rbi/stripe/services/order_line_item_service.rbi create mode 100644 rbi/stripe/services/order_service.rbi create mode 100644 rbi/stripe/services/payment_attempt_record_service.rbi create mode 100644 rbi/stripe/services/payment_intent_service.rbi create mode 100644 rbi/stripe/services/payment_link_line_item_service.rbi create mode 100644 rbi/stripe/services/payment_link_service.rbi create mode 100644 rbi/stripe/services/payment_method_configuration_service.rbi create mode 100644 rbi/stripe/services/payment_method_domain_service.rbi create mode 100644 rbi/stripe/services/payment_method_service.rbi create mode 100644 rbi/stripe/services/payment_record_service.rbi create mode 100644 rbi/stripe/services/payout_service.rbi create mode 100644 rbi/stripe/services/plan_service.rbi create mode 100644 rbi/stripe/services/price_service.rbi create mode 100644 rbi/stripe/services/product_feature_service.rbi create mode 100644 rbi/stripe/services/product_service.rbi create mode 100644 rbi/stripe/services/promotion_code_service.rbi create mode 100644 rbi/stripe/services/quote_computed_upfront_line_items_service.rbi create mode 100644 rbi/stripe/services/quote_line_item_service.rbi create mode 100644 rbi/stripe/services/quote_line_service.rbi create mode 100644 rbi/stripe/services/quote_preview_invoice_service.rbi create mode 100644 rbi/stripe/services/quote_preview_subscription_schedule_service.rbi create mode 100644 rbi/stripe/services/quote_service.rbi create mode 100644 rbi/stripe/services/radar/early_fraud_warning_service.rbi create mode 100644 rbi/stripe/services/radar/value_list_item_service.rbi create mode 100644 rbi/stripe/services/radar/value_list_service.rbi create mode 100644 rbi/stripe/services/radar_service.rbi create mode 100644 rbi/stripe/services/refund_service.rbi create mode 100644 rbi/stripe/services/reporting/report_run_service.rbi create mode 100644 rbi/stripe/services/reporting/report_type_service.rbi create mode 100644 rbi/stripe/services/reporting_service.rbi create mode 100644 rbi/stripe/services/review_service.rbi create mode 100644 rbi/stripe/services/setup_attempt_service.rbi create mode 100644 rbi/stripe/services/setup_intent_service.rbi create mode 100644 rbi/stripe/services/shipping_rate_service.rbi create mode 100644 rbi/stripe/services/sigma/scheduled_query_run_service.rbi create mode 100644 rbi/stripe/services/sigma_service.rbi create mode 100644 rbi/stripe/services/source_service.rbi create mode 100644 rbi/stripe/services/source_transaction_service.rbi create mode 100644 rbi/stripe/services/subscription_item_service.rbi create mode 100644 rbi/stripe/services/subscription_item_usage_record_service.rbi create mode 100644 rbi/stripe/services/subscription_item_usage_record_summary_service.rbi create mode 100644 rbi/stripe/services/subscription_schedule_service.rbi create mode 100644 rbi/stripe/services/subscription_service.rbi create mode 100644 rbi/stripe/services/tax/association_service.rbi create mode 100644 rbi/stripe/services/tax/calculation_line_item_service.rbi create mode 100644 rbi/stripe/services/tax/calculation_service.rbi create mode 100644 rbi/stripe/services/tax/form_service.rbi create mode 100644 rbi/stripe/services/tax/registration_service.rbi create mode 100644 rbi/stripe/services/tax/settings_service.rbi create mode 100644 rbi/stripe/services/tax/transaction_line_item_service.rbi create mode 100644 rbi/stripe/services/tax/transaction_service.rbi create mode 100644 rbi/stripe/services/tax_code_service.rbi create mode 100644 rbi/stripe/services/tax_id_service.rbi create mode 100644 rbi/stripe/services/tax_rate_service.rbi create mode 100644 rbi/stripe/services/tax_service.rbi create mode 100644 rbi/stripe/services/terminal/configuration_service.rbi create mode 100644 rbi/stripe/services/terminal/connection_token_service.rbi create mode 100644 rbi/stripe/services/terminal/location_service.rbi create mode 100644 rbi/stripe/services/terminal/reader_collected_data_service.rbi create mode 100644 rbi/stripe/services/terminal/reader_service.rbi create mode 100644 rbi/stripe/services/terminal_service.rbi create mode 100644 rbi/stripe/services/test_helpers/confirmation_token_service.rbi create mode 100644 rbi/stripe/services/test_helpers/customer_service.rbi create mode 100644 rbi/stripe/services/test_helpers/issuing/authorization_service.rbi create mode 100644 rbi/stripe/services/test_helpers/issuing/card_service.rbi create mode 100644 rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi create mode 100644 rbi/stripe/services/test_helpers/issuing/transaction_service.rbi create mode 100644 rbi/stripe/services/test_helpers/issuing_service.rbi create mode 100644 rbi/stripe/services/test_helpers/refund_service.rbi create mode 100644 rbi/stripe/services/test_helpers/terminal/reader_service.rbi create mode 100644 rbi/stripe/services/test_helpers/terminal_service.rbi create mode 100644 rbi/stripe/services/test_helpers/test_clock_service.rbi create mode 100644 rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi create mode 100644 rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi create mode 100644 rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi create mode 100644 rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi create mode 100644 rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi create mode 100644 rbi/stripe/services/test_helpers/treasury_service.rbi create mode 100644 rbi/stripe/services/test_helpers_service.rbi create mode 100644 rbi/stripe/services/token_service.rbi create mode 100644 rbi/stripe/services/topup_service.rbi create mode 100644 rbi/stripe/services/transfer_reversal_service.rbi create mode 100644 rbi/stripe/services/transfer_service.rbi create mode 100644 rbi/stripe/services/treasury/credit_reversal_service.rbi create mode 100644 rbi/stripe/services/treasury/debit_reversal_service.rbi create mode 100644 rbi/stripe/services/treasury/financial_account_features_service.rbi create mode 100644 rbi/stripe/services/treasury/financial_account_service.rbi create mode 100644 rbi/stripe/services/treasury/inbound_transfer_service.rbi create mode 100644 rbi/stripe/services/treasury/outbound_payment_service.rbi create mode 100644 rbi/stripe/services/treasury/outbound_transfer_service.rbi create mode 100644 rbi/stripe/services/treasury/received_credit_service.rbi create mode 100644 rbi/stripe/services/treasury/received_debit_service.rbi create mode 100644 rbi/stripe/services/treasury/transaction_entry_service.rbi create mode 100644 rbi/stripe/services/treasury/transaction_service.rbi create mode 100644 rbi/stripe/services/treasury_service.rbi create mode 100644 rbi/stripe/services/v1_services.rbi create mode 100644 rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi create mode 100644 rbi/stripe/services/v2/billing/meter_event_service.rbi create mode 100644 rbi/stripe/services/v2/billing/meter_event_session_service.rbi create mode 100644 rbi/stripe/services/v2/billing/meter_event_stream_service.rbi create mode 100644 rbi/stripe/services/v2/billing_service.rbi create mode 100644 rbi/stripe/services/v2/core/event_destination_service.rbi create mode 100644 rbi/stripe/services/v2/core/event_service.rbi create mode 100644 rbi/stripe/services/v2/core_service.rbi create mode 100644 rbi/stripe/services/v2_services.rbi create mode 100644 rbi/stripe/services/webhook_endpoint_service.rbi diff --git a/lib/stripe/resources/account.rb b/lib/stripe/resources/account.rb index ada96dfee..1cb72d3df 100644 --- a/lib/stripe/resources/account.rb +++ b/lib/stripe/resources/account.rb @@ -36,178 +36,5251 @@ def self.object_name class BusinessProfile < Stripe::StripeObject class AnnualRevenue < Stripe::StripeObject - attr_reader :amount, :currency, :fiscal_year_end + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + attr_reader :fiscal_year_end end class MonthlyEstimatedRevenue < Stripe::StripeObject - attr_reader :amount, :currency + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency end class SupportAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :annual_revenue, :estimated_worker_count, :mcc, :monthly_estimated_revenue, :name, :product_description, :support_address, :support_email, :support_phone, :support_url, :url + # The applicant's gross annual revenue for its preceding fiscal year. + attr_reader :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + attr_reader :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + attr_reader :mcc + # Attribute for field monthly_estimated_revenue + attr_reader :monthly_estimated_revenue + # The customer-facing business name. + attr_reader :name + # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. + attr_reader :product_description + # A publicly available mailing address for sending support issues to. + attr_reader :support_address + # A publicly available email address for sending support issues to. + attr_reader :support_email + # A publicly available phone number to call with support issues. + attr_reader :support_phone + # A publicly available website for handling support issues. + attr_reader :support_url + # The business's publicly available website. + attr_reader :url end class Capabilities < Stripe::StripeObject - attr_reader :acss_debit_payments, :affirm_payments, :afterpay_clearpay_payments, :alma_payments, :amazon_pay_payments, :au_becs_debit_payments, :automatic_indirect_tax, :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, :gb_bank_transfer_payments, :giropay_payments, :gopay_payments, :grabpay_payments, :id_bank_transfer_payments, :id_bank_transfer_payments_bca, :ideal_payments, :india_international_payments, :jcb_payments, :jp_bank_transfer_payments, :kakao_pay_payments, :klarna_payments, :konbini_payments, :kr_card_payments, :legacy_payments, :link_payments, :mb_way_payments, :mobilepay_payments, :multibanco_payments, :mx_bank_transfer_payments, :naver_pay_payments, :oxxo_payments, :p24_payments, :payco_payments, :paynow_payments, :paypal_payments, :payto_payments, :promptpay_payments, :qris_payments, :rechnung_payments, :revolut_pay_payments, :samsung_pay_payments, :sepa_bank_transfer_payments, :sepa_debit_payments, :shopeepay_payments, :sofort_payments, :swish_payments, :tax_reporting_us_1099_k, :tax_reporting_us_1099_misc, :transfers, :treasury, :treasury_evolve, :treasury_fifth_third, :treasury_goldman_sachs, :twint_payments, :us_bank_account_ach_payments, :us_bank_transfer_payments, :zip_payments + # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. + attr_reader :acss_debit_payments + # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. + attr_reader :affirm_payments + # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. + attr_reader :afterpay_clearpay_payments + # The status of the Alma capability of the account, or whether the account can directly process Alma payments. + attr_reader :alma_payments + # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. + attr_reader :amazon_pay_payments + # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. + attr_reader :au_becs_debit_payments + # The status of the automatic_indirect_tax capability of the account. + attr_reader :automatic_indirect_tax + # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. + attr_reader :bacs_debit_payments + # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. + attr_reader :bancontact_payments + # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. + attr_reader :bank_transfer_payments + # The status of the blik payments capability of the account, or whether the account can directly process blik charges. + attr_reader :blik_payments + # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. + attr_reader :boleto_payments + # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards + attr_reader :card_issuing + # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. + attr_reader :card_payments + # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. + attr_reader :cartes_bancaires_payments + # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. + attr_reader :cashapp_payments + # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. + attr_reader :eps_payments + # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. + attr_reader :fpx_payments + # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. + attr_reader :gb_bank_transfer_payments + # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. + attr_reader :giropay_payments + # The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. + attr_reader :gopay_payments + # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. + attr_reader :grabpay_payments + # The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. + attr_reader :id_bank_transfer_payments + # The status of Bank BCA onboarding of the account. + attr_reader :id_bank_transfer_payments_bca + # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. + attr_reader :ideal_payments + # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. + attr_reader :india_international_payments + # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. + attr_reader :jcb_payments + # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. + attr_reader :jp_bank_transfer_payments + # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. + attr_reader :kakao_pay_payments + # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. + attr_reader :klarna_payments + # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. + attr_reader :konbini_payments + # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. + attr_reader :kr_card_payments + # The status of the legacy payments capability of the account. + attr_reader :legacy_payments + # The status of the link_payments capability of the account, or whether the account can directly process Link charges. + attr_reader :link_payments + # The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. + attr_reader :mb_way_payments + # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. + attr_reader :mobilepay_payments + # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. + attr_reader :multibanco_payments + # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. + attr_reader :mx_bank_transfer_payments + # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. + attr_reader :naver_pay_payments + # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. + attr_reader :oxxo_payments + # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. + attr_reader :p24_payments + # The status of the Payco capability of the account, or whether the account can directly process Payco payments. + attr_reader :payco_payments + # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. + attr_reader :paynow_payments + # The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. + attr_reader :paypal_payments + # The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. + attr_reader :payto_payments + # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. + attr_reader :promptpay_payments + # The status of the Qris capability of the account, or whether the account can directly process Qris payments. + attr_reader :qris_payments + # The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. + attr_reader :rechnung_payments + # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. + attr_reader :revolut_pay_payments + # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. + attr_reader :samsung_pay_payments + # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. + attr_reader :sepa_bank_transfer_payments + # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. + attr_reader :sepa_debit_payments + # The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. + attr_reader :shopeepay_payments + # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. + attr_reader :sofort_payments + # The status of the Swish capability of the account, or whether the account can directly process Swish payments. + attr_reader :swish_payments + # The status of the tax reporting 1099-K (US) capability of the account. + attr_reader :tax_reporting_us_1099_k + # The status of the tax reporting 1099-MISC (US) capability of the account. + attr_reader :tax_reporting_us_1099_misc + # The status of the transfers capability of the account, or whether your platform can transfer funds to the account. + attr_reader :transfers + # The status of the banking capability, or whether the account can have bank accounts. + attr_reader :treasury + # The status of the treasury_evolve capability of the account. + attr_reader :treasury_evolve + # The status of the treasury_fifth_third capability of the account. + attr_reader :treasury_fifth_third + # The status of the treasury_goldman_sachs capability of the account. + attr_reader :treasury_goldman_sachs + # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. + attr_reader :twint_payments + # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. + attr_reader :us_bank_account_ach_payments + # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. + attr_reader :us_bank_transfer_payments + # The status of the Zip capability of the account, or whether the account can directly process Zip charges. + attr_reader :zip_payments end class Company < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class AddressKana < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class AddressKanji < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class OwnershipDeclaration < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_reader :date + # The IP address from which the beneficial owner attestation was made. + attr_reader :ip + # The user-agent string from the browser where the beneficial owner attestation was made. + attr_reader :user_agent end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :back, :details, :details_code, :front + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. + attr_reader :back + # A user-displayable string describing the verification state of this document. + attr_reader :details + # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. + attr_reader :details_code + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. + attr_reader :front end + # Attribute for field document attr_reader :document end - attr_reader :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 + # Attribute for field address + attr_reader :address + # The Kana variation of the company's primary address (Japan only). + attr_reader :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_reader :address_kanji + # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). + attr_reader :directors_provided + # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. + attr_reader :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_reader :export_license_id + # The purpose code to use for export transactions (India only). + attr_reader :export_purpose_code + # The company's legal name. + attr_reader :name + # The Kana variation of the company's legal name (Japan only). + attr_reader :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_reader :name_kanji + # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). + attr_reader :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_reader :ownership_declaration + # The company's phone number (used for verification). + attr_reader :phone + # The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. + attr_reader :structure + # Whether the company's business ID number was provided. + attr_reader :tax_id_provided + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_reader :tax_id_registrar + # Whether the company's business VAT number was provided. + attr_reader :vat_id_provided + # Information on the verification state of the company. + attr_reader :verification end class Controller < Stripe::StripeObject class Application < Stripe::StripeObject - attr_reader :loss_liable, :onboarding_owner, :pricing_controls + # `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. + attr_reader :loss_liable + # `true` if the Connect application is responsible for onboarding the account. + attr_reader :onboarding_owner + # `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. + attr_reader :pricing_controls end class Dashboard < Stripe::StripeObject + # Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). attr_reader :type end class Fees < Stripe::StripeObject + # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). attr_reader :payer end class Losses < Stripe::StripeObject + # A value indicating who is liable when this account can't pay back negative balances from payments. attr_reader :payments end class StripeDashboard < Stripe::StripeObject + # A value indicating the Stripe dashboard this account has access to independent of the Connect application. attr_reader :type end - attr_reader :application, :dashboard, :fees, :is_controller, :losses, :requirement_collection, :stripe_dashboard, :type + # Attribute for field application + attr_reader :application + # Attribute for field dashboard + attr_reader :dashboard + # Attribute for field fees + attr_reader :fees + # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. + attr_reader :is_controller + # Attribute for field losses + attr_reader :losses + # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. + attr_reader :requirement_collection + # Attribute for field stripe_dashboard + attr_reader :stripe_dashboard + # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. + attr_reader :type end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. + attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`. + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Groups < Stripe::StripeObject + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. attr_reader :payments_pricing end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. + attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class RiskControls < Stripe::StripeObject class Charges < Stripe::StripeObject + # Whether a pause of the risk control has been requested. attr_reader :pause_requested end class Payouts < Stripe::StripeObject + # Whether a pause of the risk control has been requested. attr_reader :pause_requested end - attr_reader :charges, :payouts + # Attribute for field charges + attr_reader :charges + # Attribute for field payouts + attr_reader :payouts end class Settings < Stripe::StripeObject class BacsDebitPayments < Stripe::StripeObject - attr_reader :display_name, :service_user_number + # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + attr_reader :display_name + # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. + attr_reader :service_user_number end class BankBcaOnboarding < Stripe::StripeObject - attr_reader :account_holder_name, :business_account_number + # Bank BCA business account holder name. + attr_reader :account_holder_name + # Bank BCA business account number. + attr_reader :business_account_number end class Branding < Stripe::StripeObject - attr_reader :icon, :logo, :primary_color, :secondary_color + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + attr_reader :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + attr_reader :logo + # A CSS hex color value representing the primary branding color for this account + attr_reader :primary_color + # A CSS hex color value representing the secondary branding color for this account + attr_reader :secondary_color end class Capital < Stripe::StripeObject - attr_reader :payout_destination, :payout_destination_selector + # Per-currency mapping of user-selected destination accounts used to pay out loans. + attr_reader :payout_destination + # Per-currency mapping of all destination accounts eligible to receive loan payouts. + attr_reader :payout_destination_selector end class CardIssuing < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_reader :date + # The IP address from which the account representative accepted the service agreement. + attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_reader :user_agent end + # Attribute for field tos_acceptance attr_reader :tos_acceptance end class CardPayments < Stripe::StripeObject class DeclineOn < Stripe::StripeObject - attr_reader :avs_failure, :cvc_failure + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + attr_reader :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + attr_reader :cvc_failure end - attr_reader :decline_on, :statement_descriptor_prefix, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji + # Attribute for field decline_on + attr_reader :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + attr_reader :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + attr_reader :statement_descriptor_prefix_kanji end class Dashboard < Stripe::StripeObject - attr_reader :display_name, :timezone + # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. + attr_reader :display_name + # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). + attr_reader :timezone end class Invoices < Stripe::StripeObject + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. attr_reader :default_account_tax_ids end class Payments < Stripe::StripeObject - attr_reader :statement_descriptor, :statement_descriptor_kana, :statement_descriptor_kanji, :statement_descriptor_prefix_kana, :statement_descriptor_prefix_kanji + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. + attr_reader :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_kanji + # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_reader :statement_descriptor_prefix_kanji end class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject - attr_reader :delay_days, :interval, :monthly_anchor, :weekly_anchor + # The number of days charges for the account will be held before being paid out. + attr_reader :delay_days + # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. + attr_reader :interval + # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. + attr_reader :monthly_anchor + # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. + attr_reader :weekly_anchor end - attr_reader :debit_negative_balances, :schedule, :statement_descriptor + # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. + attr_reader :debit_negative_balances + # Attribute for field schedule + attr_reader :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + attr_reader :statement_descriptor end class SepaDebitPayments < Stripe::StripeObject + # SEPA creditor identifier that identifies the company making the payment. attr_reader :creditor_id end class TaxForms < Stripe::StripeObject + # Whether the account opted out of receiving their tax forms by postal delivery. attr_reader :consented_to_paperless_delivery end class Treasury < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_reader :date + # The IP address from which the account representative accepted the service agreement. + attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_reader :user_agent end + # Attribute for field tos_acceptance attr_reader :tos_acceptance end - attr_reader :bacs_debit_payments, :bank_bca_onboarding, :branding, :capital, :card_issuing, :card_payments, :dashboard, :invoices, :payments, :payouts, :sepa_debit_payments, :tax_forms, :treasury + # Attribute for field bacs_debit_payments + attr_reader :bacs_debit_payments + # Attribute for field bank_bca_onboarding + attr_reader :bank_bca_onboarding + # Attribute for field branding + attr_reader :branding + # Attribute for field capital + attr_reader :capital + # Attribute for field card_issuing + attr_reader :card_issuing + # Attribute for field card_payments + attr_reader :card_payments + # Attribute for field dashboard + attr_reader :dashboard + # Attribute for field invoices + attr_reader :invoices + # Attribute for field payments + attr_reader :payments + # Attribute for field payouts + attr_reader :payouts + # Attribute for field sepa_debit_payments + attr_reader :sepa_debit_payments + # Attribute for field tax_forms + attr_reader :tax_forms + # Attribute for field treasury + attr_reader :treasury end class TosAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :service_agreement, :user_agent + # The Unix timestamp marking when the account representative accepted their service agreement + attr_reader :date + # The IP address from which the account representative accepted their service agreement + attr_reader :ip + # The user's service agreement type + attr_reader :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement + attr_reader :user_agent + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ) + super + @object = object + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @country = country + @currency = currency + @routing_number = routing_number + end + end + + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + attr_accessor :fiscal_year_end + + def initialize(amount: nil, currency: nil, fiscal_year_end: nil) + super + @amount = amount + @currency = currency + @fiscal_year_end = fiscal_year_end + end + end + + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The applicant's gross annual revenue for its preceding fiscal year. + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + attr_accessor :support_address + # A publicly available email address for sending support issues to. + attr_accessor :support_email + # A publicly available phone number to call with support issues. + attr_accessor :support_phone + # A publicly available website for handling support issues. + attr_accessor :support_url + # The business's publicly available website. + attr_accessor :url + + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ) + super + @annual_revenue = annual_revenue + @estimated_worker_count = estimated_worker_count + @mcc = mcc + @monthly_estimated_revenue = monthly_estimated_revenue + @name = name + @product_description = product_description + @support_address = support_address + @support_email = support_email + @support_phone = support_phone + @support_url = support_url + @url = url + end + end + + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # The acss_debit_payments capability. + attr_accessor :acss_debit_payments + # The affirm_payments capability. + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + attr_accessor :alma_payments + # The amazon_pay_payments capability. + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + attr_accessor :bank_transfer_payments + # The blik_payments capability. + attr_accessor :blik_payments + # The boleto_payments capability. + attr_accessor :boleto_payments + # The card_issuing capability. + attr_accessor :card_issuing + # The card_payments capability. + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + attr_accessor :cashapp_payments + # The eps_payments capability. + attr_accessor :eps_payments + # The fpx_payments capability. + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + attr_accessor :giropay_payments + # The gopay_payments capability. + attr_accessor :gopay_payments + # The grabpay_payments capability. + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + attr_accessor :ideal_payments + # The india_international_payments capability. + attr_accessor :india_international_payments + # The jcb_payments capability. + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + attr_accessor :klarna_payments + # The konbini_payments capability. + attr_accessor :konbini_payments + # The kr_card_payments capability. + attr_accessor :kr_card_payments + # The legacy_payments capability. + attr_accessor :legacy_payments + # The link_payments capability. + attr_accessor :link_payments + # The mb_way_payments capability. + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + attr_accessor :oxxo_payments + # The p24_payments capability. + attr_accessor :p24_payments + # The payco_payments capability. + attr_accessor :payco_payments + # The paynow_payments capability. + attr_accessor :paynow_payments + # The paypal_payments capability. + attr_accessor :paypal_payments + # The payto_payments capability. + attr_accessor :payto_payments + # The promptpay_payments capability. + attr_accessor :promptpay_payments + # The qris_payments capability. + attr_accessor :qris_payments + # The rechnung_payments capability. + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + attr_accessor :shopeepay_payments + # The sofort_payments capability. + attr_accessor :sofort_payments + # The swish_payments capability. + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + attr_accessor :transfers + # The treasury capability. + attr_accessor :treasury + # The treasury_evolve capability. + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + attr_accessor :zip_payments + + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ) + super + @acss_debit_payments = acss_debit_payments + @affirm_payments = affirm_payments + @afterpay_clearpay_payments = afterpay_clearpay_payments + @alma_payments = alma_payments + @amazon_pay_payments = amazon_pay_payments + @au_becs_debit_payments = au_becs_debit_payments + @automatic_indirect_tax = automatic_indirect_tax + @bacs_debit_payments = bacs_debit_payments + @bancontact_payments = bancontact_payments + @bank_transfer_payments = bank_transfer_payments + @blik_payments = blik_payments + @boleto_payments = boleto_payments + @card_issuing = card_issuing + @card_payments = card_payments + @cartes_bancaires_payments = cartes_bancaires_payments + @cashapp_payments = cashapp_payments + @eps_payments = eps_payments + @fpx_payments = fpx_payments + @gb_bank_transfer_payments = gb_bank_transfer_payments + @giropay_payments = giropay_payments + @gopay_payments = gopay_payments + @grabpay_payments = grabpay_payments + @id_bank_transfer_payments = id_bank_transfer_payments + @id_bank_transfer_payments_bca = id_bank_transfer_payments_bca + @ideal_payments = ideal_payments + @india_international_payments = india_international_payments + @jcb_payments = jcb_payments + @jp_bank_transfer_payments = jp_bank_transfer_payments + @kakao_pay_payments = kakao_pay_payments + @klarna_payments = klarna_payments + @konbini_payments = konbini_payments + @kr_card_payments = kr_card_payments + @legacy_payments = legacy_payments + @link_payments = link_payments + @mb_way_payments = mb_way_payments + @mobilepay_payments = mobilepay_payments + @multibanco_payments = multibanco_payments + @mx_bank_transfer_payments = mx_bank_transfer_payments + @naver_pay_payments = naver_pay_payments + @oxxo_payments = oxxo_payments + @p24_payments = p24_payments + @payco_payments = payco_payments + @paynow_payments = paynow_payments + @paypal_payments = paypal_payments + @payto_payments = payto_payments + @promptpay_payments = promptpay_payments + @qris_payments = qris_payments + @rechnung_payments = rechnung_payments + @revolut_pay_payments = revolut_pay_payments + @samsung_pay_payments = samsung_pay_payments + @sepa_bank_transfer_payments = sepa_bank_transfer_payments + @sepa_debit_payments = sepa_debit_payments + @shopeepay_payments = shopeepay_payments + @sofort_payments = sofort_payments + @swish_payments = swish_payments + @tax_reporting_us_1099_k = tax_reporting_us_1099_k + @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc + @transfers = transfers + @treasury = treasury + @treasury_evolve = treasury_evolve + @treasury_fifth_third = treasury_fifth_third + @treasury_goldman_sachs = treasury_goldman_sachs + @twint_payments = twint_payments + @us_bank_account_ach_payments = us_bank_account_ach_payments + @us_bank_transfer_payments = us_bank_transfer_payments + @zip_payments = zip_payments + end + end + + class Card < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field address_city + attr_accessor :address_city + # Attribute for param field address_country + attr_accessor :address_country + # Attribute for param field address_line1 + attr_accessor :address_line1 + # Attribute for param field address_line2 + attr_accessor :address_line2 + # Attribute for param field address_state + attr_accessor :address_state + # Attribute for param field address_zip + attr_accessor :address_zip + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field cvc + attr_accessor :cvc + # Attribute for param field exp_month + attr_accessor :exp_month + # Attribute for param field exp_year + attr_accessor :exp_year + # Attribute for param field name + attr_accessor :name + # Attribute for param field number + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # Attribute for param field default_for_currency + attr_accessor :default_for_currency + + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ) + super + @object = object + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @number = number + @metadata = metadata + @default_for_currency = default_for_currency + end + end + + class CardToken < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field token + attr_accessor :token + + def initialize(object: nil, currency: nil, token: nil) + super + @object = object + @currency = currency + @token = token + end + end + + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document verifying the business. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # The company's primary address. + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + attr_accessor :export_purpose_code + # The company's legal name. + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_accessor :tax_id_registrar + # The VAT number of the company. + attr_accessor :vat_id + # Information on the verification state of the company. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @directors_provided = directors_provided + @executives_provided = executives_provided + @export_license_id = export_license_id + @export_purpose_code = export_purpose_code + @name = name + @name_kana = name_kana + @name_kanji = name_kanji + @owners_provided = owners_provided + @ownership_declaration = ownership_declaration + @phone = phone + @registration_number = registration_number + @structure = structure + @tax_id = tax_id + @tax_id_registrar = tax_id_registrar + @vat_id = vat_id + @verification = verification + end + end + + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + attr_accessor :proof_of_registration + + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ) + super + @bank_account_ownership_verification = bank_account_ownership_verification + @company_license = company_license + @company_memorandum_of_association = company_memorandum_of_association + @company_ministerial_decree = company_ministerial_decree + @company_registration_verification = company_registration_verification + @company_tax_id_verification = company_tax_id_verification + @proof_of_registration = proof_of_registration + end + end + + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + attr_accessor :payments_pricing + + def initialize(payments_pricing: nil) + super + @payments_pricing = payments_pricing + end + end + + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ) + super + @director = director + @executive = executive + @owner = owner + @percent_ownership = percent_ownership + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # The individual's primary address. + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + attr_accessor :address_kanji + # The individual's date of birth. + attr_accessor :dob + # The individual's email address. + attr_accessor :email + # The individual's first name. + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + attr_accessor :full_name_aliases + # The individual's gender + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The individual's last name. + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + attr_accessor :last_name_kanji + # The individual's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The individual's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The individual's registered address. + attr_accessor :registered_address + # Describes the person’s relationship to the account. + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + attr_accessor :ssn_last_4 + # The individual's verification document information. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :payouts + + def initialize(charges: nil, payouts: nil) + super + @charges = charges + @payouts = payouts + end + end + + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + attr_accessor :display_name + + def initialize(display_name: nil) + super + @display_name = display_name + end + end + + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + attr_accessor :account_holder_name + # Bank BCA business account number + attr_accessor :business_account_number + + def initialize(account_holder_name: nil, business_account_number: nil) + super + @account_holder_name = account_holder_name + @business_account_number = business_account_number + end + end + + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + attr_accessor :secondary_color + + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil) + super + @icon = icon + @logo = logo + @primary_color = primary_color + @secondary_color = secondary_color + end + end + + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + attr_accessor :payout_destination_selector + + def initialize(payout_destination: nil, payout_destination_selector: nil) + super + @payout_destination = payout_destination + @payout_destination_selector = payout_destination_selector + end + end + + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + attr_accessor :cvc_failure + + def initialize(avs_failure: nil, cvc_failure: nil) + super + @avs_failure = avs_failure + @cvc_failure = cvc_failure + end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kanji + + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ) + super + @decline_on = decline_on + @statement_descriptor_prefix = statement_descriptor_prefix + @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana + @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji + end + end + + class Invoices < Stripe::RequestParams + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + attr_accessor :default_account_tax_ids + + def initialize(default_account_tax_ids: nil) + super + @default_account_tax_ids = default_account_tax_ids + end + end + + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kanji + + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ) + super + @statement_descriptor = statement_descriptor + @statement_descriptor_kana = statement_descriptor_kana + @statement_descriptor_kanji = statement_descriptor_kanji + end + end + + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + attr_accessor :weekly_anchor + + def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + super + @delay_days = delay_days + @interval = interval + @monthly_anchor = monthly_anchor + @weekly_anchor = weekly_anchor + end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + attr_accessor :statement_descriptor + + def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil) + super + @debit_negative_balances = debit_negative_balances + @schedule = schedule + @statement_descriptor = statement_descriptor + end + end + + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + attr_accessor :consented_to_paperless_delivery + + def initialize(consented_to_paperless_delivery: nil) + super + @consented_to_paperless_delivery = consented_to_paperless_delivery + end + end + + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + # Settings specific to Bacs Direct Debit payments. + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + attr_accessor :card_issuing + # Settings specific to card charging on the account. + attr_accessor :card_payments + # Settings specific to the account's use of Invoices. + attr_accessor :invoices + # Settings that apply across payment methods for charging on the account. + attr_accessor :payments + # Settings specific to the account's payouts. + attr_accessor :payouts + # Settings specific to the account's tax forms. + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + attr_accessor :treasury + + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + invoices: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ) + super + @bacs_debit_payments = bacs_debit_payments + @bank_bca_onboarding = bank_bca_onboarding + @branding = branding + @capital = capital + @card_issuing = card_issuing + @card_payments = card_payments + @invoices = invoices + @payments = payments + @payouts = payouts + @tax_forms = tax_forms + @treasury = treasury + end + end + + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + attr_accessor :ip + # The user's service agreement type. + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil) + super + @date = date + @ip = ip + @service_agreement = service_agreement + @user_agent = user_agent + end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + attr_accessor :account_token + # Business information about the account. + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :company + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + attr_accessor :tos_acceptance + + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil + ) + super + @account_token = account_token + @business_profile = business_profile + @business_type = business_type + @capabilities = capabilities + @company = company + @default_currency = default_currency + @documents = documents + @email = email + @expand = expand + @external_account = external_account + @groups = groups + @individual = individual + @metadata = metadata + @risk_controls = risk_controls + @settings = settings + @tos_acceptance = tos_acceptance + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return connected accounts that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ) + super + @object = object + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @country = country + @currency = currency + @routing_number = routing_number + end + end + + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + attr_accessor :fiscal_year_end + + def initialize(amount: nil, currency: nil, fiscal_year_end: nil) + super + @amount = amount + @currency = currency + @fiscal_year_end = fiscal_year_end + end + end + + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The applicant's gross annual revenue for its preceding fiscal year. + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + attr_accessor :support_address + # A publicly available email address for sending support issues to. + attr_accessor :support_email + # A publicly available phone number to call with support issues. + attr_accessor :support_phone + # A publicly available website for handling support issues. + attr_accessor :support_url + # The business's publicly available website. + attr_accessor :url + + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ) + super + @annual_revenue = annual_revenue + @estimated_worker_count = estimated_worker_count + @mcc = mcc + @monthly_estimated_revenue = monthly_estimated_revenue + @name = name + @product_description = product_description + @support_address = support_address + @support_email = support_email + @support_phone = support_phone + @support_url = support_url + @url = url + end + end + + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # The acss_debit_payments capability. + attr_accessor :acss_debit_payments + # The affirm_payments capability. + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + attr_accessor :alma_payments + # The amazon_pay_payments capability. + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + attr_accessor :bank_transfer_payments + # The blik_payments capability. + attr_accessor :blik_payments + # The boleto_payments capability. + attr_accessor :boleto_payments + # The card_issuing capability. + attr_accessor :card_issuing + # The card_payments capability. + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + attr_accessor :cashapp_payments + # The eps_payments capability. + attr_accessor :eps_payments + # The fpx_payments capability. + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + attr_accessor :giropay_payments + # The gopay_payments capability. + attr_accessor :gopay_payments + # The grabpay_payments capability. + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + attr_accessor :ideal_payments + # The india_international_payments capability. + attr_accessor :india_international_payments + # The jcb_payments capability. + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + attr_accessor :klarna_payments + # The konbini_payments capability. + attr_accessor :konbini_payments + # The kr_card_payments capability. + attr_accessor :kr_card_payments + # The legacy_payments capability. + attr_accessor :legacy_payments + # The link_payments capability. + attr_accessor :link_payments + # The mb_way_payments capability. + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + attr_accessor :oxxo_payments + # The p24_payments capability. + attr_accessor :p24_payments + # The payco_payments capability. + attr_accessor :payco_payments + # The paynow_payments capability. + attr_accessor :paynow_payments + # The paypal_payments capability. + attr_accessor :paypal_payments + # The payto_payments capability. + attr_accessor :payto_payments + # The promptpay_payments capability. + attr_accessor :promptpay_payments + # The qris_payments capability. + attr_accessor :qris_payments + # The rechnung_payments capability. + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + attr_accessor :shopeepay_payments + # The sofort_payments capability. + attr_accessor :sofort_payments + # The swish_payments capability. + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + attr_accessor :transfers + # The treasury capability. + attr_accessor :treasury + # The treasury_evolve capability. + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + attr_accessor :zip_payments + + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ) + super + @acss_debit_payments = acss_debit_payments + @affirm_payments = affirm_payments + @afterpay_clearpay_payments = afterpay_clearpay_payments + @alma_payments = alma_payments + @amazon_pay_payments = amazon_pay_payments + @au_becs_debit_payments = au_becs_debit_payments + @automatic_indirect_tax = automatic_indirect_tax + @bacs_debit_payments = bacs_debit_payments + @bancontact_payments = bancontact_payments + @bank_transfer_payments = bank_transfer_payments + @blik_payments = blik_payments + @boleto_payments = boleto_payments + @card_issuing = card_issuing + @card_payments = card_payments + @cartes_bancaires_payments = cartes_bancaires_payments + @cashapp_payments = cashapp_payments + @eps_payments = eps_payments + @fpx_payments = fpx_payments + @gb_bank_transfer_payments = gb_bank_transfer_payments + @giropay_payments = giropay_payments + @gopay_payments = gopay_payments + @grabpay_payments = grabpay_payments + @id_bank_transfer_payments = id_bank_transfer_payments + @id_bank_transfer_payments_bca = id_bank_transfer_payments_bca + @ideal_payments = ideal_payments + @india_international_payments = india_international_payments + @jcb_payments = jcb_payments + @jp_bank_transfer_payments = jp_bank_transfer_payments + @kakao_pay_payments = kakao_pay_payments + @klarna_payments = klarna_payments + @konbini_payments = konbini_payments + @kr_card_payments = kr_card_payments + @legacy_payments = legacy_payments + @link_payments = link_payments + @mb_way_payments = mb_way_payments + @mobilepay_payments = mobilepay_payments + @multibanco_payments = multibanco_payments + @mx_bank_transfer_payments = mx_bank_transfer_payments + @naver_pay_payments = naver_pay_payments + @oxxo_payments = oxxo_payments + @p24_payments = p24_payments + @payco_payments = payco_payments + @paynow_payments = paynow_payments + @paypal_payments = paypal_payments + @payto_payments = payto_payments + @promptpay_payments = promptpay_payments + @qris_payments = qris_payments + @rechnung_payments = rechnung_payments + @revolut_pay_payments = revolut_pay_payments + @samsung_pay_payments = samsung_pay_payments + @sepa_bank_transfer_payments = sepa_bank_transfer_payments + @sepa_debit_payments = sepa_debit_payments + @shopeepay_payments = shopeepay_payments + @sofort_payments = sofort_payments + @swish_payments = swish_payments + @tax_reporting_us_1099_k = tax_reporting_us_1099_k + @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc + @transfers = transfers + @treasury = treasury + @treasury_evolve = treasury_evolve + @treasury_fifth_third = treasury_fifth_third + @treasury_goldman_sachs = treasury_goldman_sachs + @twint_payments = twint_payments + @us_bank_account_ach_payments = us_bank_account_ach_payments + @us_bank_transfer_payments = us_bank_transfer_payments + @zip_payments = zip_payments + end + end + + class Card < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field address_city + attr_accessor :address_city + # Attribute for param field address_country + attr_accessor :address_country + # Attribute for param field address_line1 + attr_accessor :address_line1 + # Attribute for param field address_line2 + attr_accessor :address_line2 + # Attribute for param field address_state + attr_accessor :address_state + # Attribute for param field address_zip + attr_accessor :address_zip + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field cvc + attr_accessor :cvc + # Attribute for param field exp_month + attr_accessor :exp_month + # Attribute for param field exp_year + attr_accessor :exp_year + # Attribute for param field name + attr_accessor :name + # Attribute for param field number + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # Attribute for param field default_for_currency + attr_accessor :default_for_currency + + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ) + super + @object = object + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @number = number + @metadata = metadata + @default_for_currency = default_for_currency + end + end + + class CardToken < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field token + attr_accessor :token + + def initialize(object: nil, currency: nil, token: nil) + super + @object = object + @currency = currency + @token = token + end + end + + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document verifying the business. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # The company's primary address. + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + attr_accessor :export_purpose_code + # The company's legal name. + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_accessor :tax_id_registrar + # The VAT number of the company. + attr_accessor :vat_id + # Information on the verification state of the company. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @directors_provided = directors_provided + @executives_provided = executives_provided + @export_license_id = export_license_id + @export_purpose_code = export_purpose_code + @name = name + @name_kana = name_kana + @name_kanji = name_kanji + @owners_provided = owners_provided + @ownership_declaration = ownership_declaration + @phone = phone + @registration_number = registration_number + @structure = structure + @tax_id = tax_id + @tax_id_registrar = tax_id_registrar + @vat_id = vat_id + @verification = verification + end + end + + class Controller < Stripe::RequestParams + class Application < Stripe::RequestParams + # Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + attr_accessor :loss_liable + # Whether the controller owns onboarding for this account. + attr_accessor :onboarding_owner + # Whether the controller has pricing controls for this account. + attr_accessor :pricing_controls + + def initialize(loss_liable: nil, onboarding_owner: nil, pricing_controls: nil) + super + @loss_liable = loss_liable + @onboarding_owner = onboarding_owner + @pricing_controls = pricing_controls + end + end + + class Dashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Fees < Stripe::RequestParams + # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + attr_accessor :payer + + def initialize(payer: nil) + super + @payer = payer + end + end + + class Losses < Stripe::RequestParams + # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + attr_accessor :payments + + def initialize(payments: nil) + super + @payments = payments + end + end + + class StripeDashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # A hash of configuration describing the Connect application that controls the account. + attr_accessor :application + # Properties of the account's dashboard. + attr_accessor :dashboard + # A hash of configuration for who pays Stripe fees for product usage on this account. + attr_accessor :fees + # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + attr_accessor :losses + # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. + attr_accessor :requirement_collection + # A hash of configuration for Stripe-hosted dashboards. + attr_accessor :stripe_dashboard + + def initialize( + application: nil, + dashboard: nil, + fees: nil, + losses: nil, + requirement_collection: nil, + stripe_dashboard: nil + ) + super + @application = application + @dashboard = dashboard + @fees = fees + @losses = losses + @requirement_collection = requirement_collection + @stripe_dashboard = stripe_dashboard + end + end + + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + attr_accessor :proof_of_registration + + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ) + super + @bank_account_ownership_verification = bank_account_ownership_verification + @company_license = company_license + @company_memorandum_of_association = company_memorandum_of_association + @company_ministerial_decree = company_ministerial_decree + @company_registration_verification = company_registration_verification + @company_tax_id_verification = company_tax_id_verification + @proof_of_registration = proof_of_registration + end + end + + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + attr_accessor :payments_pricing + + def initialize(payments_pricing: nil) + super + @payments_pricing = payments_pricing + end + end + + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ) + super + @director = director + @executive = executive + @owner = owner + @percent_ownership = percent_ownership + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # The individual's primary address. + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + attr_accessor :address_kanji + # The individual's date of birth. + attr_accessor :dob + # The individual's email address. + attr_accessor :email + # The individual's first name. + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + attr_accessor :full_name_aliases + # The individual's gender + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The individual's last name. + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + attr_accessor :last_name_kanji + # The individual's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The individual's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The individual's registered address. + attr_accessor :registered_address + # Describes the person’s relationship to the account. + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + attr_accessor :ssn_last_4 + # The individual's verification document information. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :payouts + + def initialize(charges: nil, payouts: nil) + super + @charges = charges + @payouts = payouts + end + end + + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + attr_accessor :display_name + + def initialize(display_name: nil) + super + @display_name = display_name + end + end + + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + attr_accessor :account_holder_name + # Bank BCA business account number + attr_accessor :business_account_number + + def initialize(account_holder_name: nil, business_account_number: nil) + super + @account_holder_name = account_holder_name + @business_account_number = business_account_number + end + end + + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + attr_accessor :secondary_color + + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil) + super + @icon = icon + @logo = logo + @primary_color = primary_color + @secondary_color = secondary_color + end + end + + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + attr_accessor :payout_destination_selector + + def initialize(payout_destination: nil, payout_destination_selector: nil) + super + @payout_destination = payout_destination + @payout_destination_selector = payout_destination_selector + end + end + + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + attr_accessor :cvc_failure + + def initialize(avs_failure: nil, cvc_failure: nil) + super + @avs_failure = avs_failure + @cvc_failure = cvc_failure + end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kanji + + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ) + super + @decline_on = decline_on + @statement_descriptor_prefix = statement_descriptor_prefix + @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana + @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji + end + end + + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kanji + + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ) + super + @statement_descriptor = statement_descriptor + @statement_descriptor_kana = statement_descriptor_kana + @statement_descriptor_kanji = statement_descriptor_kanji + end + end + + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + attr_accessor :weekly_anchor + + def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + super + @delay_days = delay_days + @interval = interval + @monthly_anchor = monthly_anchor + @weekly_anchor = weekly_anchor + end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + attr_accessor :statement_descriptor + + def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil) + super + @debit_negative_balances = debit_negative_balances + @schedule = schedule + @statement_descriptor = statement_descriptor + end + end + + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + attr_accessor :consented_to_paperless_delivery + + def initialize(consented_to_paperless_delivery: nil) + super + @consented_to_paperless_delivery = consented_to_paperless_delivery + end + end + + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + # Settings specific to Bacs Direct Debit. + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + attr_accessor :card_issuing + # Settings specific to card charging on the account. + attr_accessor :card_payments + # Settings that apply across payment methods for charging on the account. + attr_accessor :payments + # Settings specific to the account's payouts. + attr_accessor :payouts + # Settings specific to the account's tax forms. + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + attr_accessor :treasury + + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ) + super + @bacs_debit_payments = bacs_debit_payments + @bank_bca_onboarding = bank_bca_onboarding + @branding = branding + @capital = capital + @card_issuing = card_issuing + @card_payments = card_payments + @payments = payments + @payouts = payouts + @tax_forms = tax_forms + @treasury = treasury + end + end + + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + attr_accessor :ip + # The user's service agreement type. + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil) + super + @date = date + @ip = ip + @service_agreement = service_agreement + @user_agent = user_agent + end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + attr_accessor :account_token + # Business information about the account. + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :company + # A hash of configuration describing the account controller's attributes. + attr_accessor :controller + # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. + attr_accessor :country + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + attr_accessor :tos_acceptance + # The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + attr_accessor :type + + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + controller: nil, + country: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil, + type: nil + ) + super + @account_token = account_token + @business_profile = business_profile + @business_type = business_type + @capabilities = capabilities + @company = company + @controller = controller + @country = country + @default_currency = default_currency + @documents = documents + @email = email + @expand = expand + @external_account = external_account + @groups = groups + @individual = individual + @metadata = metadata + @risk_controls = risk_controls + @settings = settings + @tos_acceptance = tos_acceptance + @type = type + end + end + + class PersonsParams < Stripe::RequestParams + class Relationship < Stripe::RequestParams + # A filter on the list of people returned based on whether these people are authorizers of the account's representative. + attr_accessor :authorizer + # A filter on the list of people returned based on whether these people are directors of the account's company. + attr_accessor :director + # A filter on the list of people returned based on whether these people are executives of the account's company. + attr_accessor :executive + # A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + attr_accessor :legal_guardian + # A filter on the list of people returned based on whether these people are owners of the account's company. + attr_accessor :owner + # A filter on the list of people returned based on whether these people are the representative of the account's company. + attr_accessor :representative + + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + representative: nil + ) + super + @authorizer = authorizer + @director = director + @executive = executive + @legal_guardian = legal_guardian + @owner = owner + @representative = representative + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filters on the list of people returned based on the person's relationship to the account's company. + attr_accessor :relationship + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + relationship: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @relationship = relationship + @starting_after = starting_after + end + end + + class RejectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + attr_accessor :reason + + def initialize(expand: nil, reason: nil) + super + @expand = expand + @reason = reason + end end # Business information about the account. attr_reader :business_profile @@ -307,8 +5380,8 @@ def delete(params = {}, opts = {}) end # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/accounts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/accounts", params: params, opts: opts) end # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. diff --git a/lib/stripe/resources/account_link.rb b/lib/stripe/resources/account_link.rb index ff0d0a71f..1411b44c8 100644 --- a/lib/stripe/resources/account_link.rb +++ b/lib/stripe/resources/account_link.rb @@ -14,6 +14,53 @@ def self.object_name "account_link" end + class CreateParams < Stripe::RequestParams + class CollectionOptions < Stripe::RequestParams + # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. + attr_accessor :fields + # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + attr_accessor :future_requirements + + def initialize(fields: nil, future_requirements: nil) + super + @fields = fields + @future_requirements = future_requirements + end + end + # The identifier of the account to create an account link for. + attr_accessor :account + # The collect parameter is deprecated. Use `collection_options` instead. + attr_accessor :collect + # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. + attr_accessor :collection_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. + attr_accessor :refresh_url + # The URL that the user will be redirected to upon leaving or completing the linked flow. + attr_accessor :return_url + # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + attr_accessor :type + + def initialize( + account: nil, + collect: nil, + collection_options: nil, + expand: nil, + refresh_url: nil, + return_url: nil, + type: nil + ) + super + @account = account + @collect = collect + @collection_options = collection_options + @expand = expand + @refresh_url = refresh_url + @return_url = return_url + @type = type + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # The timestamp at which this account link will expire. diff --git a/lib/stripe/resources/account_notice.rb b/lib/stripe/resources/account_notice.rb index fe9061dd7..7e2908086 100644 --- a/lib/stripe/resources/account_notice.rb +++ b/lib/stripe/resources/account_notice.rb @@ -15,11 +15,87 @@ def self.object_name end class Email < Stripe::StripeObject - attr_reader :plain_text, :recipient, :subject + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + attr_reader :plain_text + # Email address of the recipient. + attr_reader :recipient + # Subject of the email. + attr_reader :subject end class LinkedObjects < Stripe::StripeObject - attr_reader :capability, :issuing_credit_underwriting_record, :issuing_dispute + # Associated [Capability](https://stripe.com/docs/api/capabilities) + attr_reader :capability + # Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) + attr_reader :issuing_credit_underwriting_record + # Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) + attr_reader :issuing_dispute + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Set to false to only return unsent AccountNotices. + attr_accessor :sent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, sent: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @sent = sent + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Email < Stripe::RequestParams + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + attr_accessor :plain_text + # Email address of the recipient. + attr_accessor :recipient + # Subject of the email. + attr_accessor :subject + + def initialize(plain_text: nil, recipient: nil, subject: nil) + super + @plain_text = plain_text + @recipient = recipient + @subject = subject + end + end + # Information about the email you sent. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Date when you sent the notice. + attr_accessor :sent_at + + def initialize(email: nil, expand: nil, metadata: nil, sent_at: nil) + super + @email = email + @expand = expand + @metadata = metadata + @sent_at = sent_at + end end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -43,8 +119,8 @@ class LinkedObjects < Stripe::StripeObject attr_reader :sent_at # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/account_notices", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/account_notices", params: params, opts: opts) end # Updates an AccountNotice object. diff --git a/lib/stripe/resources/account_session.rb b/lib/stripe/resources/account_session.rb index f01411839..2fe45df5e 100644 --- a/lib/stripe/resources/account_session.rb +++ b/lib/stripe/resources/account_session.rb @@ -20,88 +20,902 @@ def self.object_name class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :external_account_collection + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :external_account_collection + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :standard_payouts end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class CapitalFinancing < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class CapitalFinancingApplication < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class CapitalFinancingPromotion < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Documents < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :external_account_collection + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_reader :refund_management end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Payments < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :capture_payments, :destination_on_behalf_of_charge_management, :dispute_management, :refund_management + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_reader :refund_management end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :disable_stripe_user_authentication, :edit_payout_schedule, :external_account_collection, :instant_payouts, :standard_payouts + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_reader :standard_payouts end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class PayoutsList < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class TaxRegistrations < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features end class TaxSettings < Stripe::StripeObject class Features < Stripe::StripeObject; end - attr_reader :enabled, :features + # Whether the embedded component is enabled. + attr_reader :enabled + # Attribute for field features + attr_reader :features + end + # Attribute for field account_management + attr_reader :account_management + # Attribute for field account_onboarding + attr_reader :account_onboarding + # Attribute for field balances + attr_reader :balances + # Attribute for field capital_financing + attr_reader :capital_financing + # Attribute for field capital_financing_application + attr_reader :capital_financing_application + # Attribute for field capital_financing_promotion + attr_reader :capital_financing_promotion + # Attribute for field documents + attr_reader :documents + # Attribute for field notification_banner + attr_reader :notification_banner + # Attribute for field payment_details + attr_reader :payment_details + # Attribute for field payments + attr_reader :payments + # Attribute for field payouts + attr_reader :payouts + # Attribute for field payouts_list + attr_reader :payouts_list + # Attribute for field tax_registrations + attr_reader :tax_registrations + # Attribute for field tax_settings + attr_reader :tax_settings + end + + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class AccountManagement < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class AccountOnboarding < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class AppInstall < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + attr_accessor :allowed_apps + + def initialize(allowed_apps: nil) + super + @allowed_apps = allowed_apps + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class AppViewport < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + attr_accessor :allowed_apps + + def initialize(allowed_apps: nil) + super + @allowed_apps = allowed_apps + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Balances < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :standard_payouts + + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @edit_payout_schedule = edit_payout_schedule + @external_account_collection = external_account_collection + @instant_payouts = instant_payouts + @standard_payouts = standard_payouts + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalFinancing < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalFinancingApplication < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalFinancingPromotion < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalOverview < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Documents < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class FinancialAccount < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow external accounts to be linked for money transfer. + attr_accessor :external_account_collection + # Whether to allow sending money. + attr_accessor :send_money + # Whether to allow transferring balance. + attr_accessor :transfer_balance + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil, + send_money: nil, + transfer_balance: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + @send_money = send_money + @transfer_balance = transfer_balance + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class FinancialAccountTransactions < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card spend dispute management features. + attr_accessor :card_spend_dispute_management + + def initialize(card_spend_dispute_management: nil) + super + @card_spend_dispute_management = card_spend_dispute_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class IssuingCard < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + attr_accessor :card_management + # Whether to allow card spend dispute management features. + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + attr_accessor :cardholder_management + # Whether to allow spend control management features. + attr_accessor :spend_control_management + + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + spend_control_management: nil + ) + super + @card_management = card_management + @card_spend_dispute_management = card_spend_dispute_management + @cardholder_management = cardholder_management + @spend_control_management = spend_control_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class IssuingCardsList < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + attr_accessor :card_management + # Whether to allow card spend dispute management features. + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + attr_accessor :cardholder_management + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + attr_accessor :disable_stripe_user_authentication + # Whether to allow spend control management features. + attr_accessor :spend_control_management + + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + disable_stripe_user_authentication: nil, + spend_control_management: nil + ) + super + @card_management = card_management + @card_spend_dispute_management = card_spend_dispute_management + @cardholder_management = cardholder_management + @disable_stripe_user_authentication = disable_stripe_user_authentication + @spend_control_management = spend_control_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class NotificationBanner < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PaymentDetails < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_accessor :refund_management + + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ) + super + @capture_payments = capture_payments + @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management + @dispute_management = dispute_management + @refund_management = refund_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PaymentMethodSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Payments < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_accessor :refund_management + + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ) + super + @capture_payments = capture_payments + @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management + @dispute_management = dispute_management + @refund_management = refund_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Payouts < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :standard_payouts + + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @edit_payout_schedule = edit_payout_schedule + @external_account_collection = external_account_collection + @instant_payouts = instant_payouts + @standard_payouts = standard_payouts + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PayoutsList < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Recipients < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow sending money. + attr_accessor :send_money + + def initialize(send_money: nil) + super + @send_money = send_money + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # Attribute for param field features + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class ReportingChart < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class TaxRegistrations < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class TaxSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + # Configuration for the account management embedded component. + attr_accessor :account_management + # Configuration for the account onboarding embedded component. + attr_accessor :account_onboarding + # Configuration for the app install component. + attr_accessor :app_install + # Configuration for the app viewport component. + attr_accessor :app_viewport + # Configuration for the balances embedded component. + attr_accessor :balances + # Configuration for the capital financing embedded component. + attr_accessor :capital_financing + # Configuration for the capital financing application embedded component. + attr_accessor :capital_financing_application + # Configuration for the capital financing promotion embedded component. + attr_accessor :capital_financing_promotion + # Configuration for the capital overview embedded component. + attr_accessor :capital_overview + # Configuration for the documents embedded component. + attr_accessor :documents + # Configuration for the financial account component. + attr_accessor :financial_account + # Configuration for the financial account transactions component. + attr_accessor :financial_account_transactions + # Configuration for the issuing card component. + attr_accessor :issuing_card + # Configuration for the issuing cards list component. + attr_accessor :issuing_cards_list + # Configuration for the notification banner embedded component. + attr_accessor :notification_banner + # Configuration for the payment details embedded component. + attr_accessor :payment_details + # Configuration for the payment method settings embedded component. + attr_accessor :payment_method_settings + # Configuration for the payments embedded component. + attr_accessor :payments + # Configuration for the payouts embedded component. + attr_accessor :payouts + # Configuration for the payouts list embedded component. + attr_accessor :payouts_list + # Configuration for the recipients component. + attr_accessor :recipients + # Configuration for the reporting chart embedded component. + attr_accessor :reporting_chart + # Configuration for the tax registrations embedded component. + attr_accessor :tax_registrations + # Configuration for the tax settings embedded component. + attr_accessor :tax_settings + + def initialize( + account_management: nil, + account_onboarding: nil, + app_install: nil, + app_viewport: nil, + balances: nil, + capital_financing: nil, + capital_financing_application: nil, + capital_financing_promotion: nil, + capital_overview: nil, + documents: nil, + financial_account: nil, + financial_account_transactions: nil, + issuing_card: nil, + issuing_cards_list: nil, + notification_banner: nil, + payment_details: nil, + payment_method_settings: nil, + payments: nil, + payouts: nil, + payouts_list: nil, + recipients: nil, + reporting_chart: nil, + tax_registrations: nil, + tax_settings: nil + ) + super + @account_management = account_management + @account_onboarding = account_onboarding + @app_install = app_install + @app_viewport = app_viewport + @balances = balances + @capital_financing = capital_financing + @capital_financing_application = capital_financing_application + @capital_financing_promotion = capital_financing_promotion + @capital_overview = capital_overview + @documents = documents + @financial_account = financial_account + @financial_account_transactions = financial_account_transactions + @issuing_card = issuing_card + @issuing_cards_list = issuing_cards_list + @notification_banner = notification_banner + @payment_details = payment_details + @payment_method_settings = payment_method_settings + @payments = payments + @payouts = payouts + @payouts_list = payouts_list + @recipients = recipients + @reporting_chart = reporting_chart + @tax_registrations = tax_registrations + @tax_settings = tax_settings + end + end + # The identifier of the account to create an Account Session for. + attr_accessor :account + # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). + attr_accessor :components + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(account: nil, components: nil, expand: nil) + super + @account = account + @components = components + @expand = expand end - attr_reader :account_management, :account_onboarding, :balances, :capital_financing, :capital_financing_application, :capital_financing_promotion, :documents, :notification_banner, :payment_details, :payments, :payouts, :payouts_list, :tax_registrations, :tax_settings end # The ID of the account the AccountSession was created for attr_reader :account diff --git a/lib/stripe/resources/apple_pay_domain.rb b/lib/stripe/resources/apple_pay_domain.rb index 72e69dc1a..54575bb2f 100644 --- a/lib/stripe/resources/apple_pay_domain.rb +++ b/lib/stripe/resources/apple_pay_domain.rb @@ -13,6 +13,59 @@ def self.object_name "apple_pay_domain" end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + # Attribute for param field domain_name + attr_accessor :domain_name + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + domain_name: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @domain_name = domain_name + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Attribute for param field domain_name + attr_accessor :domain_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(domain_name: nil, expand: nil) + super + @domain_name = domain_name + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Attribute for field domain_name @@ -57,13 +110,8 @@ def delete(params = {}, opts = {}) end # List apple pay domains. - def self.list(filters = {}, opts = {}) - request_stripe_object( - method: :get, - path: "/v1/apple_pay/domains", - params: filters, - opts: opts - ) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/apple_pay/domains", params: params, opts: opts) end def self.resource_url diff --git a/lib/stripe/resources/application_fee.rb b/lib/stripe/resources/application_fee.rb index 1aeb9b833..792abca7d 100644 --- a/lib/stripe/resources/application_fee.rb +++ b/lib/stripe/resources/application_fee.rb @@ -14,7 +14,72 @@ def self.object_name nested_resource_class_methods :refund, operations: %i[create retrieve update list] class FeeSource < Stripe::StripeObject - attr_reader :charge, :payout, :type + # Charge ID that created this application fee. + attr_reader :charge + # Payout ID that created this application fee. + attr_reader :payout + # Type of object that created the application fee, either `charge` or `payout`. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return application fees for the charge specified by this charge ID. + attr_accessor :charge + # Only return applications fees that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # ID of the Stripe account this fee was taken from. attr_reader :account @@ -48,8 +113,8 @@ class FeeSource < Stripe::StripeObject attr_reader :refunds # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/application_fees", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/application_fees", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/apps/secret.rb b/lib/stripe/resources/apps/secret.rb index 22c3c44fe..c0b55956b 100644 --- a/lib/stripe/resources/apps/secret.rb +++ b/lib/stripe/resources/apps/secret.rb @@ -22,7 +22,134 @@ def self.object_name end class Scope < Stripe::StripeObject - attr_reader :type, :user + # The secret scope type. + attr_reader :type + # The user ID, if type is set to "user" + attr_reader :user + end + + class ListParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, scope: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @scope = scope + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + attr_accessor :expires_at + # A name for the secret that's unique within the scope. + attr_accessor :name + # The plaintext secret value to be stored. + attr_accessor :payload + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + + def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil) + super + @expand = expand + @expires_at = expires_at + @name = name + @payload = payload + @scope = scope + end + end + + class FindParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A name for the secret that's unique within the scope. + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + + def initialize(expand: nil, name: nil, scope: nil) + super + @expand = expand + @name = name + @scope = scope + end + end + + class DeleteWhereParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A name for the secret that's unique within the scope. + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + + def initialize(expand: nil, name: nil, scope: nil) + super + @expand = expand + @name = name + @scope = scope + end end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -69,8 +196,8 @@ def self.find(params = {}, opts = {}) end # List all secrets stored on the given scope. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/apps/secrets", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/apps/secrets", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/balance.rb b/lib/stripe/resources/balance.rb index 34817c27c..ccdecba26 100644 --- a/lib/stripe/resources/balance.rb +++ b/lib/stripe/resources/balance.rb @@ -21,47 +21,120 @@ def self.object_name class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end class ConnectReserved < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end class InstantAvailable < Stripe::StripeObject class NetAvailable < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :destination, :source_types + # Net balance amount, subtracting fees from platform-set pricing. + attr_reader :amount + # ID of the external account for this net balance (not expandable). + attr_reader :destination + # Attribute for field source_types + attr_reader :source_types end class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :net_available, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Breakdown of balance by destination. + attr_reader :net_available + # Attribute for field source_types + attr_reader :source_types end class Issuing < Stripe::StripeObject class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx end - attr_reader :amount, :currency, :source_types + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types end + # Funds that are available for use. attr_reader :available end class Pending < Stripe::StripeObject class SourceTypes < Stripe::StripeObject - attr_reader :bank_account, :card, :fpx + # Amount for bank account. + attr_reader :bank_account + # Amount for card. + attr_reader :card + # Amount for FPX. + attr_reader :fpx + end + # Balance amount. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Attribute for field source_types + attr_reader :source_types + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :amount, :currency, :source_types end # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. attr_reader :available diff --git a/lib/stripe/resources/balance_transaction.rb b/lib/stripe/resources/balance_transaction.rb index ab3659ebc..35ff369fc 100644 --- a/lib/stripe/resources/balance_transaction.rb +++ b/lib/stripe/resources/balance_transaction.rb @@ -15,7 +15,88 @@ def self.object_name end class FeeDetail < Stripe::StripeObject - attr_reader :amount, :application, :currency, :description, :type + # Amount of the fee, in cents. + attr_reader :amount + # ID of the Connect application that earned the fee. + attr_reader :application + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return transactions that were created during the given date interval. + attr_accessor :created + # Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + attr_accessor :payout + # Only returns the original transaction. + attr_accessor :source + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + attr_accessor :type + + def initialize( + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + payout: nil, + source: nil, + starting_after: nil, + type: nil + ) + super + @created = created + @currency = currency + @ending_before = ending_before + @expand = expand + @limit = limit + @payout = payout + @source = source + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. attr_reader :amount @@ -51,11 +132,11 @@ class FeeDetail < Stripe::StripeObject # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. # # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/balance_transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/bank_account.rb b/lib/stripe/resources/bank_account.rb index 180b1d218..5675db257 100644 --- a/lib/stripe/resources/bank_account.rb +++ b/lib/stripe/resources/bank_account.rb @@ -21,16 +21,40 @@ def self.object_name class FutureRequirements < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :currently_due, :errors, :past_due, :pending_verification + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :currently_due, :errors, :past_due, :pending_verification + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end # The ID of the account that the bank account is associated with. attr_reader :account @@ -139,7 +163,7 @@ def delete(params = {}, opts = {}) ) end - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) raise NotImplementedError, "Bank accounts cannot be listed without a customer ID or an " \ "account ID. List bank accounts using " \ diff --git a/lib/stripe/resources/billing/alert.rb b/lib/stripe/resources/billing/alert.rb index e2e9a8b67..d390342ff 100644 --- a/lib/stripe/resources/billing/alert.rb +++ b/lib/stripe/resources/billing/alert.rb @@ -15,9 +15,140 @@ def self.object_name class UsageThreshold < Stripe::StripeObject class Filter < Stripe::StripeObject - attr_reader :customer, :type + # Limit the scope of the alert to this customer ID + attr_reader :customer + # Attribute for field type + attr_reader :type + end + # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. + attr_reader :filters + # The value at which this alert will trigger. + attr_reader :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + attr_reader :meter + # Defines how the alert will behave. + attr_reader :recurrence + end + + class ListParams < Stripe::RequestParams + # Filter results to only include this type of alert. + attr_accessor :alert_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filter results to only include alerts with the given meter. + attr_accessor :meter + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + alert_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + meter: nil, + starting_after: nil + ) + super + @alert_type = alert_type + @ending_before = ending_before + @expand = expand + @limit = limit + @meter = meter + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class UsageThreshold < Stripe::RequestParams + class Filter < Stripe::RequestParams + # Limit the scope to this usage alert only to this customer. + attr_accessor :customer + # What type of filter is being applied to this usage alert. + attr_accessor :type + + def initialize(customer: nil, type: nil) + super + @customer = customer + @type = type + end + end + # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. + attr_accessor :filters + # Defines at which value the alert will fire. + attr_accessor :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + attr_accessor :meter + # Whether the alert should only fire only once, or once per billing cycle. + attr_accessor :recurrence + + def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil) + super + @filters = filters + @gte = gte + @meter = meter + @recurrence = recurrence + end + end + # The type of alert to create. + attr_accessor :alert_type + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The title of the alert. + attr_accessor :title + # The configuration of the usage threshold. + attr_accessor :usage_threshold + + def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil) + super + @alert_type = alert_type + @expand = expand + @title = title + @usage_threshold = usage_threshold + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :filters, :gte, :meter, :recurrence end # Defines the type of the alert. attr_reader :alert_type @@ -100,8 +231,8 @@ def self.deactivate(id, params = {}, opts = {}) end # Lists billing active and inactive alerts - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/alerts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/alerts", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/billing/credit_balance_summary.rb b/lib/stripe/resources/billing/credit_balance_summary.rb index f3684f8dd..1c9a7f015 100644 --- a/lib/stripe/resources/billing/credit_balance_summary.rb +++ b/lib/stripe/resources/billing/credit_balance_summary.rb @@ -13,18 +13,73 @@ def self.object_name class Balance < Stripe::StripeObject class AvailableBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class LedgerBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type + end + # Attribute for field available_balance + attr_reader :available_balance + # Attribute for field ledger_balance + attr_reader :ledger_balance + end + + class RetrieveParams < Stripe::RequestParams + class Filter < Stripe::RequestParams + class ApplicabilityScope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + attr_accessor :price_type + + def initialize(price_type: nil) + super + @price_type = price_type + end + end + # The billing credit applicability scope for which to fetch credit balance summary. + attr_accessor :applicability_scope + # The credit grant for which to fetch credit balance summary. + attr_accessor :credit_grant + # Specify the type of this filter. + attr_accessor :type + + def initialize(applicability_scope: nil, credit_grant: nil, type: nil) + super + @applicability_scope = applicability_scope + @credit_grant = credit_grant + @type = type + end + end + # The customer for which to fetch credit balance summary. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The filter criteria for the credit balance summary. + attr_accessor :filter + + def initialize(customer: nil, expand: nil, filter: nil) + super + @customer = customer + @expand = expand + @filter = filter end - attr_reader :available_balance, :ledger_balance end # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. attr_reader :balances diff --git a/lib/stripe/resources/billing/credit_balance_transaction.rb b/lib/stripe/resources/billing/credit_balance_transaction.rb index ba740b821..2566f7240 100644 --- a/lib/stripe/resources/billing/credit_balance_transaction.rb +++ b/lib/stripe/resources/billing/credit_balance_transaction.rb @@ -15,29 +15,99 @@ def self.object_name class Credit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class CreditsApplicationInvoiceVoided < Stripe::StripeObject - attr_reader :invoice, :invoice_line_item + # The invoice to which the reinstated billing credits were originally applied. + attr_reader :invoice + # The invoice line item to which the reinstated billing credits were originally applied. + attr_reader :invoice_line_item end - attr_reader :amount, :credits_application_invoice_voided, :type + # Attribute for field amount + attr_reader :amount + # Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. + attr_reader :credits_application_invoice_voided + # The type of credit transaction. + attr_reader :type end class Debit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class CreditsApplied < Stripe::StripeObject - attr_reader :invoice, :invoice_line_item + # The invoice to which the billing credits were applied. + attr_reader :invoice + # The invoice line item to which the billing credits were applied. + attr_reader :invoice_line_item + end + # Attribute for field amount + attr_reader :amount + # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. + attr_reader :credits_applied + # The type of debit transaction. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + # The credit grant for which to fetch credit balance transactions. + attr_accessor :credit_grant + # The customer for which to fetch credit balance transactions. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + credit_grant: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @credit_grant = credit_grant + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :amount, :credits_applied, :type end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -61,11 +131,11 @@ class CreditsApplied < Stripe::StripeObject attr_reader :type # Retrieve a list of credit balance transactions. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_balance_transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/billing/credit_grant.rb b/lib/stripe/resources/billing/credit_grant.rb index 19c831c36..a41ccf6c1 100644 --- a/lib/stripe/resources/billing/credit_grant.rb +++ b/lib/stripe/resources/billing/credit_grant.rb @@ -18,17 +18,186 @@ def self.object_name class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount. + attr_reader :value end - attr_reader :monetary, :type + # The monetary amount. + attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. + attr_reader :type end class ApplicabilityConfig < Stripe::StripeObject class Scope < Stripe::StripeObject + # The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. attr_reader :price_type end + # Attribute for field scope attr_reader :scope end + + class ListParams < Stripe::RequestParams + # Only return credit grants for this customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + class Monetary < Stripe::RequestParams + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + attr_accessor :currency + # A positive integer representing the amount of the credit grant. + attr_accessor :value + + def initialize(currency: nil, value: nil) + super + @currency = currency + @value = value + end + end + # The monetary amount. + attr_accessor :monetary + # Specify the type of this amount. We currently only support `monetary` billing credits. + attr_accessor :type + + def initialize(monetary: nil, type: nil) + super + @monetary = monetary + @type = type + end + end + + class ApplicabilityConfig < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + attr_accessor :price_type + + def initialize(price_type: nil) + super + @price_type = price_type + end + end + # Specify the scope of this applicability config. + attr_accessor :scope + + def initialize(scope: nil) + super + @scope = scope + end + end + # Amount of this credit grant. + attr_accessor :amount + # Configuration specifying what this credit grant applies to. + attr_accessor :applicability_config + # The category of this credit grant. + attr_accessor :category + # ID of the customer to receive the billing credits. + attr_accessor :customer + # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The time when the billing credits expire. If not specified, the billing credits don't expire. + attr_accessor :expires_at + # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + attr_accessor :metadata + # A descriptive name shown in the Dashboard. + attr_accessor :name + + def initialize( + amount: nil, + applicability_config: nil, + category: nil, + customer: nil, + effective_at: nil, + expand: nil, + expires_at: nil, + metadata: nil, + name: nil + ) + super + @amount = amount + @applicability_config = applicability_config + @category = category + @customer = customer + @effective_at = effective_at + @expand = expand + @expires_at = expires_at + @metadata = metadata + @name = name + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. + attr_accessor :expires_at + # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + attr_accessor :metadata + + def initialize(expand: nil, expires_at: nil, metadata: nil) + super + @expand = expand + @expires_at = expires_at + @metadata = metadata + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class VoidGrantParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Attribute for field amount attr_reader :amount # Attribute for field applicability_config @@ -91,11 +260,11 @@ def self.expire(id, params = {}, opts = {}) end # Retrieve a list of credit grants. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing/credit_grants", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/billing/meter.rb b/lib/stripe/resources/billing/meter.rb index 3a96a0013..025062f10 100644 --- a/lib/stripe/resources/billing/meter.rb +++ b/lib/stripe/resources/billing/meter.rb @@ -22,20 +22,165 @@ def self.object_name resource_plural: "event_summaries" class CustomerMapping < Stripe::StripeObject - attr_reader :event_payload_key, :type + # The key in the meter event payload to use for mapping the event to a customer. + attr_reader :event_payload_key + # The method for mapping a meter event to a customer. + attr_reader :type end class DefaultAggregation < Stripe::StripeObject + # Specifies how events are aggregated. attr_reader :formula end class StatusTransitions < Stripe::StripeObject + # The time the meter was deactivated, if any. Measured in seconds since Unix epoch. attr_reader :deactivated_at end class ValueSettings < Stripe::StripeObject + # The key in the meter event payload to use as the value for this meter. attr_reader :event_payload_key end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Filter results to only include meters with the given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class CustomerMapping < Stripe::RequestParams + # The key in the meter event payload to use for mapping the event to a customer. + attr_accessor :event_payload_key + # The method for mapping a meter event to a customer. Must be `by_id`. + attr_accessor :type + + def initialize(event_payload_key: nil, type: nil) + super + @event_payload_key = event_payload_key + @type = type + end + end + + class DefaultAggregation < Stripe::RequestParams + # Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value. + attr_accessor :formula + + def initialize(formula: nil) + super + @formula = formula + end + end + + class ValueSettings < Stripe::RequestParams + # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". + attr_accessor :event_payload_key + + def initialize(event_payload_key: nil) + super + @event_payload_key = event_payload_key + end + end + # Fields that specify how to map a meter event to a customer. + attr_accessor :customer_mapping + # The default settings to aggregate a meter's events with. + attr_accessor :default_aggregation + # The meter’s name. Not visible to the customer. + attr_accessor :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + attr_accessor :event_name + # The time window to pre-aggregate meter events for, if any. + attr_accessor :event_time_window + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Fields that specify how to calculate a meter event's value. + attr_accessor :value_settings + + def initialize( + customer_mapping: nil, + default_aggregation: nil, + display_name: nil, + event_name: nil, + event_time_window: nil, + expand: nil, + value_settings: nil + ) + super + @customer_mapping = customer_mapping + @default_aggregation = default_aggregation + @display_name = display_name + @event_name = event_name + @event_time_window = event_time_window + @expand = expand + @value_settings = value_settings + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # The meter’s name. Not visible to the customer. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(display_name: nil, expand: nil) + super + @display_name = display_name + @expand = expand + end + end + + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Attribute for field customer_mapping @@ -89,8 +234,8 @@ def self.deactivate(id, params = {}, opts = {}) end # Retrieve a list of billing meters. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/meters", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/meters", params: params, opts: opts) end # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. diff --git a/lib/stripe/resources/billing/meter_error_report.rb b/lib/stripe/resources/billing/meter_error_report.rb index 3523ed1bb..53d174875 100644 --- a/lib/stripe/resources/billing/meter_error_report.rb +++ b/lib/stripe/resources/billing/meter_error_report.rb @@ -13,17 +13,32 @@ class Reason < Stripe::StripeObject class ErrorType < Stripe::StripeObject class SampleError < Stripe::StripeObject class ApiRequest < Stripe::StripeObject - attr_reader :id, :idempotency_key + # Unique identifier for the object. + attr_reader :id + # idempotency_key of the request + attr_reader :idempotency_key end - attr_reader :api_request, :error_message + # Attribute for field api_request + attr_reader :api_request + # message of the error + attr_reader :error_message end + # Attribute for field sample_errors attr_reader :sample_errors end - attr_reader :error_count, :error_types + # The number of errors generated + attr_reader :error_count + # More information about errors + attr_reader :error_types end class RelatedObject < Stripe::StripeObject - attr_reader :id, :object, :url + # Unique identifier for the object. + attr_reader :id + # The type of meter error related object. Should be 'meter' + attr_reader :object + # The url of the meter object + attr_reader :url end # Unique identifier for the object. attr_reader :id diff --git a/lib/stripe/resources/billing/meter_event.rb b/lib/stripe/resources/billing/meter_event.rb index 535f73ca2..628339417 100644 --- a/lib/stripe/resources/billing/meter_event.rb +++ b/lib/stripe/resources/billing/meter_event.rb @@ -12,6 +12,27 @@ def self.object_name "billing.meter_event" end + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + attr_accessor :payload + # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. + attr_accessor :timestamp + + def initialize(event_name: nil, expand: nil, identifier: nil, payload: nil, timestamp: nil) + super + @event_name = event_name + @expand = expand + @identifier = identifier + @payload = payload + @timestamp = timestamp + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # The name of the meter event. Corresponds with the `event_name` field on a meter. diff --git a/lib/stripe/resources/billing/meter_event_adjustment.rb b/lib/stripe/resources/billing/meter_event_adjustment.rb index ae36332d9..ea1791927 100644 --- a/lib/stripe/resources/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/billing/meter_event_adjustment.rb @@ -13,8 +13,37 @@ def self.object_name end class Cancel < Stripe::StripeObject + # Unique identifier for the event. attr_reader :identifier end + + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + attr_accessor :identifier + + def initialize(identifier: nil) + super + @identifier = identifier + end + end + # Specifies which event to cancel. + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_accessor :type + + def initialize(cancel: nil, event_name: nil, expand: nil, type: nil) + super + @cancel = cancel + @event_name = event_name + @expand = expand + @type = type + end + end # Specifies which event to cancel. attr_reader :cancel # The name of the meter event. Corresponds with the `event_name` field on a meter. diff --git a/lib/stripe/resources/billing_portal/configuration.rb b/lib/stripe/resources/billing_portal/configuration.rb index 486fdcd23..5a5ce34c3 100644 --- a/lib/stripe/resources/billing_portal/configuration.rb +++ b/lib/stripe/resources/billing_portal/configuration.rb @@ -15,47 +15,567 @@ def self.object_name end class BusinessProfile < Stripe::StripeObject - attr_reader :headline, :privacy_policy_url, :terms_of_service_url + # The messaging shown to customers in the portal. + attr_reader :headline + # A link to the business’s publicly available privacy policy. + attr_reader :privacy_policy_url + # A link to the business’s publicly available terms of service. + attr_reader :terms_of_service_url end class Features < Stripe::StripeObject class CustomerUpdate < Stripe::StripeObject - attr_reader :allowed_updates, :enabled + # The types of customer updates that are supported. When empty, customers are not updateable. + attr_reader :allowed_updates + # Whether the feature is enabled. + attr_reader :enabled end class InvoiceHistory < Stripe::StripeObject + # Whether the feature is enabled. attr_reader :enabled end class PaymentMethodUpdate < Stripe::StripeObject + # Whether the feature is enabled. attr_reader :enabled end class SubscriptionCancel < Stripe::StripeObject class CancellationReason < Stripe::StripeObject - attr_reader :enabled, :options + # Whether the feature is enabled. + attr_reader :enabled + # Which cancellation reasons will be given as options to the customer. + attr_reader :options end - attr_reader :cancellation_reason, :enabled, :mode, :proration_behavior + # Attribute for field cancellation_reason + attr_reader :cancellation_reason + # Whether the feature is enabled. + attr_reader :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + attr_reader :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. + attr_reader :proration_behavior end class SubscriptionUpdate < Stripe::StripeObject class Product < Stripe::StripeObject - attr_reader :prices, :product + # The list of price IDs which, when subscribed to, a subscription can be updated. + attr_reader :prices + # The product ID. + attr_reader :product end class ScheduleAtPeriodEnd < Stripe::StripeObject class Condition < Stripe::StripeObject + # The type of condition. attr_reader :type end + # List of conditions. When any condition is true, an update will be scheduled at the end of the current period. attr_reader :conditions end - attr_reader :default_allowed_updates, :enabled, :products, :proration_behavior, :schedule_at_period_end + # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. + attr_reader :default_allowed_updates + # Whether the feature is enabled. + attr_reader :enabled + # The list of up to 10 products that support subscription updates. + attr_reader :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. + attr_reader :proration_behavior + # Attribute for field schedule_at_period_end + attr_reader :schedule_at_period_end end - attr_reader :customer_update, :invoice_history, :payment_method_update, :subscription_cancel, :subscription_update + # Attribute for field customer_update + attr_reader :customer_update + # Attribute for field invoice_history + attr_reader :invoice_history + # Attribute for field payment_method_update + attr_reader :payment_method_update + # Attribute for field subscription_cancel + attr_reader :subscription_cancel + # Attribute for field subscription_update + attr_reader :subscription_update end class LoginPage < Stripe::StripeObject - attr_reader :enabled, :url + # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + # + # If `false`, the previously generated `url`, if any, will be deactivated. + attr_reader :enabled + # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. + attr_reader :url + end + + class ListParams < Stripe::RequestParams + # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + attr_accessor :is_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + ending_before: nil, + expand: nil, + is_default: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @ending_before = ending_before + @expand = expand + @is_default = is_default + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + attr_accessor :terms_of_service_url + + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil) + super + @headline = headline + @privacy_policy_url = privacy_policy_url + @terms_of_service_url = terms_of_service_url + end + end + + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + attr_accessor :allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(allowed_updates: nil, enabled: nil) + super + @allowed_updates = allowed_updates + @enabled = enabled + end + end + + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + attr_accessor :options + + def initialize(enabled: nil, options: nil) + super + @enabled = enabled + @options = options + end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + attr_accessor :cancellation_reason + # Whether the feature is enabled. + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + attr_accessor :proration_behavior + + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ) + super + @cancellation_reason = cancellation_reason + @enabled = enabled + @mode = mode + @proration_behavior = proration_behavior + end + end + + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + attr_accessor :prices + # The product id. + attr_accessor :product + + def initialize(prices: nil, product: nil) + super + @prices = prices + @product = product + end + end + + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + attr_accessor :conditions + + def initialize(conditions: nil) + super + @conditions = conditions + end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + attr_accessor :schedule_at_period_end + + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ) + super + @default_allowed_updates = default_allowed_updates + @enabled = enabled + @products = products + @proration_behavior = proration_behavior + @schedule_at_period_end = schedule_at_period_end + end + end + # Information about updating the customer details in the portal. + attr_accessor :customer_update + # Information about showing the billing history in the portal. + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + attr_accessor :subscription_update + + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ) + super + @customer_update = customer_update + @invoice_history = invoice_history + @payment_method_update = payment_method_update + @subscription_cancel = subscription_cancel + @subscription_update = subscription_update + end + end + + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # The business information shown to customers in the portal. + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the features available in the portal. + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ) + super + @business_profile = business_profile + @default_return_url = default_return_url + @expand = expand + @features = features + @login_page = login_page + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + attr_accessor :terms_of_service_url + + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil) + super + @headline = headline + @privacy_policy_url = privacy_policy_url + @terms_of_service_url = terms_of_service_url + end + end + + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + attr_accessor :allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(allowed_updates: nil, enabled: nil) + super + @allowed_updates = allowed_updates + @enabled = enabled + end + end + + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + attr_accessor :options + + def initialize(enabled: nil, options: nil) + super + @enabled = enabled + @options = options + end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + attr_accessor :cancellation_reason + # Whether the feature is enabled. + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + attr_accessor :proration_behavior + + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ) + super + @cancellation_reason = cancellation_reason + @enabled = enabled + @mode = mode + @proration_behavior = proration_behavior + end + end + + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + attr_accessor :prices + # The product id. + attr_accessor :product + + def initialize(prices: nil, product: nil) + super + @prices = prices + @product = product + end + end + + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + attr_accessor :conditions + + def initialize(conditions: nil) + super + @conditions = conditions + end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + attr_accessor :schedule_at_period_end + + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ) + super + @default_allowed_updates = default_allowed_updates + @enabled = enabled + @products = products + @proration_behavior = proration_behavior + @schedule_at_period_end = schedule_at_period_end + end + end + # Information about updating the customer details in the portal. + attr_accessor :customer_update + # Information about showing the billing history in the portal. + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + attr_accessor :subscription_update + + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ) + super + @customer_update = customer_update + @invoice_history = invoice_history + @payment_method_update = payment_method_update + @subscription_cancel = subscription_cancel + @subscription_update = subscription_update + end + end + + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + # + # Set to `false` to deactivate the `login_page.url`. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # Whether the configuration is active and can be used to create portal sessions. + attr_accessor :active + # The business information shown to customers in the portal. + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the features available in the portal. + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + active: nil, + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ) + super + @active = active + @business_profile = business_profile + @default_return_url = default_return_url + @expand = expand + @features = features + @login_page = login_page + @metadata = metadata + end end # Whether the configuration is active and can be used to create portal sessions. attr_reader :active @@ -95,11 +615,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of configurations that describe the functionality of the customer portal. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/billing_portal/configurations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/billing_portal/session.rb b/lib/stripe/resources/billing_portal/session.rb index e8685da57..a651053de 100644 --- a/lib/stripe/resources/billing_portal/session.rb +++ b/lib/stripe/resources/billing_portal/session.rb @@ -28,40 +28,262 @@ def self.object_name class Flow < Stripe::StripeObject class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # A custom message to display to the customer after the flow is completed. attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the flow is completed. attr_reader :return_url end - attr_reader :hosted_confirmation, :redirect, :type + # Configuration when `after_completion.type=hosted_confirmation`. + attr_reader :hosted_confirmation + # Configuration when `after_completion.type=redirect`. + attr_reader :redirect + # The specified type of behavior after the flow is completed. + attr_reader :type end class SubscriptionCancel < Stripe::StripeObject class Retention < Stripe::StripeObject class CouponOffer < Stripe::StripeObject + # The ID of the coupon to be offered. attr_reader :coupon end - attr_reader :coupon_offer, :type + # Configuration when `retention.type=coupon_offer`. + attr_reader :coupon_offer + # Type of retention strategy that will be used. + attr_reader :type end - attr_reader :retention, :subscription + # Specify a retention strategy to be used in the cancellation flow. + attr_reader :retention + # The ID of the subscription to be canceled. + attr_reader :subscription end class SubscriptionUpdate < Stripe::StripeObject + # The ID of the subscription to be updated. attr_reader :subscription end class SubscriptionUpdateConfirm < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :coupon, :promotion_code + # The ID of the coupon to apply to this subscription update. + attr_reader :coupon + # The ID of a promotion code to apply to this subscription update. + attr_reader :promotion_code end class Item < Stripe::StripeObject - attr_reader :id, :price, :quantity + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + attr_reader :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + attr_reader :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + attr_reader :quantity + end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + attr_reader :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + attr_reader :items + # The ID of the subscription to be updated. + attr_reader :subscription + end + # Attribute for field after_completion + attr_reader :after_completion + # Configuration when `flow.type=subscription_cancel`. + attr_reader :subscription_cancel + # Configuration when `flow.type=subscription_update`. + attr_reader :subscription_update + # Configuration when `flow.type=subscription_update_confirm`. + attr_reader :subscription_update_confirm + # Type of flow that the customer will go through. + attr_reader :type + end + + class CreateParams < Stripe::RequestParams + class FlowData < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the flow is completed. + attr_accessor :custom_message + + def initialize(custom_message: nil) + super + @custom_message = custom_message + end + end + + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the flow is completed. + attr_accessor :return_url + + def initialize(return_url: nil) + super + @return_url = return_url + end + end + # Configuration when `after_completion.type=hosted_confirmation`. + attr_accessor :hosted_confirmation + # Configuration when `after_completion.type=redirect`. + attr_accessor :redirect + # The specified behavior after the flow is completed. + attr_accessor :type + + def initialize(hosted_confirmation: nil, redirect: nil, type: nil) + super + @hosted_confirmation = hosted_confirmation + @redirect = redirect + @type = type + end + end + + class SubscriptionCancel < Stripe::RequestParams + class Retention < Stripe::RequestParams + class CouponOffer < Stripe::RequestParams + # The ID of the coupon to be offered. + attr_accessor :coupon + + def initialize(coupon: nil) + super + @coupon = coupon + end + end + # Configuration when `retention.type=coupon_offer`. + attr_accessor :coupon_offer + # Type of retention strategy to use with the customer. + attr_accessor :type + + def initialize(coupon_offer: nil, type: nil) + super + @coupon_offer = coupon_offer + @type = type + end + end + # Specify a retention strategy to be used in the cancellation flow. + attr_accessor :retention + # The ID of the subscription to be canceled. + attr_accessor :subscription + + def initialize(retention: nil, subscription: nil) + super + @retention = retention + @subscription = subscription + end + end + + class SubscriptionUpdate < Stripe::RequestParams + # The ID of the subscription to be updated. + attr_accessor :subscription + + def initialize(subscription: nil) + super + @subscription = subscription + end end - attr_reader :discounts, :items, :subscription + + class SubscriptionUpdateConfirm < Stripe::RequestParams + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this subscription update. + attr_accessor :coupon + # The ID of a promotion code to apply to this subscription update. + attr_accessor :promotion_code + + def initialize(coupon: nil, promotion_code: nil) + super + @coupon = coupon + @promotion_code = promotion_code + end + end + + class Item < Stripe::RequestParams + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + attr_accessor :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + attr_accessor :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + attr_accessor :quantity + + def initialize(id: nil, price: nil, quantity: nil) + super + @id = id + @price = price + @quantity = quantity + end + end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + attr_accessor :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + attr_accessor :items + # The ID of the subscription to be updated. + attr_accessor :subscription + + def initialize(discounts: nil, items: nil, subscription: nil) + super + @discounts = discounts + @items = items + @subscription = subscription + end + end + # Behavior after the flow is completed. + attr_accessor :after_completion + # Configuration when `flow_data.type=subscription_cancel`. + attr_accessor :subscription_cancel + # Configuration when `flow_data.type=subscription_update`. + attr_accessor :subscription_update + # Configuration when `flow_data.type=subscription_update_confirm`. + attr_accessor :subscription_update_confirm + # Type of flow that the customer will go through. + attr_accessor :type + + def initialize( + after_completion: nil, + subscription_cancel: nil, + subscription_update: nil, + subscription_update_confirm: nil, + type: nil + ) + super + @after_completion = after_completion + @subscription_cancel = subscription_cancel + @subscription_update = subscription_update + @subscription_update_confirm = subscription_update_confirm + @type = type + end + end + # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. + attr_accessor :configuration + # The ID of an existing customer. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + attr_accessor :flow_data + # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + attr_accessor :locale + # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + attr_accessor :on_behalf_of + # The default URL to redirect customers to when they click on the portal's link to return to your website. + attr_accessor :return_url + + def initialize( + configuration: nil, + customer: nil, + expand: nil, + flow_data: nil, + locale: nil, + on_behalf_of: nil, + return_url: nil + ) + super + @configuration = configuration + @customer = customer + @expand = expand + @flow_data = flow_data + @locale = locale + @on_behalf_of = on_behalf_of + @return_url = return_url end - attr_reader :after_completion, :subscription_cancel, :subscription_update, :subscription_update_confirm, :type end # The configuration used by this session, describing the features available. attr_reader :configuration diff --git a/lib/stripe/resources/capability.rb b/lib/stripe/resources/capability.rb index 6daa7d6df..f845126e3 100644 --- a/lib/stripe/resources/capability.rb +++ b/lib/stripe/resources/capability.rb @@ -15,24 +15,70 @@ def self.object_name class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. + attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. + attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. + attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :current_deadline, :currently_due, :disabled_reason, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. + attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. + attr_reader :currently_due + # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). + attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end # The account for which the capability enables functionality. attr_reader :account diff --git a/lib/stripe/resources/capital/financing_offer.rb b/lib/stripe/resources/capital/financing_offer.rb index 28c5dee5c..1cb5e74f3 100644 --- a/lib/stripe/resources/capital/financing_offer.rb +++ b/lib/stripe/resources/capital/financing_offer.rb @@ -14,11 +14,109 @@ def self.object_name end class AcceptedTerms < Stripe::StripeObject - attr_reader :advance_amount, :currency, :fee_amount, :previous_financing_fee_discount_amount, :withhold_rate + # Amount of financing offered, in minor units. + attr_reader :advance_amount + # Currency that the financing offer is transacted in. For example, `usd`. + attr_reader :currency + # Fixed fee amount, in minor units. + attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount amount on remaining premium for the existing loan at payout time. + attr_reader :previous_financing_fee_discount_amount + # Per-transaction rate at which Stripe will withhold funds to repay the financing. + attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject - attr_reader :advance_amount, :campaign_type, :currency, :fee_amount, :previous_financing_fee_discount_rate, :withhold_rate + # Amount of financing offered, in minor units. + attr_reader :advance_amount + # Describes the type of user the offer is being extended to. + attr_reader :campaign_type + # Currency that the financing offer is transacted in. For example, `usd`. + attr_reader :currency + # Fixed fee amount, in minor units. + attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` + # is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate + # and the remaining fee. + attr_reader :previous_financing_fee_discount_rate + # Per-transaction rate at which Stripe will withhold funds to repay the financing. + attr_reader :withhold_rate + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # limit list to offers belonging to given connected account + attr_accessor :connected_account + # Only return offers that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # limit list to offers with given status + attr_accessor :status + + def initialize( + connected_account: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @connected_account = connected_account + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class MarkDeliveredParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents @@ -59,11 +157,11 @@ class OfferedTerms < Stripe::StripeObject attr_reader :type # Retrieves the financing offers available for Connected accounts that belong to your platform. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/capital/financing_offers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/capital/financing_summary.rb b/lib/stripe/resources/capital/financing_summary.rb index 187fe30e5..9662bd1c5 100644 --- a/lib/stripe/resources/capital/financing_summary.rb +++ b/lib/stripe/resources/capital/financing_summary.rb @@ -13,9 +13,42 @@ def self.object_name class Details < Stripe::StripeObject class CurrentRepaymentInterval < Stripe::StripeObject - attr_reader :due_at, :paid_amount, :remaining_amount + # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. + # Given in seconds since unix epoch. + attr_reader :due_at + # The amount that has already been paid in the current repayment interval. + attr_reader :paid_amount + # The amount that is yet to be paid in the current repayment interval. + attr_reader :remaining_amount + end + # Amount of financing offered, in minor units. + attr_reader :advance_amount + # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. + attr_reader :advance_paid_out_at + # Currency that the financing offer is transacted in. For example, `usd`. + attr_reader :currency + # The chronologically current repayment interval for the financing offer. + attr_reader :current_repayment_interval + # Fixed fee amount, in minor units. + attr_reader :fee_amount + # The amount the Connected account has paid toward the financing debt so far. + attr_reader :paid_amount + # The balance remaining to be paid on the financing, in minor units. + attr_reader :remaining_amount + # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. + attr_reader :repayments_begin_at + # Per-transaction rate at which Stripe will withhold funds to repay the financing. + attr_reader :withhold_rate + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :advance_amount, :advance_paid_out_at, :currency, :current_repayment_interval, :fee_amount, :paid_amount, :remaining_amount, :repayments_begin_at, :withhold_rate end # Additional information about the financing summary. Describes currency, advance amount, # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, diff --git a/lib/stripe/resources/capital/financing_transaction.rb b/lib/stripe/resources/capital/financing_transaction.rb index 77a156cc4..3d8957e72 100644 --- a/lib/stripe/resources/capital/financing_transaction.rb +++ b/lib/stripe/resources/capital/financing_transaction.rb @@ -14,9 +14,78 @@ def self.object_name class Details < Stripe::StripeObject class Transaction < Stripe::StripeObject - attr_reader :charge, :treasury_transaction + # The linked payment ID. + attr_reader :charge + # The linked Treasury Financing Transaction ID. + attr_reader :treasury_transaction + end + # The advance amount being repaid, paid out, or reversed in minor units. + attr_reader :advance_amount + # The currency of the financing transaction. + attr_reader :currency + # The fee amount being repaid, paid out, or reversed in minor units. + attr_reader :fee_amount + # The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. + attr_reader :linked_payment + # The reason for the financing transaction (if applicable). + attr_reader :reason + # The reversed transaction. This field only applies to financing + # transactions of type `reversal`. + attr_reader :reversed_transaction + # The advance and fee amount being repaid, paid out, or reversed in minor units. + attr_reader :total_amount + # This is an object representing a linked transaction on a Capital Financing Transaction. + attr_reader :transaction + end + + class ListParams < Stripe::RequestParams + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. + attr_accessor :charge + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns transactions that were created that apply to this financing offer ID. + attr_accessor :financing_offer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only returns transactions that are responsible for reversing this financing transaction ID. + attr_accessor :reversed_transaction + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. + attr_accessor :treasury_transaction + + def initialize( + charge: nil, + ending_before: nil, + expand: nil, + financing_offer: nil, + limit: nil, + reversed_transaction: nil, + starting_after: nil, + treasury_transaction: nil + ) + super + @charge = charge + @ending_before = ending_before + @expand = expand + @financing_offer = financing_offer + @limit = limit + @reversed_transaction = reversed_transaction + @starting_after = starting_after + @treasury_transaction = treasury_transaction + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :advance_amount, :currency, :fee_amount, :linked_payment, :reason, :reversed_transaction, :total_amount, :transaction end # The ID of the merchant associated with this financing transaction. attr_reader :account @@ -43,11 +112,11 @@ class Transaction < Stripe::StripeObject # Returns a list of financing transactions. The transactions are returned in sorted order, # with the most recent transactions appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/capital/financing_transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/card.rb b/lib/stripe/resources/card.rb index 12e5ad8bb..d61bb4dc7 100644 --- a/lib/stripe/resources/card.rb +++ b/lib/stripe/resources/card.rb @@ -18,6 +18,7 @@ def self.object_name end class Networks < Stripe::StripeObject + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. attr_reader :preferred end # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. @@ -134,7 +135,7 @@ def delete(params = {}, opts = {}) ) end - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) raise NotImplementedError, "Cards cannot be listed without a customer ID or an account " \ "ID. List cards using `Customer.list_sources(" \ diff --git a/lib/stripe/resources/cash_balance.rb b/lib/stripe/resources/cash_balance.rb index 6f93dca8a..e46d8b01a 100644 --- a/lib/stripe/resources/cash_balance.rb +++ b/lib/stripe/resources/cash_balance.rb @@ -10,7 +10,10 @@ def self.object_name end class Settings < Stripe::StripeObject - attr_reader :reconciliation_mode, :using_merchant_default + # The configuration for how funds that land in the customer cash balance are reconciled. + attr_reader :reconciliation_mode + # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance + attr_reader :using_merchant_default end # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :available diff --git a/lib/stripe/resources/charge.rb b/lib/stripe/resources/charge.rb index f1b512489..5d5f57483 100644 --- a/lib/stripe/resources/charge.rb +++ b/lib/stripe/resources/charge.rb @@ -22,52 +22,155 @@ def self.object_name class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address. + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name + # Billing phone number (including extension). + attr_reader :phone end class FraudDetails < Stripe::StripeObject - attr_reader :stripe_report, :user_report + # Assessments from Stripe. If set, the value is `fraudulent`. + attr_reader :stripe_report + # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. + attr_reader :user_report end class Level3 < Stripe::StripeObject class LineItem < Stripe::StripeObject - attr_reader :discount_amount, :product_code, :product_description, :quantity, :tax_amount, :unit_cost + # Attribute for field discount_amount + attr_reader :discount_amount + # Attribute for field product_code + attr_reader :product_code + # Attribute for field product_description + attr_reader :product_description + # Attribute for field quantity + attr_reader :quantity + # Attribute for field tax_amount + attr_reader :tax_amount + # Attribute for field unit_cost + attr_reader :unit_cost end - attr_reader :customer_reference, :line_items, :merchant_reference, :shipping_address_zip, :shipping_amount, :shipping_from_zip + # Attribute for field customer_reference + attr_reader :customer_reference + # Attribute for field line_items + attr_reader :line_items + # Attribute for field merchant_reference + attr_reader :merchant_reference + # Attribute for field shipping_address_zip + attr_reader :shipping_address_zip + # Attribute for field shipping_amount + attr_reader :shipping_amount + # Attribute for field shipping_from_zip + attr_reader :shipping_from_zip end class Outcome < Stripe::StripeObject class Rule < Stripe::StripeObject - attr_reader :action, :id, :predicate + # The action taken on the payment. + attr_reader :action + # Unique identifier for the object. + attr_reader :id + # The predicate to evaluate the payment against. + attr_reader :predicate end - attr_reader :network_advice_code, :network_decline_code, :network_status, :reason, :risk_level, :risk_score, :rule, :seller_message, :type + # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. + attr_reader :network_advice_code + # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code + # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. + attr_reader :network_status + # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. + attr_reader :reason + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. + attr_reader :risk_level + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. + attr_reader :risk_score + # The ID of the Radar rule that matched the payment, if applicable. + attr_reader :rule + # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. + attr_reader :seller_message + # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. + attr_reader :type end class PaymentMethodDetails < Stripe::StripeObject class AchCreditTransfer < Stripe::StripeObject - attr_reader :account_number, :bank_name, :routing_number, :swift_code + # Account number to transfer funds to. + attr_reader :account_number + # Name of the bank associated with the routing number. + attr_reader :bank_name + # Routing transit number for the bank account to transfer funds to. + attr_reader :routing_number + # SWIFT code of the bank associated with the routing number. + attr_reader :swift_code end class AchDebit < Stripe::StripeObject - attr_reader :account_holder_type, :bank_name, :country, :fingerprint, :last4, :routing_number + # Type of entity that holds the account. This can be either `individual` or `company`. + attr_reader :account_holder_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Routing transit number of the bank account. + attr_reader :routing_number end class AcssDebit < Stripe::StripeObject - attr_reader :bank_name, :fingerprint, :institution_number, :last4, :mandate, :transit_number + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Institution number of the bank account + attr_reader :institution_number + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # Transit number of the bank account. + attr_reader :transit_number end class Affirm < Stripe::StripeObject + # The Affirm transaction ID associated with this payment. attr_reader :transaction_id end class AfterpayClearpay < Stripe::StripeObject - attr_reader :order_id, :reference + # The Afterpay order ID associated with this payment intent. + attr_reader :order_id + # Order identifier shown to the merchant in Afterpay’s online portal. + attr_reader :reference end class Alipay < Stripe::StripeObject - attr_reader :buyer_id, :fingerprint, :transaction_id + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + attr_reader :buyer_id + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. + attr_reader :fingerprint + # Transaction ID of this particular Alipay transaction. + attr_reader :transaction_id end class Alma < Stripe::StripeObject; end @@ -75,75 +178,164 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject - attr_reader :brand, :country, :exp_month, :exp_year, :funding, :last4 + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # The last four digits of the card. + attr_reader :last4 end - attr_reader :card, :type + # Attribute for field card + attr_reader :card + # funding type of the underlying payment method. + attr_reader :type end + # Attribute for field funding attr_reader :funding end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4, :mandate + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate end class BacsDebit < Stripe::StripeObject - attr_reader :fingerprint, :last4, :mandate, :sort_code + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # Sort code of the bank account. (e.g., `10-20-30`) + attr_reader :sort_code end class Bancontact < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class Blik < Stripe::StripeObject + # A unique and immutable identifier assigned by BLIK to every buyer. attr_reader :buyer_id end class Boleto < Stripe::StripeObject + # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class DecrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the decremental authorization feature is supported. attr_reader :status end class ExtendedAuthorization < Stripe::StripeObject + # Indicates whether or not the capture window is extended beyond the standard authorization. attr_reader :status end class IncrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the incremental authorization feature is supported. attr_reader :status end class Installments < Stripe::StripeObject class Plan < Stripe::StripeObject - attr_reader :count, :interval, :type + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_reader :interval + # Type of installment plan, one of `fixed_count`. + attr_reader :type end + # Installment plan selected for the payment. attr_reader :plan end class Multicapture < Stripe::StripeObject + # Indicates whether or not multiple captures are supported. attr_reader :status end class NetworkToken < Stripe::StripeObject + # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. attr_reader :used end class Overcapture < Stripe::StripeObject - attr_reader :maximum_amount_capturable, :status + # The maximum amount that can be captured. + attr_reader :maximum_amount_capturable + # Indicates whether or not the authorized amount can be over-captured. + attr_reader :status end class PartialAuthorization < Stripe::StripeObject + # Indicates whether the transaction requested for partial authorization feature and the authorization outcome. attr_reader :status end class ThreeDSecure < Stripe::StripeObject - attr_reader :authentication_flow, :electronic_commerce_indicator, :exemption_indicator, :exemption_indicator_applied, :result, :result_reason, :transaction_id, :version + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. + attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. + attr_reader :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_reader :exemption_indicator + # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + # the outcome of Stripe's internal risk assessment. + attr_reader :exemption_indicator_applied + # Indicates the outcome of 3D Secure authentication. + attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. + attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. + attr_reader :transaction_id + # The version of 3D Secure that was used. + attr_reader :version end class Wallet < Stripe::StripeObject @@ -154,112 +346,439 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end - attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + # Attribute for field amex_express_checkout + attr_reader :amex_express_checkout + # Attribute for field apple_pay + attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field link + attr_reader :link + # Attribute for field masterpass + attr_reader :masterpass + # Attribute for field samsung_pay + attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type + # Attribute for field visa_checkout + attr_reader :visa_checkout end - attr_reader :amount_authorized, :amount_requested, :authorization_code, :brand, :capture_before, :checks, :country, :decremental_authorization, :description, :exp_month, :exp_year, :extended_authorization, :fingerprint, :funding, :iin, :incremental_authorization, :installments, :issuer, :last4, :mandate, :moto, :multicapture, :network, :network_token, :network_transaction_id, :overcapture, :partial_authorization, :regulated_status, :three_d_secure, :wallet + # The authorized amount. + attr_reader :amount_authorized + # The latest amount intended to be authorized by this charge. + attr_reader :amount_requested + # Authorization code on the charge. + attr_reader :authorization_code + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # Check results by Card networks on Card address and CVC at time of payment. + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Attribute for field decremental_authorization + attr_reader :decremental_authorization + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Attribute for field extended_authorization + attr_reader :extended_authorization + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Attribute for field incremental_authorization + attr_reader :incremental_authorization + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_reader :installments + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # ID of the mandate used to make this payment or created by it. + attr_reader :mandate + # True if this payment was marked as MOTO and out of scope for SCA. + attr_reader :moto + # Attribute for field multicapture + attr_reader :multicapture + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # If this card has network token credentials, this contains the details of the network token credentials. + attr_reader :network_token + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Attribute for field overcapture + attr_reader :overcapture + # Attribute for field partial_authorization + attr_reader :partial_authorization + # Status of a card based on the card issuer. + attr_reader :regulated_status + # Populated if this transaction used 3D Secure authentication. + attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + # The authorized amount + attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Details about payments collected offline. + attr_reader :offline + # Defines whether the authorized amount can be over-captured or not + attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt + # Attribute for field wallet + attr_reader :wallet end class Cashapp < Stripe::StripeObject - attr_reader :buyer_id, :cashtag + # A unique and immutable identifier assigned by Cash App to every buyer. + attr_reader :buyer_id + # A public identifier for buyers using Cash App. + attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject - attr_reader :bank, :verified_name + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. + attr_reader :bank + # Owner's verified full name. Values are verified or provided by EPS directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # EPS rarely provides this information so the attribute is usually empty. + attr_reader :verified_name end class Fpx < Stripe::StripeObject - attr_reader :account_holder_type, :bank, :transaction_id + # Account holder type, if provided. Can be one of `individual` or `company`. + attr_reader :account_holder_type + # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + attr_reader :bank + # Unique transaction id generated by FPX for every request from the merchant + attr_reader :transaction_id end class Giropay < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # Owner's verified full name. Values are verified or provided by Giropay directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Giropay rarely provides this information so the attribute is usually empty. + attr_reader :verified_name end class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject + # Unique transaction id generated by GrabPay attr_reader :transaction_id end class IdBankTransfer < Stripe::StripeObject - attr_reader :account_number, :bank, :bank_code, :bank_name, :display_name + # Account number of the bank account to transfer funds to. + attr_reader :account_number + # Bank where the account is located. + attr_reader :bank + # Local bank code of the bank. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end - attr_reader :brand, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :issuer, :last4, :network, :network_transaction_id, :preferred_locales, :read_method, :receipt + # Card brand. Can be `interac`, `mastercard` or `visa`. + attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt end class KakaoPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Klarna < Stripe::StripeObject class PayerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # The payer address country attr_reader :country end + # The payer's address attr_reader :address end - attr_reader :payer_details, :payment_method_category, :preferred_locale + # The payer details for this transaction. + attr_reader :payer_details + # The Klarna payment method used for this transaction. + # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` + attr_reader :payment_method_category + # Preferred language of the Klarna authorization page that the customer is redirected to. + # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` + attr_reader :preferred_locale end class Konbini < Stripe::StripeObject class Store < Stripe::StripeObject + # The name of the convenience store chain where the payment was completed. attr_reader :chain end + # If the payment succeeded, this contains the details of the convenience store where the payment was completed. attr_reader :store end class KrCard < Stripe::StripeObject - attr_reader :brand, :buyer_id, :last4 + # The local credit or debit card brand. + attr_reader :brand + # A unique identifier for the buyer as determined by the local payment processor. + attr_reader :buyer_id + # The last four digits of the card. This may not be present for American Express cards. + attr_reader :last4 end class Link < Stripe::StripeObject + # Two-letter ISO code representing the funding source country beneath the Link payment. + # You could use this attribute to get a sense of international fees. attr_reader :country end @@ -267,59 +786,142 @@ class MbWay < Stripe::StripeObject; end class Mobilepay < Stripe::StripeObject class Card < Stripe::StripeObject - attr_reader :brand, :country, :exp_month, :exp_year, :last4 + # Brand of the card used in the transaction + attr_reader :brand + # Two-letter ISO code representing the country of the card + attr_reader :country + # Two digit number representing the card's expiration month + attr_reader :exp_month + # Two digit number representing the card's expiration year + attr_reader :exp_year + # The last 4 digits of the card + attr_reader :last4 end + # Internal card details attr_reader :card end class Multibanco < Stripe::StripeObject - attr_reader :entity, :reference + # Entity number associated with this Multibanco payment. + attr_reader :entity + # Reference number associated with this Multibanco payment. + attr_reader :reference end class NaverPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Oxxo < Stripe::StripeObject + # OXXO reference number attr_reader :number end class P24 < Stripe::StripeObject - attr_reader :bank, :reference, :verified_name + # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. + attr_reader :bank + # Unique reference for this Przelewy24 payment. + attr_reader :reference + # Owner's verified full name. Values are verified or provided by Przelewy24 directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Przelewy24 rarely provides this information so the attribute is usually empty. + attr_reader :verified_name end class Payco < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class Paynow < Stripe::StripeObject + # Reference number associated with this PayNow payment attr_reader :reference end class Paypal < Stripe::StripeObject class SellerProtection < Stripe::StripeObject - attr_reader :dispute_categories, :status + # An array of conditions that are covered for the transaction, if applicable. + attr_reader :dispute_categories + # Indicates whether the transaction is eligible for PayPal's seller protection. + attr_reader :status end class Shipping < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class VerifiedAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :payer_email, :payer_id, :payer_name, :seller_protection, :shipping, :transaction_id, :verified_address, :verified_email, :verified_name + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's full name. Values provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_name + # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. + attr_reader :seller_protection + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. + attr_reader :shipping + # A unique ID generated by PayPal for this transaction. + attr_reader :transaction_id + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. + attr_reader :verified_address + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email + # Owner's verified full name. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class Payto < Stripe::StripeObject - attr_reader :bsb_number, :last4, :mandate, :pay_id + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The PayID alias for the bank account. + attr_reader :pay_id end class Pix < Stripe::StripeObject + # Unique transaction id generated by BCB attr_reader :bank_transaction_id end class Promptpay < Stripe::StripeObject + # Bill reference generated by PromptPay attr_reader :reference end @@ -329,66 +931,2089 @@ class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject - attr_reader :brand, :country, :exp_month, :exp_year, :funding, :last4 + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # The last four digits of the card. + attr_reader :last4 end - attr_reader :card, :type + # Attribute for field card + attr_reader :card + # funding type of the underlying payment method. + attr_reader :type end + # Attribute for field funding attr_reader :funding end class SamsungPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. attr_reader :buyer_id end class SepaCreditTransfer < Stripe::StripeObject - attr_reader :bank_name, :bic, :iban + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # IBAN of the bank account to transfer funds to. + attr_reader :iban end class SepaDebit < Stripe::StripeObject - attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Branch code of bank associated with the bank account. + attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four characters of the IBAN. + attr_reader :last4 + # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). + attr_reader :mandate end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :country, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the SOFORT authorization page that the customer is redirected to. + # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by SOFORT directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class StripeAccount < Stripe::StripeObject; end class Swish < Stripe::StripeObject - attr_reader :fingerprint, :payment_reference, :verified_phone_last4 + # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer + attr_reader :fingerprint + # Payer bank reference number for the payment + attr_reader :payment_reference + # The last four digits of the Swish account phone number + attr_reader :verified_phone_last4 end class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :payment_reference, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # Reference number to locate ACH payments with customer's bank. + attr_reader :payment_reference + # Routing number of the bank account. + attr_reader :routing_number end class Wechat < Stripe::StripeObject; end class WechatPay < Stripe::StripeObject - attr_reader :fingerprint, :transaction_id + # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. + attr_reader :fingerprint + # Transaction ID of this particular WeChat Pay transaction. + attr_reader :transaction_id end class Zip < Stripe::StripeObject; end - attr_reader :ach_credit_transfer, :ach_debit, :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_credit_transfer, :sepa_debit, :shopeepay, :sofort, :stripe_account, :swish, :twint, :type, :us_bank_account, :wechat, :wechat_pay, :zip + # Attribute for field ach_credit_transfer + attr_reader :ach_credit_transfer + # Attribute for field ach_debit + attr_reader :ach_debit + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mb_way + attr_reader :mb_way + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_credit_transfer + attr_reader :sepa_credit_transfer + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field stripe_account + attr_reader :stripe_account + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + # An additional hash is included on `payment_method_details` with a name matching this value. + # It contains information specific to the payment method. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat + attr_reader :wechat + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. attr_reader :session end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + attr_reader :amount + # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. + attr_reader :destination + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return charges that were created during the given date interval. + attr_accessor :created + # Only return charges for the customer specified by this customer ID. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return charges for this transfer group, limited to 100. + attr_accessor :transfer_group + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil, + transfer_group: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + @transfer_group = transfer_group + end + end + + class CreateParams < Stripe::RequestParams + class Destination < Stripe::RequestParams + # ID of an existing, connected Stripe account. + attr_accessor :account + # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. + attr_accessor :amount + + def initialize(account: nil, amount: nil) + super + @account = account + @amount = amount + end + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + attr_accessor :amount + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # Attribute for param field application_fee + attr_accessor :application_fee + # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). + attr_accessor :application_fee_amount + # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. + attr_accessor :capture + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of an existing customer that will be charged in this request. + attr_accessor :customer + # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + attr_accessor :description + # Attribute for param field destination + attr_accessor :destination + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). + attr_accessor :on_behalf_of + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + attr_accessor :shipping + # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. + attr_accessor :source + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). + attr_accessor :transfer_group + + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + capture: nil, + currency: nil, + customer: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + on_behalf_of: nil, + radar_options: nil, + receipt_email: nil, + shipping: nil, + source: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @amount = amount + @application_fee = application_fee + @application_fee_amount = application_fee_amount + @capture = capture + @currency = currency + @customer = customer + @description = description + @destination = destination + @expand = expand + @metadata = metadata + @on_behalf_of = on_behalf_of + @radar_options = radar_options + @receipt_email = receipt_email + @shipping = shipping + @source = source + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class FraudDetails < Stripe::RequestParams + # Either `safe` or `fraudulent`. + attr_accessor :user_report + + def initialize(user_report: nil) + super + @user_report = user_report + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + attr_accessor :customer + # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + attr_accessor :fraud_details + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + attr_accessor :shipping + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_accessor :transfer_group + + def initialize( + customer: nil, + description: nil, + expand: nil, + fraud_details: nil, + metadata: nil, + payment_details: nil, + receipt_email: nil, + shipping: nil, + transfer_group: nil + ) + super + @customer = customer + @description = description + @expand = expand + @fraud_details = fraud_details + @metadata = metadata + @payment_details = payment_details + @receipt_email = receipt_email + @shipping = shipping + @transfer_group = transfer_group + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class CaptureParams < Stripe::RequestParams + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. + attr_accessor :amount + # An application fee to add on to this charge. + attr_accessor :application_fee + # An application fee amount to add on to this charge, which must be less than or equal to the original amount. + attr_accessor :application_fee_amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + attr_accessor :receipt_email + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_accessor :transfer_group + + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + expand: nil, + payment_details: nil, + receipt_email: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @amount = amount + @application_fee = application_fee + @application_fee_amount = application_fee_amount + @expand = expand + @payment_details = payment_details + @receipt_email = receipt_email + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end end # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount @@ -525,8 +3150,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/charges", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/charges", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/checkout/session.rb b/lib/stripe/resources/checkout/session.rb index f33418237..61d36bd20 100644 --- a/lib/stripe/resources/checkout/session.rb +++ b/lib/stripe/resources/checkout/session.rb @@ -28,365 +28,3644 @@ def self.object_name end class AdaptivePricing < Stripe::StripeObject + # Whether Adaptive Pricing is enabled. attr_reader :enabled end class AfterExpiration < Stripe::StripeObject class Recovery < Stripe::StripeObject - attr_reader :allow_promotion_codes, :enabled, :expires_at, :url + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + attr_reader :allow_promotion_codes + # If `true`, a recovery url will be generated to recover this Checkout Session if it + # expires before a transaction is completed. It will be attached to the + # Checkout Session object upon expiration. + attr_reader :enabled + # The timestamp at which the recovery URL will expire. + attr_reader :expires_at + # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session + attr_reader :url end + # When set, configuration used to recover the Checkout Session on expiry. attr_reader :recovery end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability, :status + # Indicates whether automatic tax is enabled for the session + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this session. + attr_reader :status end class CollectedInformation < Stripe::StripeObject class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :business_name, :email, :phone, :shipping_details, :tax_ids + # Customer’s business name for this Checkout Session + attr_reader :business_name + # Customer’s email for this Checkout Session + attr_reader :email + # Customer’s phone number for this Checkout Session + attr_reader :phone + # Shipping information for this Checkout Session. + attr_reader :shipping_details + # Customer’s tax ids for this Checkout Session. + attr_reader :tax_ids end class Consent < Stripe::StripeObject - attr_reader :promotions, :terms_of_service + # If `opt_in`, the customer consents to receiving promotional communications + # from the merchant about this Checkout Session. + attr_reader :promotions + # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. + attr_reader :terms_of_service end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. attr_reader :position end - attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service + # If set to `hidden`, it will hide legal text related to the reuse of a payment method. + attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + attr_reader :promotions + # If set to `required`, it requires customers to accept the terms of service before being able to pay. + attr_reader :terms_of_service end class CurrencyConversion < Stripe::StripeObject - attr_reader :amount_subtotal, :amount_total, :fx_rate, :source_currency + # Total of all items in source currency before discounts or taxes are applied. + attr_reader :amount_subtotal + # Total of all items in source currency after discounts and taxes are applied. + attr_reader :amount_total + # Exchange rate used to convert source currency amounts to customer currency amounts + attr_reader :fx_rate + # Creation currency of the CheckoutSession before localization + attr_reader :source_currency end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - attr_reader :label, :value + # The label for the option, displayed to the customer. Up to 100 characters. + attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_reader :value end - attr_reader :default_value, :options, :value + # The value that will pre-fill on the payment page. + attr_reader :default_value + # The options available for the customer to select. Up to 200 options allowed. + attr_reader :options + # The option selected by the customer. This will be the `value` for the option. + attr_reader :value end class Label < Stripe::StripeObject - attr_reader :custom, :type + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_reader :custom + # The type of the label. + attr_reader :type end class Numeric < Stripe::StripeObject - attr_reader :default_value, :maximum_length, :minimum_length, :value + # The value that will pre-fill the field on the payment page. + attr_reader :default_value + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length + # The value entered by the customer, containing only digits. + attr_reader :value end class Text < Stripe::StripeObject - attr_reader :default_value, :maximum_length, :minimum_length, :value + # The value that will pre-fill the field on the payment page. + attr_reader :default_value + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length + # The value entered by the customer. + attr_reader :value end - attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type + # Attribute for field dropdown + attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_reader :key + # Attribute for field label + attr_reader :label + # Attribute for field numeric + attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_reader :optional + # Attribute for field text + attr_reader :text + # The type of the field. + attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end - attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance + # Custom text that should be displayed after the payment confirmation button. + attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_reader :terms_of_service_acceptance end class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :address, :email, :name, :phone, :tax_exempt, :tax_ids + # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + attr_reader :address + # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. + attr_reader :email + # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. + attr_reader :name + # The customer's phone number after a completed Checkout Session. + attr_reader :phone + # The customer’s tax exempt status after a completed Checkout Session. + attr_reader :tax_exempt + # The customer’s tax IDs after a completed Checkout Session. + attr_reader :tax_ids end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. attr_reader :amount_tax_display end - attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options + # The account tax IDs associated with the invoice. + attr_reader :account_tax_ids + # Custom fields displayed on the invoice. + attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Footer displayed on the invoice. + attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Options for invoice PDF rendering. + attr_reader :rendering_options end - attr_reader :enabled, :invoice_data + # Indicates whether invoice creation is enabled for the Checkout Session. + attr_reader :enabled + # Attribute for field invoice_data + attr_reader :invoice_data end class PaymentMethodConfigurationDetails < Stripe::StripeObject - attr_reader :id, :parent + # ID of the payment method configuration used. + attr_reader :id + # ID of the parent payment method configuration used. + attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. + attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :currency, :mandate_options, :setup_future_usage, :verification_method + # Currency supported by the bank account. Returned when the Session is in `setup` mode. + attr_reader :currency + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class Affirm < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AmazonPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. attr_reader :reference_prefix end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Indicates if installments are enabled attr_reader :enabled end - attr_reader :installments, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_three_d_secure, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji + # Attribute for field installments + attr_reader :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_reader :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + attr_reader :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + attr_reader :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_reader :statement_descriptor_suffix_kanji end class Cashapp < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :requested_address_types, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type, :setup_future_usage + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class KakaoPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Oxxo < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :reference, :setup_future_usage, :subsellers + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred locale of the PayPal checkout page that the customer is redirected to. + attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_reader :start_date end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Pix < Stripe::StripeObject + # The number of seconds after which Pix payment will expire. attr_reader :expires_after_seconds end class RevolutPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. attr_reader :reference_prefix end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Swish < Stripe::StripeObject + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. attr_reader :reference end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. attr_reader :mode end - attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + # Attribute for field filters + attr_reader :filters + # Attribute for field manual_entry + attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url end - attr_reader :financial_connections, :setup_future_usage, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :cashapp, :customer_balance, :eps, :fpx, :giropay, :grabpay, :ideal, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :revolut_pay, :samsung_pay, :sepa_debit, :sofort, :swish, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field ideal + attr_reader :ideal + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field us_bank_account + attr_reader :us_bank_account end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject - attr_reader :line_items, :shipping_details + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + attr_reader :line_items + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + attr_reader :shipping_details end + # Permissions for updating the Checkout Session. attr_reader :update end class PhoneNumberCollection < Stripe::StripeObject + # Indicates whether phone number collection is enabled for the session attr_reader :enabled end class SavedPaymentMethodOptions < Stripe::StripeObject - attr_reader :allow_redisplay_filters, :payment_method_remove, :payment_method_save + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + attr_reader :allow_redisplay_filters + # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. + attr_reader :payment_method_remove + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + attr_reader :payment_method_save end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. attr_reader :allowed_countries end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this order. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class ShippingOption < Stripe::StripeObject - attr_reader :shipping_amount, :shipping_rate + # A non-negative integer in cents representing how much to charge. + attr_reader :shipping_amount + # The shipping rate. + attr_reader :shipping_rate end class TaxIdCollection < Stripe::StripeObject - attr_reader :enabled, :required + # Indicates whether tax ID collection is enabled for the session + attr_reader :enabled + # Indicates whether a tax ID is required on the payment page + attr_reader :required end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount + end + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes + end + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CustomerDetails < Stripe::RequestParams + # Customer's email address. + attr_accessor :email + + def initialize(email: nil) + super + @email = email + end + end + # Only return Checkout Sessions that were created during the given date interval. + attr_accessor :created + # Only return the Checkout Sessions for the Customer specified. + attr_accessor :customer + # Only return the Checkout Sessions for the Customer details specified. + attr_accessor :customer_details + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return the Checkout Session for the PaymentIntent specified. + attr_accessor :payment_intent + # Only return the Checkout Sessions for the Payment Link specified. + attr_accessor :payment_link + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return the Checkout Sessions matching the given status. + attr_accessor :status + # Only return the Checkout Session for the subscription specified. + attr_accessor :subscription + + def initialize( + created: nil, + customer: nil, + customer_details: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + payment_link: nil, + starting_after: nil, + status: nil, + subscription: nil + ) + super + @created = created + @customer = customer + @customer_details = customer_details + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @payment_link = payment_link + @starting_after = starting_after + @status = status + @subscription = subscription + end + end + + class CreateParams < Stripe::RequestParams + class AdaptivePricing < Stripe::RequestParams + # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class AfterExpiration < Stripe::RequestParams + class Recovery < Stripe::RequestParams + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + attr_accessor :allow_promotion_codes + # If `true`, a recovery URL will be generated to recover this Checkout Session if it + # expires before a successful transaction is completed. It will be attached to the + # Checkout Session object upon expiration. + attr_accessor :enabled + + def initialize(allow_promotion_codes: nil, enabled: nil) + super + @allow_promotion_codes = allow_promotion_codes + @enabled = enabled + end + end + # Configure a Checkout Session that can be used to recover an expired session. + attr_accessor :recovery + + def initialize(recovery: nil) + super + @recovery = recovery + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + attr_accessor :position + + def initialize(position: nil) + super + @position = position + end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + attr_accessor :terms_of_service + + def initialize( + payment_method_reuse_agreement: nil, + promotions: nil, + terms_of_service: nil + ) + super + @payment_method_reuse_agreement = payment_method_reuse_agreement + @promotions = promotions + @terms_of_service = terms_of_service + end + end + + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_accessor :value + + def initialize(label: nil, value: nil) + super + @label = label + @value = value + end + end + # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + attr_accessor :default_value + # The options available for the customer to select. Up to 200 options allowed. + attr_accessor :options + + def initialize(default_value: nil, options: nil) + super + @default_value = default_value + @options = options + end + end + + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_accessor :custom + # The type of the label. + attr_accessor :type + + def initialize(custom: nil, type: nil) + super + @custom = custom + @type = type + end + end + + class Numeric < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil) + super + @default_value = default_value + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + + class Text < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil) + super + @default_value = default_value + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + # Configuration for `type=dropdown` fields. + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_accessor :key + # The label for the field, displayed to the customer. + attr_accessor :label + # Configuration for `type=numeric` fields. + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_accessor :optional + # Configuration for `type=text` fields. + attr_accessor :text + # The type of the field. + attr_accessor :type + + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ) + super + @dropdown = dropdown + @key = key + @label = label + @numeric = numeric + @optional = optional + @text = text + @type = type + end + end + + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + # Custom text that should be displayed after the payment confirmation button. + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_accessor :terms_of_service_acceptance + + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ) + super + @after_submit = after_submit + @shipping_address = shipping_address + @submit = submit + @terms_of_service_acceptance = terms_of_service_acceptance + end + end + + class CustomerUpdate < Stripe::RequestParams + # Describes whether Checkout saves the billing address onto `customer.address`. + # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. + attr_accessor :address + # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + attr_accessor :name + # Describes whether Checkout saves shipping information onto `customer.shipping`. + # To collect shipping information, use `shipping_address_collection`. Defaults to `never`. + attr_accessor :shipping + + def initialize(address: nil, name: nil, shipping: nil) + super + @address = address + @name = name + @shipping = shipping + end + end + + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this Session. + attr_accessor :coupon + # The ID of a promotion code to apply to this Session. + attr_accessor :promotion_code + + def initialize(coupon: nil, promotion_code: nil) + super + @coupon = coupon + @promotion_code = promotion_code + end + end + + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + + def initialize(amount_tax_display: nil) + super + @amount_tax_display = amount_tax_display + end + end + # The account tax IDs associated with the invoice. + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ) + super + @account_tax_ids = account_tax_ids + @custom_fields = custom_fields + @description = description + @footer = footer + @issuer = issuer + @metadata = metadata + @rendering_options = rendering_options + end + end + # Set to `true` to enable invoice creation. + attr_accessor :enabled + # Parameters passed when creating invoices for payment-mode Checkout Sessions. + attr_accessor :invoice_data + + def initialize(enabled: nil, invoice_data: nil) + super + @enabled = enabled + @invoice_data = invoice_data + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative integer. + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + attr_accessor :adjustable_quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. + attr_accessor :dynamic_tax_rates + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + attr_accessor :tax_rates + + def initialize( + adjustable_quantity: nil, + dynamic_tax_rates: nil, + metadata: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @adjustable_quantity = adjustable_quantity + @dynamic_tax_rates = dynamic_tax_rates + @metadata = metadata + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class PaymentIntentData < Stripe::RequestParams + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. For details, + # see the PaymentIntents [use case for connected + # accounts](/docs/payments/connected-accounts). + attr_accessor :on_behalf_of + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment + # method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the + # customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the + # customer that their payment details will be saved and used for future + # payments. + # + # If a Customer has been provided or Checkout creates a new Customer, + # Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached + # to a Customer. To reuse the payment method, you can retrieve it from the + # Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` + # to dynamically optimize your payment flow and comply with regional + # legislation and network rules, such as SCA. + attr_accessor :setup_future_usage + # Shipping information for this payment. + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # The parameters used to automatically create a Transfer when the payment succeeds. + # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + application_fee_amount: nil, + capture_method: nil, + description: nil, + metadata: nil, + on_behalf_of: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @application_fee_amount = application_fee_amount + @capture_method = capture_method + @description = description + @metadata = metadata + @on_behalf_of = on_behalf_of + @receipt_email = receipt_email + @setup_future_usage = setup_future_usage + @shipping = shipping + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + + class PaymentMethodData < Stripe::RequestParams + # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. + attr_accessor :allow_redisplay + + def initialize(allow_redisplay: nil) + super + @allow_redisplay = allow_redisplay + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). This is only accepted for Checkout Sessions in `setup` mode. + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Verification method for the intent + attr_accessor :verification_method + + def initialize( + currency: nil, + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @currency = currency + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class AmazonPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + # Setting to true enables installments for this Checkout Session. + # Setting to false will prevent any installment plan from applying to a payment. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # Installment options for card payments + attr_accessor :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + attr_accessor :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + attr_accessor :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + + def initialize( + installments: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_three_d_secure: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil + ) + super + @installments = installments + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_three_d_secure = request_three_d_secure + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + end + end + + class Cashapp < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + + def initialize(expires_after_seconds: nil) + super + @expires_after_seconds = expires_after_seconds + end + end + + class RevolutPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + attr_accessor :reference + + def initialize(reference: nil) + super + @reference = reference + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(permissions: nil, prefetch: nil) + super + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Verification method for the intent + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + # contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # contains details about the Affirm payment method options. + attr_accessor :affirm + # contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # contains details about the Alipay payment method options. + attr_accessor :alipay + # contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # contains details about the AU Becs Debit payment method options. + attr_accessor :au_becs_debit + # contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # contains details about the Bancontact payment method options. + attr_accessor :bancontact + # contains details about the Boleto payment method options. + attr_accessor :boleto + # contains details about the Card payment method options. + attr_accessor :card + # contains details about the Cashapp Pay payment method options. + attr_accessor :cashapp + # contains details about the Customer Balance payment method options. + attr_accessor :customer_balance + # contains details about the EPS payment method options. + attr_accessor :eps + # contains details about the FPX payment method options. + attr_accessor :fpx + # contains details about the Giropay payment method options. + attr_accessor :giropay + # contains details about the Grabpay payment method options. + attr_accessor :grabpay + # contains details about the Ideal payment method options. + attr_accessor :ideal + # contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # contains details about the Klarna payment method options. + attr_accessor :klarna + # contains details about the Konbini payment method options. + attr_accessor :konbini + # contains details about the Korean card payment method options. + attr_accessor :kr_card + # contains details about the Link payment method options. + attr_accessor :link + # contains details about the Mobilepay payment method options. + attr_accessor :mobilepay + # contains details about the Multibanco payment method options. + attr_accessor :multibanco + # contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # contains details about the OXXO payment method options. + attr_accessor :oxxo + # contains details about the P24 payment method options. + attr_accessor :p24 + # contains details about the PAYCO payment method options. + attr_accessor :payco + # contains details about the PayNow payment method options. + attr_accessor :paynow + # contains details about the PayPal payment method options. + attr_accessor :paypal + # contains details about the PayTo payment method options. + attr_accessor :payto + # contains details about the Pix payment method options. + attr_accessor :pix + # contains details about the RevolutPay payment method options. + attr_accessor :revolut_pay + # contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # contains details about the Sepa Debit payment method options. + attr_accessor :sepa_debit + # contains details about the Sofort payment method options. + attr_accessor :sofort + # contains details about the Swish payment method options. + attr_accessor :swish + # contains details about the Us Bank Account payment method options. + attr_accessor :us_bank_account + # contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + grabpay: nil, + ideal: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + sofort: nil, + swish: nil, + us_bank_account: nil, + wechat_pay: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @boleto = boleto + @card = card + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @grabpay = grabpay + @ideal = ideal + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @sofort = sofort + @swish = swish + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay end - attr_reader :discounts, :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + + class Permissions < Stripe::RequestParams + class Update < Stripe::RequestParams + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + attr_accessor :line_items + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + attr_accessor :shipping_details + + def initialize(line_items: nil, shipping_details: nil) + super + @line_items = line_items + @shipping_details = shipping_details + end + end + # Permissions for updating the Checkout Session. + attr_accessor :update + + def initialize(update: nil) + super + @update = update + end + end + + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class SavedPaymentMethodOptions < Stripe::RequestParams + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + attr_accessor :allow_redisplay_filters + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + attr_accessor :payment_method_save + + def initialize(allow_redisplay_filters: nil, payment_method_save: nil) + super + @allow_redisplay_filters = allow_redisplay_filters + @payment_method_save = payment_method_save + end + end + + class SetupIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account for which the setup is intended. + attr_accessor :on_behalf_of + + def initialize(description: nil, metadata: nil, on_behalf_of: nil) + super + @description = description + @metadata = metadata + @on_behalf_of = on_behalf_of + end + end + + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + attr_accessor :allowed_countries + + def initialize(allowed_countries: nil) + super + @allowed_countries = allowed_countries + end + end + + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the Shipping Rate to use for this shipping option. + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(issuer: nil) + super + @issuer = issuer + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # A future timestamp to anchor the subscription's billing cycle for new subscriptions. + attr_accessor :billing_cycle_anchor + # The tax rates that will apply to any subscription item that does not have + # `tax_rates` set. Invoices created will have their `default_tax_rates` populated + # from the subscription. + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. + # Use this field to optionally store an explanation of the subscription + # for rendering in the [customer portal](https://stripe.com/docs/customer-management). + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the subscription's invoices. + attr_accessor :on_behalf_of + # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer + # will get before being charged for the first time. Has to be at least + # 48 hours in the future. + attr_accessor :trial_end + # Integer representing the number of trial period days before the + # customer is charged for the first time. Has to be at least 1. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + application_fee_percent: nil, + billing_cycle_anchor: nil, + default_tax_rates: nil, + description: nil, + invoice_settings: nil, + metadata: nil, + on_behalf_of: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @application_fee_percent = application_fee_percent + @billing_cycle_anchor = billing_cycle_anchor + @default_tax_rates = default_tax_rates + @description = description + @invoice_settings = invoice_settings + @metadata = metadata + @on_behalf_of = on_behalf_of + @proration_behavior = proration_behavior + @transfer_data = transfer_data + @trial_end = trial_end + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + attr_accessor :required + + def initialize(enabled: nil, required: nil) + super + @enabled = enabled + @required = required + end + end + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + attr_accessor :adaptive_pricing + # Configure actions after a Checkout Session has expired. + attr_accessor :after_expiration + # Enables user redeemable promotion codes. + attr_accessor :allow_promotion_codes + # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + attr_accessor :automatic_tax + # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. + attr_accessor :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. + attr_accessor :cancel_url + # A unique string to reference the Checkout Session. This can be a + # customer ID, a cart ID, or similar, and can be used to reconcile the + # session with your internal systems. + attr_accessor :client_reference_id + # Configure fields for the Checkout Session to gather active consent from customers. + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Required in `setup` mode when `payment_method_types` is not set. + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + attr_accessor :custom_text + # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card + # payment method will be used to prefill the email, name, card details, and billing address + # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + # + # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + # + # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. + # + # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + attr_accessor :customer + # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + # + # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + # + # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) + # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + # + # Can only be set in `payment` and `setup` mode. + attr_accessor :customer_creation + # If provided, this value will be used when the Customer object is created. + # If not provided, customers will be asked to enter their email address. + # Use this parameter to prefill customer data if you already have an email + # on file. To access information about the customer once a session is + # complete, use the `customer` field. + attr_accessor :customer_email + # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + attr_accessor :customer_update + # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + attr_accessor :expires_at + # Generate a post-purchase Invoice for one-time payments. + attr_accessor :invoice_creation + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # + # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + # + # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + attr_accessor :line_items + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + attr_accessor :locale + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + attr_accessor :mode + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + # This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + attr_accessor :payment_method_collection + # The ID of the payment method configuration to use with this Checkout session. + attr_accessor :payment_method_configuration + # This parameter allows you to set some attributes on the payment method created during a Checkout session. + attr_accessor :payment_method_data + # Payment-method-specific configuration. + attr_accessor :payment_method_options + # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + # + # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. + # + # Read more about the supported payment methods and their requirements in our [payment + # method details guide](/docs/payments/checkout/payment-methods). + # + # If multiple payment methods are passed, Checkout will dynamically reorder them to + # prioritize the most relevant payment methods based on the customer's location and + # other characteristics. + attr_accessor :payment_method_types + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + # + # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + attr_accessor :permissions + # Controls phone number collection settings for the session. + # + # We recommend that you review your privacy policy and check with your legal contacts + # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + attr_accessor :phone_number_collection + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + attr_accessor :redirect_on_completion + # The URL to redirect your customer back to after they authenticate or cancel their payment on the + # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` + # and redirect-based payment methods are enabled on the session. + attr_accessor :return_url + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + attr_accessor :saved_payment_method_options + # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + attr_accessor :setup_intent_data + # When set, provides configuration for Checkout to collect a shipping address from a customer. + attr_accessor :shipping_address_collection + # The shipping rate options to apply to this Session. Up to a maximum of 5. + attr_accessor :shipping_options + # Describes the type of transaction being performed by Checkout in order to customize + # relevant text on the page, such as the submit button. `submit_type` can only be + # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + attr_accessor :submit_type + # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + attr_accessor :subscription_data + # The URL to which Stripe should send customers when payment or setup + # is complete. + # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use + # information from the successful Checkout Session on your page, read the + # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + attr_accessor :success_url + # Controls tax ID collection during checkout. + attr_accessor :tax_id_collection + # The UI mode of the Session. Defaults to `hosted`. + attr_accessor :ui_mode + + def initialize( + adaptive_pricing: nil, + after_expiration: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + cancel_url: nil, + client_reference_id: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer: nil, + customer_creation: nil, + customer_email: nil, + customer_update: nil, + discounts: nil, + expand: nil, + expires_at: nil, + invoice_creation: nil, + line_items: nil, + locale: nil, + metadata: nil, + mode: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + permissions: nil, + phone_number_collection: nil, + redirect_on_completion: nil, + return_url: nil, + saved_payment_method_options: nil, + setup_intent_data: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + success_url: nil, + tax_id_collection: nil, + ui_mode: nil + ) + super + @adaptive_pricing = adaptive_pricing + @after_expiration = after_expiration + @allow_promotion_codes = allow_promotion_codes + @automatic_tax = automatic_tax + @billing_address_collection = billing_address_collection + @cancel_url = cancel_url + @client_reference_id = client_reference_id + @consent_collection = consent_collection + @currency = currency + @custom_fields = custom_fields + @custom_text = custom_text + @customer = customer + @customer_creation = customer_creation + @customer_email = customer_email + @customer_update = customer_update + @discounts = discounts + @expand = expand + @expires_at = expires_at + @invoice_creation = invoice_creation + @line_items = line_items + @locale = locale + @metadata = metadata + @mode = mode + @payment_intent_data = payment_intent_data + @payment_method_collection = payment_method_collection + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @permissions = permissions + @phone_number_collection = phone_number_collection + @redirect_on_completion = redirect_on_completion + @return_url = return_url + @saved_payment_method_options = saved_payment_method_options + @setup_intent_data = setup_intent_data + @shipping_address_collection = shipping_address_collection + @shipping_options = shipping_options + @submit_type = submit_type + @subscription_data = subscription_data + @success_url = success_url + @tax_id_collection = tax_id_collection + @ui_mode = ui_mode + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CollectedInformation < Stripe::RequestParams + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The address of the customer + attr_accessor :address + # The name of customer + attr_accessor :name + + def initialize(address: nil, name: nil) + super + @address = address + @name = name + end + end + # The shipping details to apply to this Session. + attr_accessor :shipping_details + + def initialize(shipping_details: nil) + super + @shipping_details = shipping_details + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + attr_accessor :adjustable_quantity + # ID of an existing line item. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices). + attr_accessor :price + # The quantity of the line item being purchased. + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + attr_accessor :tax_rates + + def initialize( + adjustable_quantity: nil, + id: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil + ) + super + @adjustable_quantity = adjustable_quantity + @id = id + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + end + end + + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the Shipping Rate to use for this shipping option. + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + # Information about the customer collected within the Checkout Session. + attr_accessor :collected_information + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A list of items the customer is purchasing. + # + # When updating line items, you must retransmit the entire array of line items. + # + # To retain an existing line item, specify its `id`. + # + # To update an existing line item, specify its `id` along with the new values of the fields to update. + # + # To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices. + # + # To remove an existing line item, omit the line item's ID from the retransmitted array. + # + # To reorder a line item, specify it at the desired position in the retransmitted array. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The shipping rate options to apply to this Session. Up to a maximum of 5. + attr_accessor :shipping_options + + def initialize( + collected_information: nil, + expand: nil, + line_items: nil, + metadata: nil, + shipping_options: nil + ) + super + @collected_information = collected_information + @expand = expand + @line_items = line_items + @metadata = metadata + @shipping_options = shipping_options + end + end + + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). attr_reader :adaptive_pricing @@ -558,11 +3837,11 @@ def self.expire(session, params = {}, opts = {}) end # Returns a list of Checkout Sessions. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/checkout/sessions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/climate/order.rb b/lib/stripe/resources/climate/order.rb index 3962cba81..79a274383 100644 --- a/lib/stripe/resources/climate/order.rb +++ b/lib/stripe/resources/climate/order.rb @@ -16,14 +16,142 @@ def self.object_name end class Beneficiary < Stripe::StripeObject + # Publicly displayable name for the end beneficiary of carbon removal. attr_reader :public_name end class DeliveryDetail < Stripe::StripeObject class Location < Stripe::StripeObject - attr_reader :city, :country, :latitude, :longitude, :region + # The city where the supplier is located. + attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. + attr_reader :country + # The geographic latitude where the supplier is located. + attr_reader :latitude + # The geographic longitude where the supplier is located. + attr_reader :longitude + # The state/county/province/region where the supplier is located. + attr_reader :region + end + # Time at which the delivery occurred. Measured in seconds since the Unix epoch. + attr_reader :delivered_at + # Specific location of this delivery. + attr_reader :location + # Quantity of carbon removal supplied by this delivery. + attr_reader :metric_tons + # Once retired, a URL to the registry entry for the tons from this delivery. + attr_reader :registry_url + # A supplier of carbon removal. + attr_reader :supplier + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + attr_accessor :public_name + + def initialize(public_name: nil) + super + @public_name = public_name + end + end + # Requested amount of carbon removal units. Either this or `metric_tons` must be specified. + attr_accessor :amount + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + attr_accessor :beneficiary + # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Requested number of tons for the order. Either this or `amount` must be specified. + attr_accessor :metric_tons + # Unique identifier of the Climate product. + attr_accessor :product + + def initialize( + amount: nil, + beneficiary: nil, + currency: nil, + expand: nil, + metadata: nil, + metric_tons: nil, + product: nil + ) + super + @amount = amount + @beneficiary = beneficiary + @currency = currency + @expand = expand + @metadata = metadata + @metric_tons = metric_tons + @product = product + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + attr_accessor :public_name + + def initialize(public_name: nil) + super + @public_name = public_name + end + end + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + attr_accessor :beneficiary + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(beneficiary: nil, expand: nil, metadata: nil) + super + @beneficiary = beneficiary + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :delivered_at, :location, :metric_tons, :registry_url, :supplier end # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. attr_reader :amount_fees @@ -104,8 +232,8 @@ def self.create(params = {}, opts = {}) # Lists all Climate order objects. The orders are returned sorted by creation date, with the # most recently created orders appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/climate/orders", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/climate/orders", params: params, opts: opts) end # Updates the specified order by setting the values of the parameters passed. diff --git a/lib/stripe/resources/climate/product.rb b/lib/stripe/resources/climate/product.rb index e47af3f01..2bc4c4f3c 100644 --- a/lib/stripe/resources/climate/product.rb +++ b/lib/stripe/resources/climate/product.rb @@ -14,7 +14,41 @@ def self.object_name end class CurrentPricesPerMetricTon < Stripe::StripeObject - attr_reader :amount_fees, :amount_subtotal, :amount_total + # Fees for one metric ton of carbon removal in the currency's smallest unit. + attr_reader :amount_fees + # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. + attr_reader :amount_subtotal + # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. + attr_reader :amount_total + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -38,11 +72,11 @@ class CurrentPricesPerMetricTon < Stripe::StripeObject attr_reader :suppliers # Lists all available Climate product objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/climate/products", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/climate/supplier.rb b/lib/stripe/resources/climate/supplier.rb index f48fdb10b..8259e4ae3 100644 --- a/lib/stripe/resources/climate/supplier.rb +++ b/lib/stripe/resources/climate/supplier.rb @@ -13,7 +13,45 @@ def self.object_name end class Location < Stripe::StripeObject - attr_reader :city, :country, :latitude, :longitude, :region + # The city where the supplier is located. + attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. + attr_reader :country + # The geographic latitude where the supplier is located. + attr_reader :latitude + # The geographic longitude where the supplier is located. + attr_reader :longitude + # The state/county/province/region where the supplier is located. + attr_reader :region + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Unique identifier for the object. attr_reader :id @@ -31,11 +69,11 @@ class Location < Stripe::StripeObject attr_reader :removal_pathway # Lists all available Climate supplier objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/climate/suppliers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/confirmation_token.rb b/lib/stripe/resources/confirmation_token.rb index 3d8401feb..ffde46386 100644 --- a/lib/stripe/resources/confirmation_token.rb +++ b/lib/stripe/resources/confirmation_token.rb @@ -18,23 +18,41 @@ def self.object_name class MandateData < Stripe::StripeObject class CustomerAcceptance < Stripe::StripeObject class Online < Stripe::StripeObject - attr_reader :ip_address, :user_agent + # The IP address from which the Mandate was accepted by the customer. + attr_reader :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_reader :user_agent end - attr_reader :online, :type + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_reader :online + # The type of customer acceptance information included with the Mandate. + attr_reader :type end + # This hash contains details about the customer acceptance of the Mandate. attr_reader :customer_acceptance end class PaymentMethodOptions < Stripe::StripeObject class Card < Stripe::StripeObject + # The `cvc_update` Token collected from the Payment Element. attr_reader :cvc_token end + # This hash contains the card payment method options. attr_reader :card end class PaymentMethodPreview < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Institution number of the bank account. + attr_reader :institution_number + # Last four digits of the bank account number. + attr_reader :last4 + # Transit number of the bank account. + attr_reader :transit_number end class Affirm < Stripe::StripeObject; end @@ -44,59 +62,177 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4 + # Six-digit number identifying bank and branch associated with this bank account. + attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 end class BacsDebit < Stripe::StripeObject - attr_reader :fingerprint, :last4, :sort_code + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) + attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address. + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name + # Billing phone number (including extension). + attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class GeneratedFrom < Stripe::StripeObject class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + # The authorized amount + attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Details about payments collected offline. + attr_reader :offline + # Defines whether the authorized amount can be over-captured or not + attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt + # Attribute for field wallet + attr_reader :wallet end - attr_reader :card_present, :type + # Attribute for field card_present + attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + attr_reader :type end - attr_reader :charge, :payment_method_details, :setup_attempt + # The charge that created this object. + attr_reader :charge + # Transaction-specific details of the payment method used in the payment. + attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. attr_reader :supported end @@ -108,59 +244,218 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end - attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + # Attribute for field amex_express_checkout + attr_reader :amex_express_checkout + # Attribute for field apple_pay + attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field link + attr_reader :link + # Attribute for field masterpass + attr_reader :masterpass + # Attribute for field samsung_pay + attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type + # Attribute for field visa_checkout + attr_reader :visa_checkout end - attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :regulated_status, :three_d_secure_usage, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Checks on Card address and CVC if provided. + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + attr_reader :display_brand + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Details of the original PaymentMethod that created this object. + attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Status of a card based on the card issuer. + attr_reader :regulated_status + # Contains details on how this Card may be used for 3D Secure authentication. + attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Details about payment methods collected offline. + attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # Attribute for field wallet + attr_reader :wallet end class Cashapp < Stripe::StripeObject - attr_reader :buyer_id, :cashtag + # A unique and immutable identifier assigned by Cash App to every buyer. + attr_reader :buyer_id + # A public identifier for buyers using Cash App. + attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. attr_reader :bank end class Fpx < Stripe::StripeObject - attr_reader :account_holder_type, :bank + # Account holder type, if provided. Can be one of `individual` or `company`. + attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + attr_reader :bank end class Giropay < Stripe::StripeObject; end @@ -168,37 +463,91 @@ class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :bank, :bank_code, :bank_name, :display_name + # Attribute for field bank + attr_reader :bank + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field display_name + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. + attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end - attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method + # Card brand. Can be `interac`, `mastercard` or `visa`. + attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # The customer's date of birth, if provided. attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - attr_reader :brand, :last4 + # The local credit or debit card brand. + attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. + attr_reader :last4 end class Link < Stripe::StripeObject - attr_reader :email, :persistent_token + # Account owner's email address. + attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token end class MbWay < Stripe::StripeObject; end @@ -206,12 +555,14 @@ class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. attr_reader :bank end @@ -219,11 +570,25 @@ class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - attr_reader :fingerprint, :payer_email, :payer_id, :verified_email + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email end class Payto < Stripe::StripeObject - attr_reader :bsb_number, :last4, :pay_id + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Last four digits of the bank account number. + attr_reader :last4 + # The PayID alias for the bank account. + attr_reader :pay_id end class Pix < Stripe::StripeObject; end @@ -232,8 +597,14 @@ class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # Attribute for field dob attr_reader :dob end @@ -242,14 +613,29 @@ class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - attr_reader :charge, :setup_attempt + # The ID of the Charge that generated this PaymentMethod, if any. + attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end - attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Branch code of bank associated with the bank account. + attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. + attr_reader :generated_from + # Last four characters of the IBAN. + attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. attr_reader :country end @@ -258,28 +644,889 @@ class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :preferred, :supported + # The preferred network. + attr_reader :preferred + # All supported networks. + attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - attr_reader :network_code, :reason + # The ACH network code that resulted in this block. + attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked + attr_reader :reason end + # Attribute for field blocked attr_reader :blocked end - attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account number of the bank account. + attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # The name of the bank. + attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. + attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Contains information about US bank account networks that can be used. + attr_reader :networks + # Routing number of the bank account. + attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. + attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :allow_redisplay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :billing_details, :blik, :boleto, :card, :card_present, :cashapp, :customer, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :type, :us_bank_account, :wechat_pay, :zip + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + attr_reader :allow_redisplay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + attr_reader :customer + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mb_way + attr_reader :mb_way + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # Attribute for field address + attr_reader :address + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address + attr_accessor :address + # Recipient name. + attr_accessor :name + # Recipient phone (including extension) + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of an existing PaymentMethod. + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. + attr_accessor :payment_method_data + # Return URL used to confirm the Intent. + attr_accessor :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. + # + # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + attr_accessor :setup_future_usage + # Shipping information for this ConfirmationToken. + attr_accessor :shipping + + def initialize( + expand: nil, + payment_method: nil, + payment_method_data: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil + ) + super + @expand = expand + @payment_method = payment_method + @payment_method_data = payment_method_data + @return_url = return_url + @setup_future_usage = setup_future_usage + @shipping = shipping end - attr_reader :address, :name, :phone end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created diff --git a/lib/stripe/resources/country_spec.rb b/lib/stripe/resources/country_spec.rb index 9b4aebadd..24af48826 100644 --- a/lib/stripe/resources/country_spec.rb +++ b/lib/stripe/resources/country_spec.rb @@ -18,13 +18,51 @@ def self.object_name class VerificationFields < Stripe::StripeObject class Company < Stripe::StripeObject - attr_reader :additional, :minimum + # Additional fields which are only required for some users. + attr_reader :additional + # Fields which every account must eventually provide. + attr_reader :minimum end class Individual < Stripe::StripeObject - attr_reader :additional, :minimum + # Additional fields which are only required for some users. + attr_reader :additional + # Fields which every account must eventually provide. + attr_reader :minimum + end + # Attribute for field company + attr_reader :company + # Attribute for field individual + attr_reader :individual + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :company, :individual end # The default currency for this country. This applies to both payment methods and bank accounts. attr_reader :default_currency @@ -44,8 +82,8 @@ class Individual < Stripe::StripeObject attr_reader :verification_fields # Lists all Country Spec objects available in the API. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/country_specs", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/country_specs", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/coupon.rb b/lib/stripe/resources/coupon.rb index bef8d6eda..973659bda 100644 --- a/lib/stripe/resources/coupon.rb +++ b/lib/stripe/resources/coupon.rb @@ -17,12 +17,174 @@ def self.object_name end class AppliesTo < Stripe::StripeObject + # A list of product IDs this coupon applies to attr_reader :products end class CurrencyOptions < Stripe::StripeObject + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + attr_accessor :amount_off + + def initialize(amount_off: nil) + super + @amount_off = amount_off + end + end + # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + attr_accessor :name + + def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil) + super + @currency_options = currency_options + @expand = expand + @metadata = metadata + @name = name + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # An array of Product IDs that this Coupon will apply to. + attr_accessor :products + + def initialize(products: nil) + super + @products = products + end + end + + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + attr_accessor :amount_off + + def initialize(amount_off: nil) + super + @amount_off = amount_off + end + end + # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + attr_accessor :amount_off + # A hash containing directions for what this Coupon will apply discounts to. + attr_accessor :applies_to + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + attr_accessor :currency + # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + attr_accessor :duration + # Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. + attr_accessor :duration_in_months + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. + attr_accessor :id + # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + attr_accessor :name + # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + attr_accessor :percent_off + # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + attr_accessor :redeem_by + + def initialize( + amount_off: nil, + applies_to: nil, + currency: nil, + currency_options: nil, + duration: nil, + duration_in_months: nil, + expand: nil, + id: nil, + max_redemptions: nil, + metadata: nil, + name: nil, + percent_off: nil, + redeem_by: nil + ) + super + @amount_off = amount_off + @applies_to = applies_to + @currency = currency + @currency_options = currency_options + @duration = duration + @duration_in_months = duration_in_months + @expand = expand + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @name = name + @percent_off = percent_off + @redeem_by = redeem_by + end + end # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. attr_reader :amount_off # Attribute for field applies_to @@ -88,8 +250,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your coupons. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/coupons", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/coupons", params: params, opts: opts) end # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. diff --git a/lib/stripe/resources/credit_note.rb b/lib/stripe/resources/credit_note.rb index b2d1067b0..f130096aa 100644 --- a/lib/stripe/resources/credit_note.rb +++ b/lib/stripe/resources/credit_note.rb @@ -16,26 +16,615 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # Type of the pretax credit amount referenced. + attr_reader :type end class Refund < Stripe::StripeObject - attr_reader :amount_refunded, :refund + # Amount of the refund that applies to this credit note, in cents (or local equivalent). + attr_reader :amount_refunded + # ID of the refund. + attr_reader :refund end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this invoice. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class TaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return credit notes that were created during the given date interval. + attr_accessor :created + # Only return credit notes for the customer specified by this customer ID. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return credit notes for the invoice specified by this invoice ID. + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @invoice = invoice + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate = tax_rate + @taxable_amount = taxable_amount + end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + attr_accessor :invoice_line_item + # The line item quantity to credit. + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @invoice_line_item = invoice_line_item + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + @type = type + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + attr_accessor :refund + + def initialize(amount_refunded: nil, refund: nil) + super + @amount_refunded = amount_refunded + @refund = refund + end + end + + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the invoice. + attr_accessor :invoice + # Line items that make up the credit note. + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_accessor :reason + # ID of an existing refund to link this credit note to. + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + attr_accessor :refund_amount + # Refunds to link to this credit note. + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + attr_accessor :shipping_cost + + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ) + super + @amount = amount + @credit_amount = credit_amount + @effective_at = effective_at + @email_type = email_type + @expand = expand + @invoice = invoice + @lines = lines + @memo = memo + @metadata = metadata + @out_of_band_amount = out_of_band_amount + @reason = reason + @refund = refund + @refund_amount = refund_amount + @refunds = refunds + @shipping_cost = shipping_cost + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Credit note memo. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, memo: nil, metadata: nil) + super + @expand = expand + @memo = memo + @metadata = metadata + end + end + + class PreviewParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate = tax_rate + @taxable_amount = taxable_amount + end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + attr_accessor :invoice_line_item + # The line item quantity to credit. + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @invoice_line_item = invoice_line_item + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + @type = type + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + attr_accessor :refund + + def initialize(amount_refunded: nil, refund: nil) + super + @amount_refunded = amount_refunded + @refund = refund + end + end + + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the invoice. + attr_accessor :invoice + # Line items that make up the credit note. + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_accessor :reason + # ID of an existing refund to link this credit note to. + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + attr_accessor :refund_amount + # Refunds to link to this credit note. + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + attr_accessor :shipping_cost + + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ) + super + @amount = amount + @credit_amount = credit_amount + @effective_at = effective_at + @email_type = email_type + @expand = expand + @invoice = invoice + @lines = lines + @memo = memo + @metadata = metadata + @out_of_band_amount = out_of_band_amount + @reason = reason + @refund = refund + @refund_amount = refund_amount + @refunds = refunds + @shipping_cost = shipping_cost + end + end + + class ListPreviewLineItemsParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate = tax_rate + @taxable_amount = taxable_amount + end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + attr_accessor :invoice_line_item + # The line item quantity to credit. + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @invoice_line_item = invoice_line_item + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + @type = type + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + attr_accessor :refund + + def initialize(amount_refunded: nil, refund: nil) + super + @amount_refunded = amount_refunded + @refund = refund + end + end + + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + attr_accessor :email_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the invoice. + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Line items that make up the credit note. + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_accessor :reason + # ID of an existing refund to link this credit note to. + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + attr_accessor :refund_amount + # Refunds to link to this credit note. + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + attr_accessor :shipping_cost + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil, + starting_after: nil + ) + super + @amount = amount + @credit_amount = credit_amount + @effective_at = effective_at + @email_type = email_type + @ending_before = ending_before + @expand = expand + @invoice = invoice + @limit = limit + @lines = lines + @memo = memo + @metadata = metadata + @out_of_band_amount = out_of_band_amount + @reason = reason + @refund = refund + @refund_amount = refund_amount + @refunds = refunds + @shipping_cost = shipping_cost + @starting_after = starting_after + end + end + + class VoidCreditNoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. attr_reader :amount @@ -125,8 +714,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of credit notes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/credit_notes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/credit_notes", params: params, opts: opts) end # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/credit_note_line_item.rb b/lib/stripe/resources/credit_note_line_item.rb index 072909b44..540c73ada 100644 --- a/lib/stripe/resources/credit_note_line_item.rb +++ b/lib/stripe/resources/credit_note_line_item.rb @@ -10,15 +10,34 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # Type of the pretax credit amount referenced. + attr_reader :type end class TaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. attr_reader :amount diff --git a/lib/stripe/resources/customer.rb b/lib/stripe/resources/customer.rb index 5cb98dde4..0cabffccc 100644 --- a/lib/stripe/resources/customer.rb +++ b/lib/stripe/resources/customer.rb @@ -23,32 +23,810 @@ def self.object_name nested_resource_class_methods :tax_id, operations: %i[create retrieve delete list] class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class InvoiceSettings < Stripe::StripeObject class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class RenderingOptions < Stripe::StripeObject - attr_reader :amount_tax_display, :template + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + attr_reader :amount_tax_display + # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. + attr_reader :template end - attr_reader :custom_fields, :default_payment_method, :footer, :rendering_options + # Default custom fields to be displayed on invoices for this customer. + attr_reader :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + attr_reader :default_payment_method + # Default footer to be displayed on invoices for this customer. + attr_reader :footer + # Default options for invoice PDF rendering for this customer. + attr_reader :rendering_options end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class Tax < Stripe::StripeObject class Location < Stripe::StripeObject - attr_reader :country, :source, :state + # The customer's country as identified by Stripe Tax. + attr_reader :country + # The data source used to infer the customer's location. + attr_reader :source + # The customer's state, county, province, or region as identified by Stripe Tax. + attr_reader :state + end + # Surfaces if automatic tax computation is possible given the current customer location information. + attr_reader :automatic_tax + # A recent IP address of the customer used for tax reporting and tax location inference. + attr_reader :ip_address + # The customer's location as identified by Stripe Tax. + attr_reader :location + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + attr_accessor :reconciliation_mode + + def initialize(reconciliation_mode: nil) + super + @reconciliation_mode = reconciliation_mode + end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + attr_accessor :template + + def initialize(amount_tax_display: nil, template: nil) + super + @amount_tax_display = amount_tax_display + @template = template + end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ) + super + @custom_fields = custom_fields + @default_payment_method = default_payment_method + @footer = footer + @rendering_options = rendering_options + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. + attr_accessor :validate_location + + def initialize(ip_address: nil, validate_location: nil) + super + @ip_address = ip_address + @validate_location = validate_location + end + end + # The customer's address. + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + attr_accessor :balance + # Balance information and default balance settings for this customer. + attr_accessor :cash_balance + # Attribute for param field coupon + attr_accessor :coupon + # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + # + # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + # + # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + attr_accessor :default_source + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The customer's full name or business name. + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + attr_accessor :next_invoice_sequence + # The customer's phone number. + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Attribute for param field source + attr_accessor :source + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # Attribute for param field validate + attr_accessor :validate + + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + default_source: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + validate: nil + ) + super + @address = address + @balance = balance + @cash_balance = cash_balance + @coupon = coupon + @default_source = default_source + @description = description + @email = email + @expand = expand + @invoice_prefix = invoice_prefix + @invoice_settings = invoice_settings + @metadata = metadata + @name = name + @next_invoice_sequence = next_invoice_sequence + @phone = phone + @preferred_locales = preferred_locales + @promotion_code = promotion_code + @shipping = shipping + @source = source + @tax = tax + @tax_exempt = tax_exempt + @validate = validate + end + end + + class DeleteDiscountParams < Stripe::RequestParams + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return customers that were created during the given date interval. + attr_accessor :created + # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. + attr_accessor :test_clock + + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + test_clock: nil + ) + super + @created = created + @email = email + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @test_clock = test_clock + end + end + + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + attr_accessor :reconciliation_mode + + def initialize(reconciliation_mode: nil) + super + @reconciliation_mode = reconciliation_mode + end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + attr_accessor :template + + def initialize(amount_tax_display: nil, template: nil) + super + @amount_tax_display = amount_tax_display + @template = template + end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ) + super + @custom_fields = custom_fields + @default_payment_method = default_payment_method + @footer = footer + @rendering_options = rendering_options + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. + attr_accessor :validate_location + + def initialize(ip_address: nil, validate_location: nil) + super + @ip_address = ip_address + @validate_location = validate_location + end + end + + class TaxIdDatum < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + attr_accessor :balance + # Balance information and default balance settings for this customer. + attr_accessor :cash_balance + # Attribute for param field coupon + attr_accessor :coupon + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The customer's full name or business name. + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + attr_accessor :next_invoice_sequence + # Attribute for param field payment_method + attr_accessor :payment_method + # The customer's phone number. + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Attribute for param field source + attr_accessor :source + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_id_data + # ID of the test clock to attach to the customer. + attr_accessor :test_clock + # Attribute for param field validate + attr_accessor :validate + + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + payment_method: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + tax_id_data: nil, + test_clock: nil, + validate: nil + ) + super + @address = address + @balance = balance + @cash_balance = cash_balance + @coupon = coupon + @description = description + @email = email + @expand = expand + @invoice_prefix = invoice_prefix + @invoice_settings = invoice_settings + @metadata = metadata + @name = name + @next_invoice_sequence = next_invoice_sequence + @payment_method = payment_method + @phone = phone + @preferred_locales = preferred_locales + @promotion_code = promotion_code + @shipping = shipping + @source = source + @tax = tax + @tax_exempt = tax_exempt + @tax_id_data = tax_id_data + @test_clock = test_clock + @validate = validate + end + end + + class ListPaymentMethodsParams < Stripe::RequestParams + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + attr_accessor :type + + def initialize( + allow_redisplay: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ) + super + @allow_redisplay = allow_redisplay + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + end + end + + class RetrievePaymentMethodParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class CreateFundingInstructionsParams < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The type of the `bank_transfer` + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Additional parameters for `bank_transfer` funding types + attr_accessor :bank_transfer + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The `funding_type` to get the instructions for. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @currency = currency + @expand = expand + @funding_type = funding_type + end + end + + class FundCashBalanceParams < Stripe::RequestParams + # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + attr_accessor :reference + + def initialize(amount: nil, currency: nil, expand: nil, reference: nil) + super + @amount = amount + @currency = currency + @expand = expand + @reference = reference end - attr_reader :automatic_tax, :ip_address, :location end # The customer's address. attr_reader :address @@ -185,8 +963,8 @@ def self.delete_discount(customer, params = {}, opts = {}) end # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/customers", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/customers", params: params, opts: opts) end # Returns a list of PaymentMethods for a given Customer diff --git a/lib/stripe/resources/customer_cash_balance_transaction.rb b/lib/stripe/resources/customer_cash_balance_transaction.rb index 8413107e0..8324de9ee 100644 --- a/lib/stripe/resources/customer_cash_balance_transaction.rb +++ b/lib/stripe/resources/customer_cash_balance_transaction.rb @@ -13,44 +13,81 @@ def self.object_name end class AdjustedForOverdraft < Stripe::StripeObject - attr_reader :balance_transaction, :linked_transaction + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. + attr_reader :balance_transaction + # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. + attr_reader :linked_transaction end class AppliedToPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. attr_reader :payment_intent end class Funded < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject - attr_reader :bic, :iban_last4, :sender_name + # The BIC of the bank of the sender of the funding. + attr_reader :bic + # The last 4 digits of the IBAN of the sender of the funding. + attr_reader :iban_last4 + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name end class GbBankTransfer < Stripe::StripeObject - attr_reader :account_number_last4, :sender_name, :sort_code + # The last 4 digits of the account number of the sender of the funding. + attr_reader :account_number_last4 + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name + # The sort code of the bank of the sender of the funding + attr_reader :sort_code end class JpBankTransfer < Stripe::StripeObject - attr_reader :sender_bank, :sender_branch, :sender_name + # The name of the bank of the sender of the funding. + attr_reader :sender_bank + # The name of the bank branch of the sender of the funding. + attr_reader :sender_branch + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name end class UsBankTransfer < Stripe::StripeObject - attr_reader :network, :sender_name + # The banking network used for this funding. + attr_reader :network + # The full name of the sender, as supplied by the sending bank. + attr_reader :sender_name end - attr_reader :eu_bank_transfer, :gb_bank_transfer, :jp_bank_transfer, :reference, :type, :us_bank_transfer + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer + attr_reader :gb_bank_transfer + # Attribute for field jp_bank_transfer + attr_reader :jp_bank_transfer + # The user-supplied reference field on the bank transfer. + attr_reader :reference + # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type + # Attribute for field us_bank_transfer + attr_reader :us_bank_transfer end + # Attribute for field bank_transfer attr_reader :bank_transfer end class RefundedFromPayment < Stripe::StripeObject + # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. attr_reader :refund end class TransferredToBalance < Stripe::StripeObject + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. attr_reader :balance_transaction end class UnappliedFromPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. attr_reader :payment_intent end # Attribute for field adjusted_for_overdraft diff --git a/lib/stripe/resources/customer_session.rb b/lib/stripe/resources/customer_session.rb index 0d5ba8954..5cb553289 100644 --- a/lib/stripe/resources/customer_session.rb +++ b/lib/stripe/resources/customer_session.rb @@ -18,20 +18,151 @@ def self.object_name class Components < Stripe::StripeObject class BuyButton < Stripe::StripeObject + # Whether the buy button is enabled. attr_reader :enabled end class PaymentElement < Stripe::StripeObject class Features < Stripe::StripeObject - attr_reader :payment_method_allow_redisplay_filters, :payment_method_redisplay, :payment_method_redisplay_limit, :payment_method_remove, :payment_method_save, :payment_method_save_usage + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + attr_reader :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + attr_reader :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + attr_reader :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + attr_reader :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + attr_reader :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + attr_reader :payment_method_save_usage end - attr_reader :enabled, :features + # Whether the Payment Element is enabled. + attr_reader :enabled + # This hash defines whether the Payment Element supports certain features. + attr_reader :features end class PricingTable < Stripe::StripeObject + # Whether the pricing table is enabled. attr_reader :enabled end - attr_reader :buy_button, :payment_element, :pricing_table + # This hash contains whether the buy button is enabled. + attr_reader :buy_button + # This hash contains whether the Payment Element is enabled and the features it supports. + attr_reader :payment_element + # This hash contains whether the pricing table is enabled. + attr_reader :pricing_table + end + + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class BuyButton < Stripe::RequestParams + # Whether the buy button is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class PaymentElement < Stripe::RequestParams + class Features < Stripe::RequestParams + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + attr_accessor :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + attr_accessor :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + attr_accessor :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + attr_accessor :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + attr_accessor :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + attr_accessor :payment_method_save_usage + + def initialize( + payment_method_allow_redisplay_filters: nil, + payment_method_redisplay: nil, + payment_method_redisplay_limit: nil, + payment_method_remove: nil, + payment_method_save: nil, + payment_method_save_usage: nil + ) + super + @payment_method_allow_redisplay_filters = payment_method_allow_redisplay_filters + @payment_method_redisplay = payment_method_redisplay + @payment_method_redisplay_limit = payment_method_redisplay_limit + @payment_method_remove = payment_method_remove + @payment_method_save = payment_method_save + @payment_method_save_usage = payment_method_save_usage + end + end + # Whether the Payment Element is enabled. + attr_accessor :enabled + # This hash defines whether the Payment Element supports certain features. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PricingTable < Stripe::RequestParams + # Whether the pricing table is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # Configuration for buy button. + attr_accessor :buy_button + # Configuration for the Payment Element. + attr_accessor :payment_element + # Configuration for the pricing table. + attr_accessor :pricing_table + + def initialize(buy_button: nil, payment_element: nil, pricing_table: nil) + super + @buy_button = buy_button + @payment_element = payment_element + @pricing_table = pricing_table + end + end + # Configuration for each component. Exactly 1 component must be enabled. + attr_accessor :components + # The ID of an existing customer for which to create the Customer Session. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(components: nil, customer: nil, expand: nil) + super + @components = components + @customer = customer + @expand = expand + end end # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. # diff --git a/lib/stripe/resources/dispute.rb b/lib/stripe/resources/dispute.rb index 2bfc63802..b1f5cca1d 100644 --- a/lib/stripe/resources/dispute.rb +++ b/lib/stripe/resources/dispute.rb @@ -21,59 +21,595 @@ class EnhancedEvidence < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject class DisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :merchandise_or_services, :product_description, :shipping_address + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_reader :customer_device_id + # The email address of the customer. + attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. + attr_reader :customer_purchase_ip + # Categorization of disputed payment. + attr_reader :merchandise_or_services + # A description of the product or service that was sold. + attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :shipping_address end class PriorUndisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :charge, :customer_account_id, :customer_device_fingerprint, :customer_device_id, :customer_email_address, :customer_purchase_ip, :product_description, :shipping_address + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + attr_reader :charge + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_reader :customer_device_id + # The email address of the customer. + attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. + attr_reader :customer_purchase_ip + # A description of the product or service that was sold. + attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :shipping_address end - attr_reader :disputed_transaction, :prior_undisputed_transactions + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :prior_undisputed_transactions end class VisaCompliance < Stripe::StripeObject + # A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. attr_reader :fee_acknowledged end - attr_reader :visa_compelling_evidence_3, :visa_compliance + # Attribute for field visa_compelling_evidence_3 + attr_reader :visa_compelling_evidence_3 + # Attribute for field visa_compliance + attr_reader :visa_compliance end - attr_reader :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, :enhanced_evidence, :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 + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. + attr_reader :access_activity_log + # The billing address provided by the customer. + attr_reader :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + attr_reader :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. + attr_reader :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. + attr_reader :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + attr_reader :customer_communication + # The email address of the customer. + attr_reader :customer_email_address + # The name of the customer. + attr_reader :customer_name + # The IP address that the customer used when making the purchase. + attr_reader :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + attr_reader :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + attr_reader :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. + attr_reader :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + attr_reader :duplicate_charge_id + # Attribute for field enhanced_evidence + attr_reader :enhanced_evidence + # A description of the product or service that was sold. + attr_reader :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + attr_reader :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + attr_reader :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. + attr_reader :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. + attr_reader :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + attr_reader :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + attr_reader :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. + attr_reader :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + attr_reader :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. + attr_reader :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + attr_reader :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + attr_reader :uncategorized_file + # Any additional evidence or statements. + attr_reader :uncategorized_text end class EvidenceDetails < Stripe::StripeObject class EnhancedEligibility < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject - attr_reader :required_actions, :status + # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. + attr_reader :required_actions + # Visa Compelling Evidence 3.0 eligibility status. + attr_reader :status end class VisaCompliance < Stripe::StripeObject + # Visa Compelling Evidence 3.0 eligibility status. attr_reader :status end - attr_reader :visa_compelling_evidence_3, :visa_compliance + # Attribute for field visa_compelling_evidence_3 + attr_reader :visa_compelling_evidence_3 + # Attribute for field visa_compliance + attr_reader :visa_compliance end - attr_reader :due_by, :enhanced_eligibility, :has_evidence, :past_due, :submission_count + # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. + attr_reader :due_by + # Attribute for field enhanced_eligibility + attr_reader :enhanced_eligibility + # Whether evidence has been staged for this dispute. + attr_reader :has_evidence + # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. + attr_reader :past_due + # The number of times evidence has been submitted. Typically, you may only submit evidence once. + attr_reader :submission_count end class PaymentMethodDetails < Stripe::StripeObject class AmazonPay < Stripe::StripeObject + # The AmazonPay dispute type, chargeback or claim attr_reader :dispute_type end class Card < Stripe::StripeObject - attr_reader :brand, :case_type, :network_reason_code + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The type of dispute opened. Different case types may have varying fees and financial impact. + attr_reader :case_type + # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. + attr_reader :network_reason_code end class Klarna < Stripe::StripeObject + # The reason for the dispute as defined by Klarna attr_reader :reason_code end class Paypal < Stripe::StripeObject - attr_reader :case_id, :reason_code + # The ID of the dispute in PayPal. + attr_reader :case_id + # The reason for the dispute as defined by PayPal + attr_reader :reason_code + end + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field card + attr_reader :card + # Attribute for field klarna + attr_reader :klarna + # Attribute for field paypal + attr_reader :paypal + # Payment method type. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return disputes associated to the charge specified by this charge ID. + attr_accessor :charge + # Only return disputes that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class EnhancedEvidence < Stripe::RequestParams + class VisaCompellingEvidence3 < Stripe::RequestParams + class DisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_accessor :customer_device_id + # The email address of the customer. + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + attr_accessor :customer_purchase_ip + # Categorization of disputed payment. + attr_accessor :merchandise_or_services + # A description of the product or service that was sold. + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :shipping_address + + def initialize( + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + merchandise_or_services: nil, + product_description: nil, + shipping_address: nil + ) + super + @customer_account_id = customer_account_id + @customer_device_fingerprint = customer_device_fingerprint + @customer_device_id = customer_device_id + @customer_email_address = customer_email_address + @customer_purchase_ip = customer_purchase_ip + @merchandise_or_services = merchandise_or_services + @product_description = product_description + @shipping_address = shipping_address + end + end + + class PriorUndisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + attr_accessor :charge + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_accessor :customer_device_id + # The email address of the customer. + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + attr_accessor :customer_purchase_ip + # A description of the product or service that was sold. + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :shipping_address + + def initialize( + charge: nil, + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + product_description: nil, + shipping_address: nil + ) + super + @charge = charge + @customer_account_id = customer_account_id + @customer_device_fingerprint = customer_device_fingerprint + @customer_device_id = customer_device_id + @customer_email_address = customer_email_address + @customer_purchase_ip = customer_purchase_ip + @product_description = product_description + @shipping_address = shipping_address + end + end + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :prior_undisputed_transactions + + def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil) + super + @disputed_transaction = disputed_transaction + @prior_undisputed_transactions = prior_undisputed_transactions + end + end + + class VisaCompliance < Stripe::RequestParams + # A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. + attr_accessor :fee_acknowledged + + def initialize(fee_acknowledged: nil) + super + @fee_acknowledged = fee_acknowledged + end + end + # Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :visa_compelling_evidence_3 + # Evidence provided for Visa Compliance evidence submission. + attr_accessor :visa_compliance + + def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil) + super + @visa_compelling_evidence_3 = visa_compelling_evidence_3 + @visa_compliance = visa_compliance + end + end + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. + attr_accessor :access_activity_log + # The billing address provided by the customer. + attr_accessor :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + attr_accessor :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + attr_accessor :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + attr_accessor :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + attr_accessor :customer_communication + # The email address of the customer. + attr_accessor :customer_email_address + # The name of the customer. + attr_accessor :customer_name + # The IP address that the customer used when making the purchase. + attr_accessor :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + attr_accessor :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + attr_accessor :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + attr_accessor :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + attr_accessor :duplicate_charge_id + # Additional evidence for qualifying evidence programs. + attr_accessor :enhanced_evidence + # A description of the product or service that was sold. Has a maximum character count of 20,000. + attr_accessor :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + attr_accessor :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + attr_accessor :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + attr_accessor :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + attr_accessor :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + attr_accessor :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + attr_accessor :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. + attr_accessor :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + attr_accessor :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. + attr_accessor :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + attr_accessor :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + attr_accessor :uncategorized_file + # Any additional evidence or statements. Has a maximum character count of 20,000. + attr_accessor :uncategorized_text + + def initialize( + access_activity_log: nil, + billing_address: nil, + cancellation_policy: nil, + cancellation_policy_disclosure: nil, + cancellation_rebuttal: nil, + customer_communication: nil, + customer_email_address: nil, + customer_name: nil, + customer_purchase_ip: nil, + customer_signature: nil, + duplicate_charge_documentation: nil, + duplicate_charge_explanation: nil, + duplicate_charge_id: nil, + enhanced_evidence: nil, + product_description: nil, + receipt: nil, + refund_policy: nil, + refund_policy_disclosure: nil, + refund_refusal_explanation: nil, + service_date: nil, + service_documentation: nil, + shipping_address: nil, + shipping_carrier: nil, + shipping_date: nil, + shipping_documentation: nil, + shipping_tracking_number: nil, + uncategorized_file: nil, + uncategorized_text: nil + ) + super + @access_activity_log = access_activity_log + @billing_address = billing_address + @cancellation_policy = cancellation_policy + @cancellation_policy_disclosure = cancellation_policy_disclosure + @cancellation_rebuttal = cancellation_rebuttal + @customer_communication = customer_communication + @customer_email_address = customer_email_address + @customer_name = customer_name + @customer_purchase_ip = customer_purchase_ip + @customer_signature = customer_signature + @duplicate_charge_documentation = duplicate_charge_documentation + @duplicate_charge_explanation = duplicate_charge_explanation + @duplicate_charge_id = duplicate_charge_id + @enhanced_evidence = enhanced_evidence + @product_description = product_description + @receipt = receipt + @refund_policy = refund_policy + @refund_policy_disclosure = refund_policy_disclosure + @refund_refusal_explanation = refund_refusal_explanation + @service_date = service_date + @service_documentation = service_documentation + @shipping_address = shipping_address + @shipping_carrier = shipping_carrier + @shipping_date = shipping_date + @shipping_documentation = shipping_documentation + @shipping_tracking_number = shipping_tracking_number + @uncategorized_file = uncategorized_file + @uncategorized_text = uncategorized_text + end + end + # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + attr_accessor :submit + + def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil) + super + @evidence = evidence + @expand = expand + @metadata = metadata + @submit = submit + end + end + + class CloseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :amazon_pay, :card, :klarna, :paypal, :type end # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). attr_reader :amount @@ -137,8 +673,8 @@ def self.close(dispute, params = {}, opts = {}) end # Returns a list of your disputes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/disputes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/disputes", params: params, opts: opts) end # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. diff --git a/lib/stripe/resources/entitlements/active_entitlement.rb b/lib/stripe/resources/entitlements/active_entitlement.rb index 76dd2e814..e86a55412 100644 --- a/lib/stripe/resources/entitlements/active_entitlement.rb +++ b/lib/stripe/resources/entitlements/active_entitlement.rb @@ -12,6 +12,43 @@ def self.object_name "entitlements.active_entitlement" end + class ListParams < Stripe::RequestParams + # The ID of the customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. attr_reader :feature # Unique identifier for the object. @@ -24,11 +61,11 @@ def self.object_name attr_reader :object # Retrieve a list of active entitlements for a customer - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/entitlements/active_entitlements", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/entitlements/feature.rb b/lib/stripe/resources/entitlements/feature.rb index 818f93eda..91cb030fb 100644 --- a/lib/stripe/resources/entitlements/feature.rb +++ b/lib/stripe/resources/entitlements/feature.rb @@ -15,6 +15,85 @@ def self.object_name "entitlements.feature" end + class ListParams < Stripe::RequestParams + # If set, filter results to only include features with the given archive status. + attr_accessor :archived + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # If set, filter results to only include features with the given lookup_key. + attr_accessor :lookup_key + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + archived: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_key: nil, + starting_after: nil + ) + super + @archived = archived + @ending_before = ending_before + @expand = expand + @limit = limit + @lookup_key = lookup_key + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A unique key you provide as your own system identifier. This may be up to 80 characters. + attr_accessor :lookup_key + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + attr_accessor :name + + def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil) + super + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @name = name + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + attr_accessor :name + + def initialize(active: nil, expand: nil, metadata: nil, name: nil) + super + @active = active + @expand = expand + @metadata = metadata + @name = name + end + end # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. attr_reader :active # Unique identifier for the object. @@ -41,11 +120,11 @@ def self.create(params = {}, opts = {}) end # Retrieve a list of features - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/entitlements/features", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/ephemeral_key.rb b/lib/stripe/resources/ephemeral_key.rb index 55ace3a75..2357eedea 100644 --- a/lib/stripe/resources/ephemeral_key.rb +++ b/lib/stripe/resources/ephemeral_key.rb @@ -11,6 +11,15 @@ def self.object_name "ephemeral_key" end + class DeleteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Time at which the key will expire. Measured in seconds since the Unix epoch. diff --git a/lib/stripe/resources/event.rb b/lib/stripe/resources/event.rb index 881dd9a7e..b5c940f4b 100644 --- a/lib/stripe/resources/event.rb +++ b/lib/stripe/resources/event.rb @@ -41,25 +41,114 @@ def self.object_name end class Data < Stripe::StripeObject - attr_reader :object, :previous_attributes + # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. + attr_reader :object + # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. + attr_reader :previous_attributes end class Reason < Stripe::StripeObject class AutomationAction < Stripe::StripeObject class StripeSendWebhookCustomEvent < Stripe::StripeObject + # Set of key-value pairs attached to the action when creating an Automation. attr_reader :custom_data end - attr_reader :stripe_send_webhook_custom_event, :trigger, :type + # Attribute for field stripe_send_webhook_custom_event + attr_reader :stripe_send_webhook_custom_event + # The trigger name of the automation that triggered this action. + # Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. + attr_reader :trigger + # The type of the `automation_action`. + attr_reader :type end class Request < Stripe::StripeObject - attr_reader :id, :idempotency_key + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + attr_reader :idempotency_key end - attr_reader :automation_action, :request, :type + # Attribute for field automation_action + attr_reader :automation_action + # Attribute for field request + attr_reader :request + # The type of the reason for the event. + attr_reader :type end class Request < Stripe::StripeObject - attr_reader :id, :idempotency_key + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. + attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. + attr_reader :idempotency_key + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return events that were created during the given date interval. + attr_accessor :created + # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. + attr_accessor :delivery_success + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. + attr_accessor :type + # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. + attr_accessor :types + + def initialize( + created: nil, + delivery_success: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + types: nil + ) + super + @created = created + @delivery_success = delivery_success + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + @types = types + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # The connected account that originates the event. attr_reader :account @@ -85,8 +174,8 @@ class Request < Stripe::StripeObject attr_reader :type # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/events", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/events", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/exchange_rate.rb b/lib/stripe/resources/exchange_rate.rb index cf00aa263..ed4dd4396 100644 --- a/lib/stripe/resources/exchange_rate.rb +++ b/lib/stripe/resources/exchange_rate.rb @@ -36,6 +36,34 @@ def self.object_name "exchange_rate" end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. attr_reader :id # String representing the object's type. Objects of the same type share the same value. @@ -44,8 +72,8 @@ def self.object_name attr_reader :rates # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/exchange_rates", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/exchange_rates", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/file.rb b/lib/stripe/resources/file.rb index 0f490f61a..823f91d5b 100644 --- a/lib/stripe/resources/file.rb +++ b/lib/stripe/resources/file.rb @@ -18,6 +18,99 @@ def self.object_name "file" end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return files that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + attr_accessor :purpose + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + purpose: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @purpose = purpose + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class FileLinkData < Stripe::RequestParams + # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + attr_accessor :create + # The link isn't available after this future timestamp. + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(create: nil, expires_at: nil, metadata: nil) + super + @create = create + @expires_at = expires_at + @metadata = metadata + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. + attr_accessor :file + # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + attr_accessor :file_link_data + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + attr_accessor :purpose + + def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil) + super + @expand = expand + @file = file + @file_link_data = file_link_data + @purpose = purpose + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # The file expires and isn't available at this time in epoch seconds. @@ -61,8 +154,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/files", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/files", params: params, opts: opts) end # This resource can have two different object names. In latter API diff --git a/lib/stripe/resources/file_link.rb b/lib/stripe/resources/file_link.rb index 52b89a9c1..5e4da1cd0 100644 --- a/lib/stripe/resources/file_link.rb +++ b/lib/stripe/resources/file_link.rb @@ -15,6 +15,104 @@ def self.object_name "file_link" end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return links that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Filter links by their expiration status. By default, Stripe returns all links. + attr_accessor :expired + # Only return links for the given file. + attr_accessor :file + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + expired: nil, + file: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @expired = expired + @file = file + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The link isn't usable after this future timestamp. + attr_accessor :expires_at + # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + attr_accessor :file + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil) + super + @expand = expand + @expires_at = expires_at + @file = file + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, expires_at: nil, metadata: nil) + super + @expand = expand + @expires_at = expires_at + @metadata = metadata + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Returns if the link is already expired. @@ -40,8 +138,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of file links. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/file_links", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/file_links", params: params, opts: opts) end # Updates an existing file link object. Expired links can no longer be updated. diff --git a/lib/stripe/resources/financial_connections/account.rb b/lib/stripe/resources/financial_connections/account.rb index ecd842c08..500aae678 100644 --- a/lib/stripe/resources/financial_connections/account.rb +++ b/lib/stripe/resources/financial_connections/account.rb @@ -16,34 +16,215 @@ def self.object_name nested_resource_class_methods :inferred_balance, operations: %i[list] class AccountHolder < Stripe::StripeObject - attr_reader :account, :customer, :type + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + attr_reader :customer + # Type of account holder that this account belongs to. + attr_reader :type end class Balance < Stripe::StripeObject class Cash < Stripe::StripeObject + # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :available end class Credit < Stripe::StripeObject + # The credit that has been used by the account holder. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. attr_reader :used end - attr_reader :as_of, :cash, :credit, :current, :type + # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. + attr_reader :as_of + # Attribute for field cash + attr_reader :cash + # Attribute for field credit + attr_reader :credit + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + attr_reader :current + # The `type` of the balance. An additional hash is included on the balance with a name matching this value. + attr_reader :type end class BalanceRefresh < Stripe::StripeObject - attr_reader :last_attempted_at, :next_refresh_available_at, :status + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end class InferredBalancesRefresh < Stripe::StripeObject - attr_reader :last_attempted_at, :next_refresh_available_at, :status + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end class OwnershipRefresh < Stripe::StripeObject - attr_reader :last_attempted_at, :next_refresh_available_at, :status + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status end class TransactionRefresh < Stripe::StripeObject - attr_reader :id, :last_attempted_at, :next_refresh_available_at, :status + # Unique identifier for the object. + attr_reader :id + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. + attr_reader :last_attempted_at + # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. + attr_reader :next_refresh_available_at + # The status of the last refresh attempt. + attr_reader :status + end + + class ListParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. + attr_accessor :customer + + def initialize(account: nil, customer: nil) + super + @account = account + @customer = customer + end + end + # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. + attr_accessor :account_holder + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # If present, only return accounts that were collected as part of the given session. + attr_accessor :session + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + account_holder: nil, + ending_before: nil, + expand: nil, + limit: nil, + session: nil, + starting_after: nil + ) + super + @account_holder = account_holder + @ending_before = ending_before + @expand = expand + @limit = limit + @session = session + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListOwnersParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The ID of the ownership object to fetch owners from. + attr_accessor :ownership + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + ownership: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @ownership = ownership + @starting_after = starting_after + end + end + + class DisconnectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RefreshAccountParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The list of account features that you would like to refresh. + attr_accessor :features + + def initialize(expand: nil, features: nil) + super + @expand = expand + @features = features + end + end + + class SubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The list of account features to which you would like to subscribe. + attr_accessor :features + + def initialize(expand: nil, features: nil) + super + @expand = expand + @features = features + end + end + + class UnsubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The list of account features from which you would like to unsubscribe. + attr_accessor :features + + def initialize(expand: nil, features: nil) + super + @expand = expand + @features = features + end end # The account holder that this account belongs to. attr_reader :account_holder @@ -120,11 +301,11 @@ def self.disconnect(account, params = {}, opts = {}) end # Returns a list of Financial Connections Account objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/accounts", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/financial_connections/institution.rb b/lib/stripe/resources/financial_connections/institution.rb index 8bf8f0b03..e26a61c2b 100644 --- a/lib/stripe/resources/financial_connections/institution.rb +++ b/lib/stripe/resources/financial_connections/institution.rb @@ -14,21 +14,61 @@ def self.object_name class Features < Stripe::StripeObject class Balances < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end class Ownership < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end class PaymentMethod < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end class Transactions < Stripe::StripeObject + # Whether the given feature is supported by this institution. attr_reader :supported end - attr_reader :balances, :ownership, :payment_method, :transactions + # Attribute for field balances + attr_reader :balances + # Attribute for field ownership + attr_reader :ownership + # Attribute for field payment_method + attr_reader :payment_method + # Attribute for field transactions + attr_reader :transactions + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Attribute for field features attr_reader :features @@ -48,11 +88,11 @@ class Transactions < Stripe::StripeObject attr_reader :url # Returns a list of Financial Connections Institution objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/institutions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/financial_connections/session.rb b/lib/stripe/resources/financial_connections/session.rb index 5ceb2036f..b7ff0cdf5 100644 --- a/lib/stripe/resources/financial_connections/session.rb +++ b/lib/stripe/resources/financial_connections/session.rb @@ -13,14 +13,25 @@ def self.object_name end class AccountHolder < Stripe::StripeObject - attr_reader :account, :customer, :type + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. + attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. + attr_reader :customer + # Type of account holder that this account belongs to. + attr_reader :type end class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :countries, :institution + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + attr_reader :account_subcategories + # List of countries from which to filter accounts. + attr_reader :countries + # Stripe ID of the institution with which the customer should be directed to log in. + attr_reader :institution end class Limits < Stripe::StripeObject + # The number of accounts that can be linked in this Session. attr_reader :accounts end @@ -28,10 +39,115 @@ class ManualEntry < Stripe::StripeObject; end class StatusDetails < Stripe::StripeObject class Cancelled < Stripe::StripeObject + # The reason for the Session being cancelled. attr_reader :reason end + # Attribute for field cancelled attr_reader :cancelled end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. + attr_accessor :customer + # Type of account holder to collect accounts for. + attr_accessor :type + + def initialize(account: nil, customer: nil, type: nil) + super + @account = account + @customer = customer + @type = type + end + end + + class Filters < Stripe::RequestParams + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + attr_accessor :account_subcategories + # List of countries from which to collect accounts. + attr_accessor :countries + # Stripe ID of the institution with which the customer should be directed to log in. + attr_accessor :institution + + def initialize(account_subcategories: nil, countries: nil, institution: nil) + super + @account_subcategories = account_subcategories + @countries = countries + @institution = institution + end + end + + class Limits < Stripe::RequestParams + # The number of accounts that can be linked in this Session. + attr_accessor :accounts + + def initialize(accounts: nil) + super + @accounts = accounts + end + end + + class ManualEntry < Stripe::RequestParams + # Whether manual entry will be handled by Stripe during the Session. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # The account holder to link accounts for. + attr_accessor :account_holder + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Filters to restrict the kinds of accounts to collect. + attr_accessor :filters + # Settings for configuring Session-specific limits. + attr_accessor :limits + # Settings for configuring manual entry of account details for this Session. + attr_accessor :manual_entry + # List of data features that you would like to request access to. + # + # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + account_holder: nil, + expand: nil, + filters: nil, + limits: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @account_holder = account_holder + @expand = expand + @filters = filters + @limits = limits + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end # The account holder for whom accounts are collected in this session. attr_reader :account_holder # The accounts that were collected as part of this Session. diff --git a/lib/stripe/resources/financial_connections/transaction.rb b/lib/stripe/resources/financial_connections/transaction.rb index 1bf15f3cb..9703eb85c 100644 --- a/lib/stripe/resources/financial_connections/transaction.rb +++ b/lib/stripe/resources/financial_connections/transaction.rb @@ -13,7 +13,84 @@ def self.object_name end class StatusTransitions < Stripe::StripeObject - attr_reader :posted_at, :void_at + # Time at which this transaction posted. Measured in seconds since the Unix epoch. + attr_reader :posted_at + # Time at which this transaction was voided. Measured in seconds since the Unix epoch. + attr_reader :void_at + end + + class ListParams < Stripe::RequestParams + class TransactedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class TransactionRefresh < Stripe::RequestParams + # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). + attr_accessor :after + + def initialize(after: nil) + super + @after = after + end + end + # The ID of the Stripe account whose transactions will be retrieved. + attr_accessor :account + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: + attr_accessor :transacted_at + # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: + attr_accessor :transaction_refresh + + def initialize( + account: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transacted_at: nil, + transaction_refresh: nil + ) + super + @account = account + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @transacted_at = transacted_at + @transaction_refresh = transaction_refresh + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # The ID of the Financial Connections Account this transaction belongs to. attr_reader :account @@ -41,11 +118,11 @@ class StatusTransitions < Stripe::StripeObject attr_reader :updated # Returns a list of Financial Connections Transaction objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/financial_connections/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/forwarding/request.rb b/lib/stripe/resources/forwarding/request.rb index c66e94fdc..7b0e11344 100644 --- a/lib/stripe/resources/forwarding/request.rb +++ b/lib/stripe/resources/forwarding/request.rb @@ -29,21 +29,152 @@ def self.object_name end class RequestContext < Stripe::StripeObject - attr_reader :destination_duration, :destination_ip_address + # The time it took in milliseconds for the destination endpoint to respond. + attr_reader :destination_duration + # The IP address of the destination. + attr_reader :destination_ip_address end class RequestDetails < Stripe::StripeObject class Header < Stripe::StripeObject - attr_reader :name, :value + # The header name. + attr_reader :name + # The header value. + attr_reader :value end - attr_reader :body, :headers, :http_method + # The body payload to send to the destination endpoint. + attr_reader :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + attr_reader :headers + # The HTTP method used to call the destination endpoint. + attr_reader :http_method end class ResponseDetails < Stripe::StripeObject class Header < Stripe::StripeObject - attr_reader :name, :value + # The header name. + attr_reader :name + # The header value. + attr_reader :value + end + # The response body from the destination endpoint to Stripe. + attr_reader :body + # HTTP headers that the destination endpoint returned. + attr_reader :headers + # The HTTP status code that the destination endpoint returned. + attr_reader :status + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Return results where the `created` field is greater than this value. + attr_accessor :gt + # Return results where the `created` field is greater than or equal to this value. + attr_accessor :gte + # Return results where the `created` field is less than this value. + attr_accessor :lt + # Return results where the `created` field is less than or equal to this value. + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. + attr_accessor :created + # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Request < Stripe::RequestParams + class Header < Stripe::RequestParams + # The header name. + attr_accessor :name + # The header value. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + # The body payload to send to the destination endpoint. + attr_accessor :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + attr_accessor :headers + + def initialize(body: nil, headers: nil) + super + @body = body + @headers = headers + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + attr_accessor :payment_method + # The field kinds to be replaced in the forwarded request. + attr_accessor :replacements + # The request body and headers to be sent to the destination endpoint. + attr_accessor :request + # The destination URL for the forwarded request. Must be supported by the config. + attr_accessor :url + + def initialize( + expand: nil, + metadata: nil, + payment_method: nil, + replacements: nil, + request: nil, + url: nil + ) + super + @expand = expand + @metadata = metadata + @payment_method = payment_method + @replacements = replacements + @request = request + @url = url + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :body, :headers, :status end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -79,11 +210,11 @@ def self.create(params = {}, opts = {}) end # Lists all ForwardingRequest objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/forwarding/requests", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/funding_instructions.rb b/lib/stripe/resources/funding_instructions.rb index c43585f17..62f5ccf80 100644 --- a/lib/stripe/resources/funding_instructions.rb +++ b/lib/stripe/resources/funding_instructions.rb @@ -17,72 +17,298 @@ class BankTransfer < Stripe::StripeObject class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The ABA account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The ABA routing number + attr_reader :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :bank_address, :bic, :country, :iban + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address + # The BIC/SWIFT code of the account. + attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # The IBAN of the account. + attr_reader :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :bank_address, :sort_code + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # Attribute for field bank_address + attr_reader :bank_address + # The six-digit sort code + attr_reader :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :bank_address, :bank_code, :bank_name, :clabe + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address + # The three-digit bank code + attr_reader :bank_code + # The short banking institution name + attr_reader :bank_name + # The CLABE number + attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The SWIFT code + attr_reader :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_code, :bank_name, :branch_code, :branch_name + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank code of the account + attr_reader :bank_code + # The bank name of the account + attr_reader :bank_name + # The branch code of the account + attr_reader :branch_code + # The branch name of the account + attr_reader :branch_name end - attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin + # ABA Records contain U.S. bank account details per the ABA format. + attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. + attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. + attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. + attr_reader :spei + # The payment networks supported by this FinancialAddress + attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. + attr_reader :swift + # The type of financial address + attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. + attr_reader :zengin end - attr_reader :country, :financial_addresses, :type + # The country of the bank account to fund + attr_reader :country + # A list of financial addresses that can be used to fund a particular balance + attr_reader :financial_addresses + # The bank_transfer type + attr_reader :type end # Attribute for field bank_transfer attr_reader :bank_transfer diff --git a/lib/stripe/resources/gift_cards/card.rb b/lib/stripe/resources/gift_cards/card.rb index b8fd8e4cd..99d87e34a 100644 --- a/lib/stripe/resources/gift_cards/card.rb +++ b/lib/stripe/resources/gift_cards/card.rb @@ -17,17 +17,145 @@ def self.object_name class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - attr_reader :checkout_session, :line_item + # The Stripe CheckoutSession that created this object. + attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. + attr_reader :line_item end class Order < Stripe::StripeObject - attr_reader :line_item, :order + # The Stripe Order LineItem that created this object. + attr_reader :line_item + # The Stripe Order that created this object. + attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. attr_reader :payment_intent end - attr_reader :checkout, :order, :payment, :type + # Attribute for field checkout + attr_reader :checkout + # Attribute for field order + attr_reader :order + # Attribute for field payment + attr_reader :payment + # The type of event that created this object. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + attr_accessor :payment_intent + + def initialize(payment_intent: nil) + super + @payment_intent = payment_intent + end + end + # The details for the payment that created this object. + attr_accessor :payment + # The type of event that created this object. + attr_accessor :type + + def initialize(payment: nil, type: nil) + super + @payment = payment + @type = type + end + end + # The active state for the new gift card, defaults to false. The active state can be updated after creation. + attr_accessor :active + # Related objects which created this gift card. + attr_accessor :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The initial amount to load onto the new gift card, defaults to 0. + attr_accessor :initial_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + active: nil, + created_by: nil, + currency: nil, + expand: nil, + initial_amount: nil, + metadata: nil + ) + super + @active = active + @created_by = created_by + @currency = currency + @expand = expand + @initial_amount = initial_amount + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # The new active state for the gift card. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(active: nil, expand: nil, metadata: nil) + super + @active = active + @expand = expand + @metadata = metadata + end + end + + class ValidateParams < Stripe::RequestParams + # The gift card code to be validated. + attr_accessor :code + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The pin associated with the gift card. Not all gift cards have pins. + attr_accessor :giftcard_pin + + def initialize(code: nil, expand: nil, giftcard_pin: nil) + super + @code = code + @expand = expand + @giftcard_pin = giftcard_pin + end end # Whether this gift card can be used or not. attr_reader :active @@ -63,11 +191,11 @@ def self.create(params = {}, opts = {}) end # List gift cards for an account - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/gift_cards/cards", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/gift_cards/transaction.rb b/lib/stripe/resources/gift_cards/transaction.rb index 88b538ce2..9e1f2c825 100644 --- a/lib/stripe/resources/gift_cards/transaction.rb +++ b/lib/stripe/resources/gift_cards/transaction.rb @@ -21,17 +21,174 @@ def self.object_name class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject - attr_reader :checkout_session, :line_item + # The Stripe CheckoutSession that created this object. + attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. + attr_reader :line_item end class Order < Stripe::StripeObject - attr_reader :line_item, :order + # The Stripe Order LineItem that created this object. + attr_reader :line_item + # The Stripe Order that created this object. + attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. attr_reader :payment_intent end - attr_reader :checkout, :order, :payment, :type + # Attribute for field checkout + attr_reader :checkout + # Attribute for field order + attr_reader :order + # Attribute for field payment + attr_reader :payment + # The type of event that created this object. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The gift card to list transactions for. + attr_accessor :gift_card + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + ending_before: nil, + expand: nil, + gift_card: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ) + super + @ending_before = ending_before + @expand = expand + @gift_card = gift_card + @limit = limit + @starting_after = starting_after + @transfer_group = transfer_group + end + end + + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + attr_accessor :payment_intent + + def initialize(payment_intent: nil) + super + @payment_intent = payment_intent + end + end + # The details for the payment that created this object. + attr_accessor :payment + # The type of event that created this object. + attr_accessor :type + + def initialize(payment: nil, type: nil) + super + @payment = payment + @type = type + end + end + # The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds. + attr_accessor :amount + # Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the `amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card. + attr_accessor :confirm + # Related objects which created this transaction. + attr_accessor :created_by + # The currency of the transaction. This must match the currency of the gift card. + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The gift card to create a new transaction on. + attr_accessor :gift_card + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + amount: nil, + confirm: nil, + created_by: nil, + currency: nil, + description: nil, + expand: nil, + gift_card: nil, + metadata: nil, + transfer_group: nil + ) + super + @amount = amount + @confirm = confirm + @created_by = created_by + @currency = currency + @description = description + @expand = expand + @gift_card = gift_card + @metadata = metadata + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ConfirmParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. attr_reader :amount @@ -109,11 +266,11 @@ def self.create(params = {}, opts = {}) end # List gift card transactions for a gift card - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/gift_cards/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/identity/verification_report.rb b/lib/stripe/resources/identity/verification_report.rb index 37f4a6a73..e5e39be3d 100644 --- a/lib/stripe/resources/identity/verification_report.rb +++ b/lib/stripe/resources/identity/verification_report.rb @@ -24,66 +24,243 @@ def self.object_name class Document < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end class ExpirationDate < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end class IssuedDate < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end - attr_reader :address, :dob, :error, :expiration_date, :files, :first_name, :issued_date, :issuing_country, :last_name, :number, :status, :type + # Address as it appears in the document. + attr_reader :address + # Date of birth as it appears in the document. + attr_reader :dob + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # Expiration date of the document. + attr_reader :expiration_date + # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. + attr_reader :files + # First name as it appears in the document. + attr_reader :first_name + # Issued date of the document. + attr_reader :issued_date + # Issuing country of the document. + attr_reader :issuing_country + # Last name as it appears in the document. + attr_reader :last_name + # Document ID number. + attr_reader :number + # Status of this `document` check. + attr_reader :status + # Type of the document. + attr_reader :type end class Email < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :email, :error, :status + # Email to be verified. + attr_reader :email + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # Status of this `email` check. + attr_reader :status end class IdNumber < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year end class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :dob, :error, :first_name, :id_number, :id_number_type, :last_name, :status + # Date of birth. + attr_reader :dob + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # First name. + attr_reader :first_name + # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. + attr_reader :id_number + # Type of ID number. + attr_reader :id_number_type + # Last name. + attr_reader :last_name + # Status of this `id_number` check. + attr_reader :status end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_reader :require_matching_selfie end class IdNumber < Stripe::StripeObject; end - attr_reader :document, :id_number + # Attribute for field document + attr_reader :document + # Attribute for field id_number + attr_reader :id_number end class Phone < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason end - attr_reader :error, :phone, :status + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # Phone to be verified. + attr_reader :phone + # Status of this `phone` check. + attr_reader :status end class Selfie < Stripe::StripeObject class Error < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification failure. + attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. + attr_reader :reason + end + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. + attr_reader :document + # Details on the verification error. Present when status is `unverified`. + attr_reader :error + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. + attr_reader :selfie + # Status of this `selfie` check. + attr_reader :status + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_accessor :client_reference_id + # Only return VerificationReports that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return VerificationReports of this type + attr_accessor :type + # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + attr_accessor :verification_session + + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + verification_session: nil + ) + super + @client_reference_id = client_reference_id + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + @verification_session = verification_session + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :document, :error, :selfie, :status end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id @@ -115,11 +292,11 @@ class Error < Stripe::StripeObject attr_reader :verification_session # List all verification reports. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/identity/verification_reports", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/identity/verification_session.rb b/lib/stripe/resources/identity/verification_session.rb index dc8ce7ece..e1b9bb04d 100644 --- a/lib/stripe/resources/identity/verification_session.rb +++ b/lib/stripe/resources/identity/verification_session.rb @@ -25,43 +25,341 @@ def self.object_name end class LastError < Stripe::StripeObject - attr_reader :code, :reason + # A short machine-readable string giving the reason for the verification or user-session failure. + attr_reader :code + # A message that explains the reason for verification or user-session failure. + attr_reader :reason end class Options < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :allowed_types, :require_id_number, :require_live_capture, :require_matching_selfie + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_reader :require_matching_selfie end class Email < Stripe::StripeObject + # Request one time password verification of `provided_details.email`. attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end class Phone < Stripe::StripeObject + # Request one time password verification of `provided_details.phone`. attr_reader :require_verification end - attr_reader :document, :email, :id_number, :phone + # Attribute for field document + attr_reader :document + # Attribute for field email + attr_reader :email + # Attribute for field id_number + attr_reader :id_number + # Attribute for field phone + attr_reader :phone end class ProvidedDetails < Stripe::StripeObject - attr_reader :email, :phone + # Email of user being verified + attr_reader :email + # Phone number of user being verified + attr_reader :phone end class Redaction < Stripe::StripeObject + # Indicates whether this object and its related objects have been redacted or not. attr_reader :status end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # Numerical day between 1 and 31. + attr_reader :day + # Numerical month between 1 and 12. + attr_reader :month + # The four-digit year. + attr_reader :year + end + # The user's verified address. + attr_reader :address + # The user’s verified date of birth. + attr_reader :dob + # The user's verified email address + attr_reader :email + # The user's verified first name. + attr_reader :first_name + # The user's verified id number. + attr_reader :id_number + # The user's verified id number type. + attr_reader :id_number_type + # The user's verified last name. + attr_reader :last_name + # The user's verified phone number + attr_reader :phone + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_accessor :client_reference_id + # Only return VerificationSessions that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Attribute for param field related_customer + attr_accessor :related_customer + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + attr_accessor :status + + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + related_customer: nil, + starting_after: nil, + status: nil + ) + super + @client_reference_id = client_reference_id + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @related_customer = related_customer + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_accessor :require_matching_selfie + + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ) + super + @allowed_types = allowed_types + @require_id_number = require_id_number + @require_live_capture = require_live_capture + @require_matching_selfie = require_matching_selfie + end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + attr_accessor :email + # Phone number of user being verified + attr_accessor :phone + + def initialize(email: nil, phone: nil) + super + @email = email + @phone = phone + end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_accessor :client_reference_id + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A set of options for the session’s verification checks. + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + attr_accessor :provided_details + # Token referencing a Customer resource. + attr_accessor :related_customer + # The URL that the user will be redirected to upon completing the verification flow. + attr_accessor :return_url + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. + attr_accessor :type + # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + attr_accessor :verification_flow + + def initialize( + client_reference_id: nil, + expand: nil, + metadata: nil, + options: nil, + provided_details: nil, + related_customer: nil, + return_url: nil, + type: nil, + verification_flow: nil + ) + super + @client_reference_id = client_reference_id + @expand = expand + @metadata = metadata + @options = options + @provided_details = provided_details + @related_customer = related_customer + @return_url = return_url + @type = type + @verification_flow = verification_flow + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_accessor :require_matching_selfie + + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ) + super + @allowed_types = allowed_types + @require_id_number = require_id_number + @require_live_capture = require_live_capture + @require_matching_selfie = require_matching_selfie + end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + attr_accessor :email + # Phone number of user being verified + attr_accessor :phone + + def initialize(email: nil, phone: nil) + super + @email = email + @phone = phone + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A set of options for the session’s verification checks. + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + attr_accessor :provided_details + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + attr_accessor :type + + def initialize(expand: nil, metadata: nil, options: nil, provided_details: nil, type: nil) + super + @expand = expand + @metadata = metadata + @options = options + @provided_details = provided_details + @type = type + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RedactParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :address, :dob, :email, :first_name, :id_number, :id_number_type, :last_name, :phone end # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. attr_reader :client_reference_id @@ -141,11 +439,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of VerificationSessions - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/identity/verification_sessions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/invoice.rb b/lib/stripe/resources/invoice.rb index 70c715bb5..697c221bf 100644 --- a/lib/stripe/resources/invoice.rb +++ b/lib/stripe/resources/invoice.rb @@ -51,75 +51,222 @@ def self.object_name nested_resource_class_methods :payment, operations: %i[retrieve list] class AmountsDue < Stripe::StripeObject - attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status + # Incremental amount due for this payment in cents (or local equivalent). + attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. + attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. + attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Date on which a payment plan’s payment is due. + attr_reader :due_date + # Timestamp when the payment was paid. + attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` + attr_reader :status end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability, :status + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. + attr_reader :status end class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class CustomerAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end class FromInvoice < Stripe::StripeObject - attr_reader :action, :invoice + # The relation between this invoice and the cloned invoice + attr_reader :action + # The invoice that was cloned. + attr_reader :invoice end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class LastFinalizationError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. attr_reader :transaction_type end - attr_reader :mandate_options, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. attr_reader :enabled end - attr_reader :installments, :request_three_d_secure + # Attribute for field installments + attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -129,74 +276,7971 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end - attr_reader :filters, :permissions, :prefetch + # Attribute for field filters + attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch end - attr_reader :financial_connections, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :us_bank_account end - attr_reader :default_mandate, :payment_method_options, :payment_method_types + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. attr_reader :page_size end - attr_reader :amount_tax_display, :pdf, :template, :template_version + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + attr_reader :amount_tax_display + # Invoice pdf rendering options + attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. + attr_reader :template + # Version of the rendering template that the invoice is using. + attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this invoice. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject - attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at + # The time that the invoice draft was finalized. + attr_reader :finalized_at + # The time that the invoice was marked uncollectible. + attr_reader :marked_uncollectible_at + # The time that the invoice was paid. + attr_reader :paid_at + # The time that the invoice was voided. + attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - attr_reader :behavior, :resumes_at + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_reader :behavior + # The time after which the subscription will resume collecting payments. + attr_reader :resumes_at end - attr_reader :metadata, :pause_collection + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - attr_reader :line_item_ids, :usage_gte + # The IDs of the line items that triggered the threshold invoice. + attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. + attr_reader :usage_gte end - attr_reader :amount_gte, :item_reasons + # The total invoice amount threshold boundary if it triggered the threshold invoice. + attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. + attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject - attr_reader :amount, :margin + # The amount, in cents (or local equivalent), of the reduction in line item amount. + attr_reader :amount + # The margin that was applied to get this margin amount. + attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # The margin that was applied to get this pretax credit amount. + attr_reader :margin + # Type of the pretax credit amount referenced. + attr_reader :type end class TotalTaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Date on which a payment plan’s payment is due. + attr_accessor :due_date + + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil) + super + @amount = amount + @days_until_due = days_until_due + @description = description + @due_date = due_date + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + attr_accessor :enabled + # The selected installment plan to use for this invoice. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(installments: nil, request_three_d_secure: nil) + super + @installments = installments + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + + def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil) + super + @default_mandate = default_mandate + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + end + end + + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + attr_accessor :page_size + + def initialize(page_size: nil) + super + @page_size = page_size + end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # Invoice pdf rendering options + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + attr_accessor :template_version + + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil) + super + @amount_tax_display = amount_tax_display + @pdf = pdf + @template = template + @template_version = template_version + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address + attr_accessor :address + # Recipient name. + attr_accessor :name + # Recipient phone (including extension) + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + attr_accessor :amount + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + attr_accessor :automatically_finalizes_at + # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + attr_accessor :collection_method + # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + attr_accessor :custom_fields + # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_accessor :description + # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Footer to be displayed on the invoice. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + attr_accessor :payment_settings + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + attr_accessor :statement_descriptor + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + attr_accessor :transfer_data + + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + custom_fields: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + transfer_data: nil + ) + super + @account_tax_ids = account_tax_ids + @amounts_due = amounts_due + @application_fee_amount = application_fee_amount + @auto_advance = auto_advance + @automatic_tax = automatic_tax + @automatically_finalizes_at = automatically_finalizes_at + @collection_method = collection_method + @custom_fields = custom_fields + @days_until_due = days_until_due + @default_margins = default_margins + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @due_date = due_date + @effective_at = effective_at + @expand = expand + @footer = footer + @issuer = issuer + @metadata = metadata + @number = number + @on_behalf_of = on_behalf_of + @payment_settings = payment_settings + @rendering = rendering + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @statement_descriptor = statement_descriptor + @transfer_data = transfer_data + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class DueDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + attr_accessor :collection_method + # Only return invoices that were created during the given date interval. + attr_accessor :created + # Only return invoices for the customer specified by this customer ID. + attr_accessor :customer + # Attribute for param field due_date + attr_accessor :due_date + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + attr_accessor :status + # Only return invoices for the subscription specified by this subscription ID. + attr_accessor :subscription + + def initialize( + collection_method: nil, + created: nil, + customer: nil, + due_date: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + subscription: nil + ) + super + @collection_method = collection_method + @created = created + @customer = customer + @due_date = due_date + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + @subscription = subscription + end + end + + class CreateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Date on which a payment plan’s payment is due. + attr_accessor :due_date + + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil) + super + @amount = amount + @days_until_due = days_until_due + @description = description + @due_date = due_date + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class FromInvoice < Stripe::RequestParams + # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + attr_accessor :action + # The `id` of the invoice that will be cloned. + attr_accessor :invoice + + def initialize(action: nil, invoice: nil) + super + @action = action + @invoice = invoice + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + attr_accessor :enabled + # The selected installment plan to use for this invoice. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(installments: nil, request_three_d_secure: nil) + super + @installments = installments + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + + def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil) + super + @default_mandate = default_mandate + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + end + end + + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + attr_accessor :page_size + + def initialize(page_size: nil) + super + @page_size = page_size + end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # Invoice pdf rendering options + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + attr_accessor :template_version + + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil) + super + @amount_tax_display = amount_tax_display + @pdf = pdf + @template = template + @template_version = template_version + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address + attr_accessor :address + # Recipient name. + attr_accessor :name + # Recipient phone (including extension) + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + attr_accessor :amount + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + attr_accessor :automatically_finalizes_at + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The currency to create this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # A list of up to 4 custom fields to be displayed on the invoice. + attr_accessor :custom_fields + # The ID of the customer who will be billed. + attr_accessor :customer + # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_accessor :description + # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Footer to be displayed on the invoice. + attr_accessor :footer + # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + attr_accessor :from_invoice + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + attr_accessor :payment_settings + # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. + attr_accessor :pending_invoice_items_behavior + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + attr_accessor :statement_descriptor + # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. + attr_accessor :subscription + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + attr_accessor :transfer_data + + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + currency: nil, + custom_fields: nil, + customer: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + from_invoice: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + pending_invoice_items_behavior: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + subscription: nil, + transfer_data: nil + ) + super + @account_tax_ids = account_tax_ids + @amounts_due = amounts_due + @application_fee_amount = application_fee_amount + @auto_advance = auto_advance + @automatic_tax = automatic_tax + @automatically_finalizes_at = automatically_finalizes_at + @collection_method = collection_method + @currency = currency + @custom_fields = custom_fields + @customer = customer + @days_until_due = days_until_due + @default_margins = default_margins + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @due_date = due_date + @effective_at = effective_at + @expand = expand + @footer = footer + @from_invoice = from_invoice + @issuer = issuer + @metadata = metadata + @number = number + @on_behalf_of = on_behalf_of + @payment_settings = payment_settings + @pending_invoice_items_behavior = pending_invoice_items_behavior + @rendering = rendering + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @statement_descriptor = statement_descriptor + @subscription = subscription + @transfer_data = transfer_data + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class UpcomingParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + + def initialize(ip_address: nil) + super + @ip_address = ip_address + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_ids + + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil) + super + @address = address + @shipping = shipping + @tax = tax + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @description = description + @discountable = discountable + @discounts = discounts + @invoiceitem = invoiceitem + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The end of the prebilled time period. + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(bill_until: nil, iterations: nil) + super + @bill_until = bill_until + @iterations = iterations + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @amendments = amendments + @billing_behavior = billing_behavior + @end_behavior = end_behavior + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + attr_accessor :trial_end + + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancel_now = cancel_now + @default_tax_rates = default_tax_rates + @items = items + @prebilling = prebilling + @proration_behavior = proration_behavior + @proration_date = proration_date + @resume_at = resume_at + @start_date = start_date + @trial_end = trial_end + end + end + + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Settings for automatic tax lookup for this invoice preview. + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :subscription_trial_from_plan + + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ) + super + @automatic_tax = automatic_tax + @coupon = coupon + @currency = currency + @customer = customer + @customer_details = customer_details + @discounts = discounts + @expand = expand + @invoice_items = invoice_items + @issuer = issuer + @on_behalf_of = on_behalf_of + @preview_mode = preview_mode + @schedule = schedule + @schedule_details = schedule_details + @subscription = subscription + @subscription_billing_cycle_anchor = subscription_billing_cycle_anchor + @subscription_cancel_at = subscription_cancel_at + @subscription_cancel_at_period_end = subscription_cancel_at_period_end + @subscription_cancel_now = subscription_cancel_now + @subscription_default_tax_rates = subscription_default_tax_rates + @subscription_details = subscription_details + @subscription_items = subscription_items + @subscription_prebilling = subscription_prebilling + @subscription_proration_behavior = subscription_proration_behavior + @subscription_proration_date = subscription_proration_date + @subscription_resume_at = subscription_resume_at + @subscription_start_date = subscription_start_date + @subscription_trial_end = subscription_trial_end + @subscription_trial_from_plan = subscription_trial_from_plan + end + end + + class ListUpcomingLineItemsParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + + def initialize(ip_address: nil) + super + @ip_address = ip_address + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_ids + + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil) + super + @address = address + @shipping = shipping + @tax = tax + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @description = description + @discountable = discountable + @discounts = discounts + @invoiceitem = invoiceitem + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The end of the prebilled time period. + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(bill_until: nil, iterations: nil) + super + @bill_until = bill_until + @iterations = iterations + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @amendments = amendments + @billing_behavior = billing_behavior + @end_behavior = end_behavior + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + attr_accessor :trial_end + + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancel_now = cancel_now + @default_tax_rates = default_tax_rates + @items = items + @prebilling = prebilling + @proration_behavior = proration_behavior + @proration_date = proration_date + @resume_at = resume_at + @start_date = start_date + @trial_end = trial_end + end + end + + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Settings for automatic tax lookup for this invoice preview. + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + attr_accessor :schedule_details + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :subscription_trial_from_plan + + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + ending_before: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + limit: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + starting_after: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ) + super + @automatic_tax = automatic_tax + @coupon = coupon + @currency = currency + @customer = customer + @customer_details = customer_details + @discounts = discounts + @ending_before = ending_before + @expand = expand + @invoice_items = invoice_items + @issuer = issuer + @limit = limit + @on_behalf_of = on_behalf_of + @preview_mode = preview_mode + @schedule = schedule + @schedule_details = schedule_details + @starting_after = starting_after + @subscription = subscription + @subscription_billing_cycle_anchor = subscription_billing_cycle_anchor + @subscription_cancel_at = subscription_cancel_at + @subscription_cancel_at_period_end = subscription_cancel_at_period_end + @subscription_cancel_now = subscription_cancel_now + @subscription_default_tax_rates = subscription_default_tax_rates + @subscription_details = subscription_details + @subscription_items = subscription_items + @subscription_prebilling = subscription_prebilling + @subscription_proration_behavior = subscription_proration_behavior + @subscription_proration_date = subscription_proration_date + @subscription_resume_at = subscription_resume_at + @subscription_start_date = subscription_start_date + @subscription_trial_end = subscription_trial_end + @subscription_trial_from_plan = subscription_trial_from_plan + end + end + + class AddLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @country = country + @description = description + @display_name = display_name + @inclusive = inclusive + @jurisdiction = jurisdiction + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate_data = tax_rate_data + @taxable_amount = taxable_amount + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. + attr_accessor :invoice_item + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + invoice_item: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @invoice_item = invoice_item + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :invoice_metadata + # The line items to add. + attr_accessor :lines + + def initialize(expand: nil, invoice_metadata: nil, lines: nil) + super + @expand = expand + @invoice_metadata = invoice_metadata + @lines = lines + end + end + + class AttachPaymentParams < Stripe::RequestParams + class PaymentRecordData < Stripe::RequestParams + # The amount that was paid out of band. + attr_accessor :amount + # The currency that was paid out of band. + attr_accessor :currency + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The type of money movement for this out of band payment record. + attr_accessor :money_movement_type + # The timestamp when this out of band payment was paid. + attr_accessor :paid_at + # The reference for this out of band payment record. + attr_accessor :payment_reference + + def initialize( + amount: nil, + currency: nil, + metadata: nil, + money_movement_type: nil, + paid_at: nil, + payment_reference: nil + ) + super + @amount = amount + @currency = currency + @metadata = metadata + @money_movement_type = money_movement_type + @paid_at = paid_at + @payment_reference = payment_reference + end + end + # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + attr_accessor :payment_intent + # The ID of the PaymentRecord to detach from the invoice. + attr_accessor :payment_record + # The PaymentRecord data for attaching an out of band payment to the invoice. + attr_accessor :payment_record_data + + def initialize( + amount_requested: nil, + expand: nil, + payment_intent: nil, + payment_record: nil, + payment_record_data: nil + ) + super + @amount_requested = amount_requested + @expand = expand + @payment_intent = payment_intent + @payment_record = payment_record + @payment_record_data = payment_record_data + end + end + + class AttachPaymentIntentParams < Stripe::RequestParams + # The portion of the PaymentIntent’s `amount` that should be applied to thisinvoice. Defaults to the entire amount. + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + attr_accessor :payment_intent + + def initialize(amount_requested: nil, expand: nil, payment_intent: nil) + super + @amount_requested = amount_requested + @expand = expand + @payment_intent = payment_intent + end + end + + class FinalizeInvoiceParams < Stripe::RequestParams + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + attr_accessor :auto_advance + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(auto_advance: nil, expand: nil) + super + @auto_advance = auto_advance + @expand = expand + end + end + + class MarkUncollectibleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PayParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + # + # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + attr_accessor :forgive + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. + attr_accessor :mandate + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). + attr_accessor :off_session + # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. + attr_accessor :paid_out_of_band + # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. + attr_accessor :payment_method + # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. + attr_accessor :source + + def initialize( + expand: nil, + forgive: nil, + mandate: nil, + off_session: nil, + paid_out_of_band: nil, + payment_method: nil, + source: nil + ) + super + @expand = expand + @forgive = forgive + @mandate = mandate + @off_session = off_session + @paid_out_of_band = paid_out_of_band + @payment_method = payment_method + @source = source + end + end + + class RemoveLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. + attr_accessor :behavior + # ID of an existing line item to remove from this invoice. + attr_accessor :id + + def initialize(behavior: nil, id: nil) + super + @behavior = behavior + @id = id + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :invoice_metadata + # The line items to remove. + attr_accessor :lines + + def initialize(expand: nil, invoice_metadata: nil, lines: nil) + super + @expand = expand + @invoice_metadata = invoice_metadata + @lines = lines + end + end + + class SendInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @country = country + @description = description + @display_name = display_name + @inclusive = inclusive + @jurisdiction = jurisdiction + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate_data = tax_rate_data + @taxable_amount = taxable_amount + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # ID of an existing line item on the invoice. + attr_accessor :id + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + id: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @id = id + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + attr_accessor :invoice_metadata + # The line items to update. + attr_accessor :lines + + def initialize(expand: nil, invoice_metadata: nil, lines: nil) + super + @expand = expand + @invoice_metadata = invoice_metadata + @lines = lines + end + end + + class VoidInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreatePreviewParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + + def initialize(ip_address: nil) + super + @ip_address = ip_address + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_ids + + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil) + super + @address = address + @shipping = shipping + @tax = tax + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @description = description + @discountable = discountable + @discounts = discounts + @invoiceitem = invoiceitem + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The end of the prebilled time period. + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(bill_until: nil, iterations: nil) + super + @bill_until = bill_until + @iterations = iterations + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @amendments = amendments + @billing_behavior = billing_behavior + @end_behavior = end_behavior + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + attr_accessor :trial_end + + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancel_now = cancel_now + @default_tax_rates = default_tax_rates + @items = items + @prebilling = prebilling + @proration_behavior = proration_behavior + @proration_date = proration_date + @resume_at = resume_at + @start_date = start_date + @trial_end = trial_end + end + end + # Settings for automatic tax lookup for this invoice preview. + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + attr_accessor :subscription + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + attr_accessor :subscription_details + + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_details: nil + ) + super + @automatic_tax = automatic_tax + @coupon = coupon + @currency = currency + @customer = customer + @customer_details = customer_details + @discounts = discounts + @expand = expand + @invoice_items = invoice_items + @issuer = issuer + @on_behalf_of = on_behalf_of + @preview_mode = preview_mode + @schedule = schedule + @schedule_details = schedule_details + @subscription = subscription + @subscription_details = subscription_details + end end # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country @@ -549,8 +8593,8 @@ def self.finalize_invoice(invoice, params = {}, opts = {}) end # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/invoices", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/invoices", params: params, opts: opts) end # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/invoice_item.rb b/lib/stripe/resources/invoice_item.rb index 156c10f52..1dd334441 100644 --- a/lib/stripe/resources/invoice_item.rb +++ b/lib/stripe/resources/invoice_item.rb @@ -25,7 +25,413 @@ def self.object_name end class Period < Stripe::StripeObject - attr_reader :end, :start + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_reader :end + # The start of the period. This value is inclusive. + attr_reader :start + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @expand = expand + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return invoice items that were created during the given date interval. + attr_accessor :created + # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. + attr_accessor :pending + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + pending: nil, + starting_after: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @invoice = invoice + @limit = limit + @pending = pending + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the customer who will be billed when this invoice item is billed. + attr_accessor :customer + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. + attr_accessor :discountable + # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. + attr_accessor :invoice + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + attr_accessor :subscription + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + invoice: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + subscription: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @customer = customer + @description = description + @discountable = discountable + @discounts = discounts + @expand = expand + @invoice = invoice + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @subscription = subscription + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end end # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. attr_reader :amount @@ -104,8 +510,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/invoiceitems", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/invoiceitems", params: params, opts: opts) end # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. diff --git a/lib/stripe/resources/invoice_line_item.rb b/lib/stripe/resources/invoice_line_item.rb index 99f75b072..9fd368c35 100644 --- a/lib/stripe/resources/invoice_line_item.rb +++ b/lib/stripe/resources/invoice_line_item.rb @@ -14,30 +14,289 @@ def self.object_name end class DiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class MarginAmount < Stripe::StripeObject - attr_reader :amount, :margin + # The amount, in cents (or local equivalent), of the reduction in line item amount. + attr_reader :amount + # The margin that was applied to get this margin amount. + attr_reader :margin end class Period < Stripe::StripeObject - attr_reader :end, :start + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_reader :end + # The start of the period. This value is inclusive. + attr_reader :start end class PretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # The margin that was applied to get this pretax credit amount. + attr_reader :margin + # Type of the pretax credit amount referenced. + attr_reader :type end class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject - attr_reader :invoice, :invoice_line_items + # Invoice containing the credited invoice line items + attr_reader :invoice + # Credited invoice line items + attr_reader :invoice_line_items end + # For a credit proration `line_item`, the original debit line_items to which the credit proration applies. attr_reader :credited_items end class TaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount + end + + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @country = country + @description = description + @display_name = display_name + @inclusive = inclusive + @jurisdiction = jurisdiction + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate_data = tax_rate_data + @taxable_amount = taxable_amount + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @expand = expand + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + end end # The amount, in cents (or local equivalent). attr_reader :amount diff --git a/lib/stripe/resources/invoice_payment.rb b/lib/stripe/resources/invoice_payment.rb index a717aebf7..c1d273f08 100644 --- a/lib/stripe/resources/invoice_payment.rb +++ b/lib/stripe/resources/invoice_payment.rb @@ -10,11 +10,21 @@ def self.object_name end class Payment < Stripe::StripeObject - attr_reader :charge, :payment_intent, :payment_record, :type + # ID of the successful charge for this payment when `type` is `charge`. + attr_reader :charge + # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. + attr_reader :payment_intent + # ID of the PaymentRecord associated with this payment when `type` is `payment_record`. + attr_reader :payment_record + # Type of payment object associated with this invoice payment. + attr_reader :type end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :paid_at + # The time that the payment was canceled. + attr_reader :canceled_at + # The time that the payment succeeded. + attr_reader :paid_at end # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. attr_reader :amount_overpaid diff --git a/lib/stripe/resources/invoice_rendering_template.rb b/lib/stripe/resources/invoice_rendering_template.rb index 9f033c1a3..443d625e2 100644 --- a/lib/stripe/resources/invoice_rendering_template.rb +++ b/lib/stripe/resources/invoice_rendering_template.rb @@ -12,6 +12,60 @@ def self.object_name "invoice_rendering_template" end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Attribute for param field status + attr_accessor :status + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil, status: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field version + attr_accessor :version + + def initialize(expand: nil, version: nil) + super + @expand = expand + @version = version + end + end + + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UnarchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Unique identifier for the object. @@ -50,11 +104,11 @@ def self.archive(template, params = {}, opts = {}) end # List all templates, ordered by creation date, with the most recently created template appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/invoice_rendering_templates", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/authorization.rb b/lib/stripe/resources/issuing/authorization.rb index 7d3d01242..f090677ff 100644 --- a/lib/stripe/resources/issuing/authorization.rb +++ b/lib/stripe/resources/issuing/authorization.rb @@ -19,74 +19,1103 @@ def self.object_name end class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - attr_reader :alphanumeric_id, :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number + # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. + attr_reader :alphanumeric_id + # Driver ID. + attr_reader :driver_id + # Odometer reading. + attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_reader :unspecified_id + # User ID. + attr_reader :user_id + # Vehicle number. + attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - attr_reader :local_amount_decimal, :national_amount_decimal + # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. + attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. + attr_reader :national_amount_decimal end - attr_reader :fuel, :non_fuel, :tax + # Breakdown of fuel portion of the purchase. + attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. + attr_reader :non_fuel + # Information about tax included in this transaction. + attr_reader :tax end - attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_reader :cardholder_prompt_data + # The type of purchase. + attr_reader :purchase_type + # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_reader :reported_breakdown + # The type of fuel service. + attr_reader :service_type end class FraudChallenge < Stripe::StripeObject - attr_reader :channel, :status, :undeliverable_reason + # The method by which the fraud challenge was delivered to the cardholder. + attr_reader :channel + # The status of the fraud challenge. + attr_reader :status + # If the challenge is not deliverable, the reason why. + attr_reader :undeliverable_reason end class Fuel < Stripe::StripeObject - attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_reader :quantity_decimal + # The type of fuel that was purchased. + attr_reader :type + # The units for `quantity_decimal`. + attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_reader :unit_cost_decimal end class MerchantData < Stripe::StripeObject - attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :tax_id, :terminal_id, :url + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_reader :category + # The merchant category code for the seller’s business + attr_reader :category_code + # City where the seller is located + attr_reader :city + # Country where the seller is located + attr_reader :country + # Name of the seller + attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_reader :network_id + # Postal code where the seller is located + attr_reader :postal_code + # State where the seller is located + attr_reader :state + # The seller's tax identification number. Currently populated for French merchants only. + attr_reader :tax_id + # An ID assigned by the seller to the location of the sale. + attr_reader :terminal_id + # URL provided by the merchant on a 3DS request + attr_reader :url end class NetworkData < Stripe::StripeObject - attr_reader :acquiring_institution_id, :system_trace_audit_number, :transaction_id + # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. + attr_reader :acquiring_institution_id + # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. + attr_reader :system_trace_audit_number + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + attr_reader :transaction_id end class PendingRequest < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end - attr_reader :amount, :amount_details, :currency, :is_amount_controllable, :merchant_amount, :merchant_currency, :network_risk_score + # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + attr_reader :is_amount_controllable + # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :merchant_amount + # The local currency the merchant is requesting to authorize. + attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + attr_reader :network_risk_score end class RequestHistory < Stripe::StripeObject class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end - attr_reader :amount, :amount_details, :approved, :authorization_code, :created, :currency, :merchant_amount, :merchant_currency, :network_risk_score, :reason, :reason_message, :requested_at + # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. + attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_details + # Whether this request was approved. + attr_reader :approved + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + attr_reader :authorization_code + # Time at which the object was created. Measured in seconds since the Unix epoch. + attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :merchant_amount + # The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. + attr_reader :network_risk_score + # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. + attr_reader :reason + # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. + attr_reader :reason_message + # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. + attr_reader :requested_at end class Treasury < Stripe::StripeObject - attr_reader :received_credits, :received_debits, :transaction + # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization + attr_reader :received_credits + # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization + attr_reader :received_debits + # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization + attr_reader :transaction end class VerificationData < Stripe::StripeObject class AuthenticationExemption < Stripe::StripeObject - attr_reader :claimed_by, :type + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. + attr_reader :claimed_by + # The specific exemption claimed for this authorization. + attr_reader :type end class ThreeDSecure < Stripe::StripeObject + # The outcome of the 3D Secure authentication request. attr_reader :result end - attr_reader :address_line1_check, :address_postal_code_check, :authentication_exemption, :cvc_check, :expiry_check, :postal_code, :three_d_secure + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + attr_reader :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + attr_reader :address_postal_code_check + # The exemption applied to this authorization. + attr_reader :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. + attr_reader :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. + attr_reader :expiry_check + # The postal code submitted as part of the authorization used for postal code verification. + attr_reader :postal_code + # 3D Secure details. + attr_reader :three_d_secure + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return authorizations that belong to the given card. + attr_accessor :card + # Only return authorizations that belong to the given cardholder. + attr_accessor :cardholder + # Only return authorizations that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + attr_accessor :status + + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @card = card + @cardholder = cardholder + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class ApproveParams < Stripe::RequestParams + # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). + attr_accessor :amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(amount: nil, expand: nil, metadata: nil) + super + @amount = amount + @expand = expand + @metadata = metadata + end + end + + class DeclineParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class CreateParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + # The ATM withdrawal fee. + attr_accessor :atm_fee + # The amount of cash requested by the cardholder. + attr_accessor :cashback_amount + + def initialize(atm_fee: nil, cashback_amount: nil) + super + @atm_fee = atm_fee + @cashback_amount = cashback_amount + end + end + + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_accessor :category + # City where the seller is located + attr_accessor :city + # Country where the seller is located + attr_accessor :country + # Name of the seller + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_accessor :network_id + # Postal code where the seller is located + attr_accessor :postal_code + # State where the seller is located + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + attr_accessor :url + + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ) + super + @category = category + @city = city + @country = country + @name = name + @network_id = network_id + @postal_code = postal_code + @state = state + @terminal_id = terminal_id + @url = url + end + end + + class NetworkData < Stripe::RequestParams + # Identifier assigned to the acquirer by the card network. + attr_accessor :acquiring_institution_id + + def initialize(acquiring_institution_id: nil) + super + @acquiring_institution_id = acquiring_institution_id + end + end + + class VerificationData < Stripe::RequestParams + class AuthenticationExemption < Stripe::RequestParams + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. + attr_accessor :claimed_by + # The specific exemption claimed for this authorization. + attr_accessor :type + + def initialize(claimed_by: nil, type: nil) + super + @claimed_by = claimed_by + @type = type + end + end + + class ThreeDSecure < Stripe::RequestParams + # The outcome of the 3D Secure authentication request. + attr_accessor :result + + def initialize(result: nil) + super + @result = result + end + end + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + attr_accessor :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + attr_accessor :address_postal_code_check + # The exemption applied to this authorization. + attr_accessor :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. + attr_accessor :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. + attr_accessor :expiry_check + # 3D Secure details. + attr_accessor :three_d_secure + + def initialize( + address_line1_check: nil, + address_postal_code_check: nil, + authentication_exemption: nil, + cvc_check: nil, + expiry_check: nil, + three_d_secure: nil + ) + super + @address_line1_check = address_line1_check + @address_postal_code_check = address_postal_code_check + @authentication_exemption = authentication_exemption + @cvc_check = cvc_check + @expiry_check = expiry_check + @three_d_secure = three_d_secure + end + end + # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount_details + # How the card details were provided. Defaults to online. + attr_accessor :authorization_method + # Card associated with this authorization. + attr_accessor :card + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Fleet-specific information for authorizations using Fleet cards. + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + attr_accessor :is_amount_controllable + # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :merchant_amount + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :merchant_currency + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + attr_accessor :merchant_data + # Details about the authorization, such as identifiers, set by the card network. + attr_accessor :network_data + # Verifications that Stripe performed on information that the cardholder provided to the merchant. + attr_accessor :verification_data + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + attr_accessor :wallet + + def initialize( + amount: nil, + amount_details: nil, + authorization_method: nil, + card: nil, + currency: nil, + expand: nil, + fleet: nil, + fuel: nil, + is_amount_controllable: nil, + merchant_amount: nil, + merchant_currency: nil, + merchant_data: nil, + network_data: nil, + verification_data: nil, + wallet: nil + ) + super + @amount = amount + @amount_details = amount_details + @authorization_method = authorization_method + @card = card + @currency = currency + @expand = expand + @fleet = fleet + @fuel = fuel + @is_amount_controllable = is_amount_controllable + @merchant_amount = merchant_amount + @merchant_currency = merchant_currency + @merchant_data = merchant_data + @network_data = network_data + @verification_data = verification_data + @wallet = wallet + end + end + + class CaptureParams < Stripe::RequestParams + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + attr_accessor :arrival_airport_code + # The airline carrier code. + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + attr_accessor :departure_airport_code + # The flight number. + attr_accessor :flight_number + # The flight's service class. + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + attr_accessor :stopover_allowed + + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ) + super + @arrival_airport_code = arrival_airport_code + @carrier = carrier + @departure_airport_code = departure_airport_code + @flight_number = flight_number + @service_class = service_class + @stopover_allowed = stopover_allowed + end + end + # The time that the flight departed. + attr_accessor :departure_at + # The name of the passenger. + attr_accessor :passenger_name + # Whether the ticket is refundable. + attr_accessor :refundable + # The legs of the trip. + attr_accessor :segments + # The travel agency that issued the ticket. + attr_accessor :travel_agency + + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ) + super + @departure_at = departure_at + @passenger_name = passenger_name + @refundable = refundable + @segments = segments + @travel_agency = travel_agency + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + attr_accessor :nights + + def initialize(check_in_at: nil, nights: nil) + super + @check_in_at = check_in_at + @nights = nights + end + end + + class Receipt < Stripe::RequestParams + # Attribute for param field description + attr_accessor :description + # Attribute for param field quantity + attr_accessor :quantity + # Attribute for param field total + attr_accessor :total + # Attribute for param field unit_cost + attr_accessor :unit_cost + + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) + super + @description = description + @quantity = quantity + @total = total + @unit_cost = unit_cost + end + end + # Fleet-specific information for transactions using Fleet cards. + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + attr_accessor :lodging + # The line items in the purchase. + attr_accessor :receipt + # A merchant-specific order number. + attr_accessor :reference + + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ) + super + @fleet = fleet + @flight = flight + @fuel = fuel + @lodging = lodging + @receipt = receipt + @reference = reference + end + end + # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :capture_amount + # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + attr_accessor :close_authorization + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Additional purchase information that is optionally provided by the merchant. + attr_accessor :purchase_details + + def initialize( + capture_amount: nil, + close_authorization: nil, + expand: nil, + purchase_details: nil + ) + super + @capture_amount = capture_amount + @close_authorization = close_authorization + @expand = expand + @purchase_details = purchase_details + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FinalizeAmountParams < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :final_amount + # Fleet-specific information for authorizations using Fleet cards. + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + + def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil) + super + @expand = expand + @final_amount = final_amount + @fleet = fleet + @fuel = fuel + end + end + + class RespondParams < Stripe::RequestParams + # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + attr_accessor :confirmed + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(confirmed: nil, expand: nil) + super + @confirmed = confirmed + @expand = expand + end + end + + class IncrementParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :increment_amount + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + attr_accessor :is_amount_controllable + + def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil) + super + @expand = expand + @increment_amount = increment_amount + @is_amount_controllable = is_amount_controllable + end + end + + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :reverse_amount + + def initialize(expand: nil, reverse_amount: nil) + super + @expand = expand + @reverse_amount = reverse_amount + end end # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. attr_reader :amount @@ -157,8 +1186,8 @@ def approve(params = {}, opts = {}) opts: opts ) end - deprecate :approve, :none, 2024, 3 + deprecate :approve, :none, 2024, 3 # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). def self.approve(authorization, params = {}, opts = {}) @@ -169,6 +1198,7 @@ def self.approve(authorization, params = {}, opts = {}) opts: opts ) end + class << self extend Gem::Deprecate deprecate :approve, :none, 2024, 3 @@ -184,8 +1214,8 @@ def decline(params = {}, opts = {}) opts: opts ) end - deprecate :decline, :none, 2024, 3 + deprecate :decline, :none, 2024, 3 # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). def self.decline(authorization, params = {}, opts = {}) @@ -196,17 +1226,18 @@ def self.decline(authorization, params = {}, opts = {}) opts: opts ) end + class << self extend Gem::Deprecate deprecate :decline, :none, 2024, 3 end # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/authorizations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/card.rb b/lib/stripe/resources/issuing/card.rb index aa8cd2bd0..642552f46 100644 --- a/lib/stripe/resources/issuing/card.rb +++ b/lib/stripe/resources/issuing/card.rb @@ -16,38 +16,642 @@ def self.object_name class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class AddressValidation < Stripe::StripeObject class NormalizedAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :mode, :normalized_address, :result + # The address validation capabilities to use. + attr_reader :mode + # The normalized shipping address. + attr_reader :normalized_address + # The validation result for the shipping address. + attr_reader :result end class Customs < Stripe::StripeObject + # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. attr_reader :eori_number end - attr_reader :address, :address_validation, :carrier, :customs, :eta, :name, :phone_number, :require_signature, :service, :status, :tracking_number, :tracking_url, :type + # Attribute for field address + attr_reader :address + # Address validation details for the shipment. + attr_reader :address_validation + # The delivery company that shipped a card. + attr_reader :carrier + # Additional information that may be required for clearing customs. + attr_reader :customs + # A unix timestamp representing a best estimate of when the card will be delivered. + attr_reader :eta + # Recipient name. + attr_reader :name + # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. + attr_reader :phone_number + # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. + attr_reader :require_signature + # Shipment service, such as `standard` or `express`. + attr_reader :service + # The delivery status of the card. + attr_reader :status + # A tracking number for a card shipment. + attr_reader :tracking_number + # A link to the shipping carrier's site where you can view detailed information about a card shipment. + attr_reader :tracking_url + # Packaging options. + attr_reader :type end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - attr_reader :amount, :categories, :interval + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_reader :categories + # Interval (or event) to which the amount applies. + attr_reader :interval end - attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. Always the same as the currency of the card. + attr_reader :spending_limits_currency end class Wallets < Stripe::StripeObject class ApplePay < Stripe::StripeObject - attr_reader :eligible, :ineligible_reason + # Apple Pay Eligibility + attr_reader :eligible + # Reason the card is ineligible for Apple Pay + attr_reader :ineligible_reason end class GooglePay < Stripe::StripeObject - attr_reader :eligible, :ineligible_reason + # Google Pay Eligibility + attr_reader :eligible + # Reason the card is ineligible for Google Pay + attr_reader :ineligible_reason + end + # Attribute for field apple_pay + attr_reader :apple_pay + # Attribute for field google_pay + attr_reader :google_pay + # Unique identifier for a card used with digital wallets + attr_reader :primary_account_identifier + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return cards belonging to the Cardholder with the provided ID. + attr_accessor :cardholder + # Only return cards that were issued during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Only return cards that have the given expiration month. + attr_accessor :exp_month + # Only return cards that have the given expiration year. + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return cards that have the given last four digits. + attr_accessor :last4 + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Attribute for param field personalization_design + attr_accessor :personalization_design + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + attr_accessor :status + # Only return cards that have the given type. One of `virtual` or `physical`. + attr_accessor :type + + def initialize( + cardholder: nil, + created: nil, + ending_before: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + last4: nil, + limit: nil, + personalization_design: nil, + starting_after: nil, + status: nil, + type: nil + ) + super + @cardholder = cardholder + @created = created + @ending_before = ending_before + @exp_month = exp_month + @exp_year = exp_year + @expand = expand + @last4 = last4 + @limit = limit + @personalization_design = personalization_design + @starting_after = starting_after + @status = status + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + attr_accessor :encrypted_number + + def initialize(encrypted_number: nil) + super + @encrypted_number = encrypted_number + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + attr_accessor :eori_number + + def initialize(eori_number: nil) + super + @eori_number = eori_number + end + end + # The address that the card is shipped to. + attr_accessor :address + # Address validation settings. + attr_accessor :address_validation + # Customs information for the shipment. + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + attr_accessor :name + # Phone number of the recipient of the shipment. + attr_accessor :phone_number + # Whether a signature is required for card delivery. + attr_accessor :require_signature + # Shipment service. + attr_accessor :service + # Packaging options. + attr_accessor :type + + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ) + super + @address = address + @address_validation = address_validation + @customs = customs + @name = name + @phone_number = phone_number + @require_signature = require_signature + @service = service + @type = type + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + attr_accessor :spending_limits + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + end + end + # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. + attr_accessor :cardholder + # The currency for the card. + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field financial_account + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The personalization design object belonging to this card. + attr_accessor :personalization_design + # The desired PIN for this card. + attr_accessor :pin + # The card this is meant to be a replacement for (if any). + attr_accessor :replacement_for + # If `replacement_for` is specified, this should indicate why that card is being replaced. + attr_accessor :replacement_reason + # The second line to print on the card. Max length: 24 characters. + attr_accessor :second_line + # The address where the card will be shipped. + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + attr_accessor :status + # The type of card to issue. Possible values are `physical` or `virtual`. + attr_accessor :type + + def initialize( + cardholder: nil, + currency: nil, + expand: nil, + financial_account: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + replacement_for: nil, + replacement_reason: nil, + second_line: nil, + shipping: nil, + spending_controls: nil, + status: nil, + type: nil + ) + super + @cardholder = cardholder + @currency = currency + @expand = expand + @financial_account = financial_account + @metadata = metadata + @personalization_design = personalization_design + @pin = pin + @replacement_for = replacement_for + @replacement_reason = replacement_reason + @second_line = second_line + @shipping = shipping + @spending_controls = spending_controls + @status = status + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + attr_accessor :encrypted_number + + def initialize(encrypted_number: nil) + super + @encrypted_number = encrypted_number + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + attr_accessor :eori_number + + def initialize(eori_number: nil) + super + @eori_number = eori_number + end + end + # The address that the card is shipped to. + attr_accessor :address + # Address validation settings. + attr_accessor :address_validation + # Customs information for the shipment. + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + attr_accessor :name + # Phone number of the recipient of the shipment. + attr_accessor :phone_number + # Whether a signature is required for card delivery. + attr_accessor :require_signature + # Shipment service. + attr_accessor :service + # Packaging options. + attr_accessor :type + + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ) + super + @address = address + @address_validation = address_validation + @customs = customs + @name = name + @phone_number = phone_number + @require_signature = require_signature + @service = service + @type = type + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + attr_accessor :spending_limits + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + end + end + # Reason why the `status` of this card is `canceled`. + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Attribute for param field personalization_design + attr_accessor :personalization_design + # The desired new PIN for this card. + attr_accessor :pin + # Updated shipping information for the card. + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + attr_accessor :status + + def initialize( + cancellation_reason: nil, + expand: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + shipping: nil, + spending_controls: nil, + status: nil + ) + super + @cancellation_reason = cancellation_reason + @expand = expand + @metadata = metadata + @personalization_design = personalization_design + @pin = pin + @shipping = shipping + @spending_controls = spending_controls + @status = status + end + end + + class DeliverCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FailCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReturnCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ShipCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SubmitCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :apple_pay, :google_pay, :primary_account_identifier end # The brand of the card. attr_reader :brand @@ -106,8 +710,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/issuing/cards", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/issuing/cards", params: params, opts: opts) end # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/lib/stripe/resources/issuing/cardholder.rb b/lib/stripe/resources/issuing/cardholder.rb index ac9a686d2..86968f87d 100644 --- a/lib/stripe/resources/issuing/cardholder.rb +++ b/lib/stripe/resources/issuing/cardholder.rb @@ -18,45 +18,654 @@ def self.object_name class Billing < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end + # Attribute for field address attr_reader :address end class Company < Stripe::StripeObject + # Whether the company's business ID number was provided. attr_reader :tax_id_provided end class Individual < Stripe::StripeObject class CardIssuing < Stripe::StripeObject class UserTermsAcceptance < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. + attr_reader :date + # The IP address from which the cardholder accepted the Authorized User Terms. + attr_reader :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + attr_reader :user_agent end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. attr_reader :user_terms_acceptance end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject - attr_reader :back, :front + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :front end + # An identifying document, either a passport or local ID card. attr_reader :document end - attr_reader :card_issuing, :dob, :first_name, :last_name, :verification + # Information related to the card_issuing program for this cardholder. + attr_reader :card_issuing + # The date of birth of this cardholder. + attr_reader :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_reader :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_reader :last_name + # Government-issued ID document for this cardholder. + attr_reader :verification end class Requirements < Stripe::StripeObject - attr_reader :disabled_reason, :past_due + # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. + attr_reader :disabled_reason + # Array of fields that need to be collected in order to verify and re-enable the cardholder. + attr_reader :past_due end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject - attr_reader :amount, :categories, :interval + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_reader :categories + # Interval (or event) to which the amount applies. + attr_reader :interval + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. + attr_reader :spending_limits_currency + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return cardholders that were created during the given date interval. + attr_accessor :created + # Only return cardholders that have the given email address. + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return cardholders that have the given phone number. + attr_accessor :phone_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + attr_accessor :status + # Only return cardholders that have the given type. One of `individual` or `company`. + attr_accessor :type + + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + phone_number: nil, + starting_after: nil, + status: nil, + type: nil + ) + super + @created = created + @email = email + @ending_before = ending_before + @expand = expand + @limit = limit + @phone_number = phone_number + @starting_after = starting_after + @status = status + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The cardholder’s billing address. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + + class Company < Stripe::RequestParams + # The entity's business ID number. + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + attr_accessor :user_terms_acceptance + + def initialize(user_terms_acceptance: nil) + super + @user_terms_acceptance = user_terms_acceptance + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # Information related to the card_issuing program for this cardholder. + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :last_name + # Government-issued ID document for this cardholder. + attr_accessor :verification + + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ) + super + @card_issuing = card_issuing + @dob = dob + @first_name = first_name + @last_name = last_name + @verification = verification + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + attr_accessor :spending_limits_currency + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + @spending_limits_currency = spending_limits_currency + end + end + # The cardholder's billing address. + attr_accessor :billing + # Additional information about a `company` cardholder. + attr_accessor :company + # The cardholder's email address. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Additional information about an `individual` cardholder. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. + attr_accessor :name + # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. + # While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + attr_accessor :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + attr_accessor :type + + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + name: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil, + type: nil + ) + super + @billing = billing + @company = company + @email = email + @expand = expand + @individual = individual + @metadata = metadata + @name = name + @phone_number = phone_number + @preferred_locales = preferred_locales + @spending_controls = spending_controls + @status = status + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The cardholder’s billing address. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + + class Company < Stripe::RequestParams + # The entity's business ID number. + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + attr_accessor :user_terms_acceptance + + def initialize(user_terms_acceptance: nil) + super + @user_terms_acceptance = user_terms_acceptance + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # Information related to the card_issuing program for this cardholder. + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :last_name + # Government-issued ID document for this cardholder. + attr_accessor :verification + + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ) + super + @card_issuing = card_issuing + @dob = dob + @first_name = first_name + @last_name = last_name + @verification = verification + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + attr_accessor :spending_limits_currency + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + @spending_limits_currency = spending_limits_currency + end + end + # The cardholder's billing address. + attr_accessor :billing + # Additional information about a `company` cardholder. + attr_accessor :company + # The cardholder's email address. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Additional information about an `individual` cardholder. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. + attr_accessor :status + + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil + ) + super + @billing = billing + @company = company + @email = email + @expand = expand + @individual = individual + @metadata = metadata + @phone_number = phone_number + @preferred_locales = preferred_locales + @spending_controls = spending_controls + @status = status end - attr_reader :allowed_categories, :allowed_merchant_countries, :blocked_categories, :blocked_merchant_countries, :spending_limits, :spending_limits_currency end # Attribute for field billing attr_reader :billing @@ -103,11 +712,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/cardholders", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/credit_underwriting_record.rb b/lib/stripe/resources/issuing/credit_underwriting_record.rb index d5f51d632..1add4e4e3 100644 --- a/lib/stripe/resources/issuing/credit_underwriting_record.rb +++ b/lib/stripe/resources/issuing/credit_underwriting_record.rb @@ -15,34 +15,526 @@ def self.object_name end class Application < Stripe::StripeObject - attr_reader :application_method, :purpose, :submitted_at + # The channel through which the applicant has submitted their application. + attr_reader :application_method + # Scope of demand made by the applicant. + attr_reader :purpose + # Date when the applicant submitted their application. + attr_reader :submitted_at end class CreditUser < Stripe::StripeObject - attr_reader :email, :name + # Email of the applicant or accountholder. + attr_reader :email + # Full name of the company or person. + attr_reader :name end class Decision < Stripe::StripeObject class ApplicationRejected < Stripe::StripeObject - attr_reader :reason_other_explanation, :reasons + # Details about the `reasons.other` when present. + attr_reader :reason_other_explanation + # List of reasons why the application was rejected up to 4 reasons, in order of importance. + attr_reader :reasons end class CreditLimitApproved < Stripe::StripeObject - attr_reader :amount, :currency + # Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency end class CreditLimitDecreased < Stripe::StripeObject - attr_reader :amount, :currency, :reason_other_explanation, :reasons + # Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Details about the `reasons.other` when present. + attr_reader :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + attr_reader :reasons end class CreditLineClosed < Stripe::StripeObject - attr_reader :reason_other_explanation, :reasons + # Details about the `reasons.other` when present. + attr_reader :reason_other_explanation + # List of reasons why the existing account was closed, up to 4 reasons, in order of importance. + attr_reader :reasons end - attr_reader :application_rejected, :credit_limit_approved, :credit_limit_decreased, :credit_line_closed, :type + # Details about a decision application_rejected. + attr_reader :application_rejected + # Details about a decision credit_limit_approved. + attr_reader :credit_limit_approved + # Details about a decision credit_limit_decreased. + attr_reader :credit_limit_decreased + # Details about a decision credit_line_closed. + attr_reader :credit_line_closed + # Outcome of the decision. + attr_reader :type end class UnderwritingException < Stripe::StripeObject - attr_reader :explanation, :original_decision_type + # Written explanation for the exception. + attr_reader :explanation + # The decision before the exception was applied. + attr_reader :original_decision_type + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CorrectParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + attr_accessor :application_method + # Scope of demand made by the applicant. + attr_accessor :purpose + # Date when the applicant submitted their application. + attr_accessor :submitted_at + + def initialize(application_method: nil, purpose: nil, submitted_at: nil) + super + @application_method = application_method + @purpose = purpose + @submitted_at = submitted_at + end + end + + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + attr_accessor :email + # Full name of the company or person. + attr_accessor :name + + def initialize(email: nil, name: nil) + super + @email = email + @name = name + end + end + + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(amount: nil, currency: nil, reason_other_explanation: nil, reasons: nil) + super + @amount = amount + @currency = currency + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + # Details about the application rejection. + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + attr_accessor :credit_line_closed + # Outcome of the decision. + attr_accessor :type + + def initialize( + application_rejected: nil, + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ) + super + @application_rejected = application_rejected + @credit_limit_approved = credit_limit_approved + @credit_limit_decreased = credit_limit_decreased + @credit_line_closed = credit_line_closed + @type = type + end + end + + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + attr_accessor :explanation + # The decision before the exception was applied. + attr_accessor :original_decision_type + + def initialize(explanation: nil, original_decision_type: nil) + super + @explanation = explanation + @original_decision_type = original_decision_type + end + end + # Details about the application submission. + attr_accessor :application + # Information about the company or person applying or holding the account. + attr_accessor :credit_user + # Date when a decision was made. + attr_accessor :decided_at + # Details about the decision. + attr_accessor :decision + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_accessor :underwriting_exception + + def initialize( + application: nil, + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ) + super + @application = application + @credit_user = credit_user + @decided_at = decided_at + @decision = decision + @expand = expand + @metadata = metadata + @regulatory_reporting_file = regulatory_reporting_file + @underwriting_exception = underwriting_exception + end + end + + class ReportDecisionParams < Stripe::RequestParams + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + # Details about the application rejection. + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + attr_accessor :credit_limit_approved + # Outcome of the decision. + attr_accessor :type + + def initialize(application_rejected: nil, credit_limit_approved: nil, type: nil) + super + @application_rejected = application_rejected + @credit_limit_approved = credit_limit_approved + @type = type + end + end + + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + attr_accessor :explanation + # The decision before the exception was applied. + attr_accessor :original_decision_type + + def initialize(explanation: nil, original_decision_type: nil) + super + @explanation = explanation + @original_decision_type = original_decision_type + end + end + # Date when a decision was made. + attr_accessor :decided_at + # Details about the decision. + attr_accessor :decision + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_accessor :underwriting_exception + + def initialize( + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ) + super + @decided_at = decided_at + @decision = decision + @expand = expand + @metadata = metadata + @regulatory_reporting_file = regulatory_reporting_file + @underwriting_exception = underwriting_exception + end + end + + class CreateFromApplicationParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + attr_accessor :application_method + # Scope of demand made by the applicant. + attr_accessor :purpose + # Date when the applicant submitted their application. + attr_accessor :submitted_at + + def initialize(application_method: nil, purpose: nil, submitted_at: nil) + super + @application_method = application_method + @purpose = purpose + @submitted_at = submitted_at + end + end + + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + attr_accessor :email + # Full name of the company or person. + attr_accessor :name + + def initialize(email: nil, name: nil) + super + @email = email + @name = name + end + end + # Details about the application submission. + attr_accessor :application + # Information about the company or person applying or holding the account. + attr_accessor :credit_user + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(application: nil, credit_user: nil, expand: nil, metadata: nil) + super + @application = application + @credit_user = credit_user + @expand = expand + @metadata = metadata + end + end + + class CreateFromProactiveReviewParams < Stripe::RequestParams + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + attr_accessor :email + # Full name of the company or person. + attr_accessor :name + + def initialize(email: nil, name: nil) + super + @email = email + @name = name + end + end + + class Decision < Stripe::RequestParams + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(amount: nil, currency: nil, reason_other_explanation: nil, reasons: nil) + super + @amount = amount + @currency = currency + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + attr_accessor :credit_line_closed + # Outcome of the decision. + attr_accessor :type + + def initialize( + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ) + super + @credit_limit_approved = credit_limit_approved + @credit_limit_decreased = credit_limit_decreased + @credit_line_closed = credit_line_closed + @type = type + end + end + + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + attr_accessor :explanation + # The decision before the exception was applied. + attr_accessor :original_decision_type + + def initialize(explanation: nil, original_decision_type: nil) + super + @explanation = explanation + @original_decision_type = original_decision_type + end + end + # Information about the company or person applying or holding the account. + attr_accessor :credit_user + # Date when a decision was made. + attr_accessor :decided_at + # Details about the decision. + attr_accessor :decision + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_accessor :underwriting_exception + + def initialize( + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ) + super + @credit_user = credit_user + @decided_at = decided_at + @decision = decision + @expand = expand + @metadata = metadata + @regulatory_reporting_file = regulatory_reporting_file + @underwriting_exception = underwriting_exception + end end # For decisions triggered by an application, details about the submission. attr_reader :application @@ -112,11 +604,11 @@ def self.create_from_proactive_review(params = {}, opts = {}) end # Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/credit_underwriting_records", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/dispute.rb b/lib/stripe/resources/issuing/dispute.rb index fc2cf4e2f..43338a926 100644 --- a/lib/stripe/resources/issuing/dispute.rb +++ b/lib/stripe/resources/issuing/dispute.rb @@ -18,41 +18,791 @@ def self.object_name class Evidence < Stripe::StripeObject class Canceled < Stripe::StripeObject - attr_reader :additional_documentation, :canceled_at, :cancellation_policy_provided, :cancellation_reason, :expected_at, :explanation, :product_description, :product_type, :return_status, :returned_at + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Date when order was canceled. + attr_reader :canceled_at + # Whether the cardholder was provided with a cancellation policy. + attr_reader :cancellation_policy_provided + # Reason for canceling the order. + attr_reader :cancellation_reason + # Date when the cardholder expected to receive the product. + attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Description of the merchandise or service that was purchased. + attr_reader :product_description + # Whether the product was a merchandise or service. + attr_reader :product_type + # Result of cardholder's attempt to return the product. + attr_reader :return_status + # Date when the product was returned or attempted to be returned. + attr_reader :returned_at end class Duplicate < Stripe::StripeObject - attr_reader :additional_documentation, :card_statement, :cash_receipt, :check_image, :explanation, :original_transaction + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + attr_reader :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + attr_reader :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + attr_reader :check_image + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + attr_reader :original_transaction end class Fraudulent < Stripe::StripeObject - attr_reader :additional_documentation, :explanation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation end class MerchandiseNotAsDescribed < Stripe::StripeObject - attr_reader :additional_documentation, :explanation, :received_at, :return_description, :return_status, :returned_at + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Date when the product was received. + attr_reader :received_at + # Description of the cardholder's attempt to return the product. + attr_reader :return_description + # Result of cardholder's attempt to return the product. + attr_reader :return_status + # Date when the product was returned or attempted to be returned. + attr_reader :returned_at end class NoValidAuthorization < Stripe::StripeObject - attr_reader :additional_documentation, :explanation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation end class NotReceived < Stripe::StripeObject - attr_reader :additional_documentation, :expected_at, :explanation, :product_description, :product_type + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Date when the cardholder expected to receive the product. + attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Description of the merchandise or service that was purchased. + attr_reader :product_description + # Whether the product was a merchandise or service. + attr_reader :product_type end class Other < Stripe::StripeObject - attr_reader :additional_documentation, :explanation, :product_description, :product_type + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Description of the merchandise or service that was purchased. + attr_reader :product_description + # Whether the product was a merchandise or service. + attr_reader :product_type end class ServiceNotAsDescribed < Stripe::StripeObject - attr_reader :additional_documentation, :canceled_at, :cancellation_reason, :explanation, :received_at + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_reader :additional_documentation + # Date when order was canceled. + attr_reader :canceled_at + # Reason for canceling the order. + attr_reader :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + attr_reader :explanation + # Date when the product was received. + attr_reader :received_at end - attr_reader :canceled, :duplicate, :fraudulent, :merchandise_not_as_described, :no_valid_authorization, :not_received, :other, :reason, :service_not_as_described + # Attribute for field canceled + attr_reader :canceled + # Attribute for field duplicate + attr_reader :duplicate + # Attribute for field fraudulent + attr_reader :fraudulent + # Attribute for field merchandise_not_as_described + attr_reader :merchandise_not_as_described + # Attribute for field no_valid_authorization + attr_reader :no_valid_authorization + # Attribute for field not_received + attr_reader :not_received + # Attribute for field other + attr_reader :other + # The reason for filing the dispute. Its value will match the field containing the evidence. + attr_reader :reason + # Attribute for field service_not_as_described + attr_reader :service_not_as_described end class Treasury < Stripe::StripeObject - attr_reader :debit_reversal, :received_debit + # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute + attr_reader :debit_reversal + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. + attr_reader :received_debit + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return Issuing disputes that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Select Issuing disputes with the given status. + attr_accessor :status + # Select the Issuing dispute for the given transaction. + attr_accessor :transaction + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + transaction: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + @transaction = transaction + end + end + + class CreateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_policy_provided = cancellation_policy_provided + @cancellation_reason = cancellation_reason + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + @return_status = return_status + @returned_at = returned_at + end + end + + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + attr_accessor :original_transaction + + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ) + super + @additional_documentation = additional_documentation + @card_statement = card_statement + @cash_receipt = cash_receipt + @check_image = check_image + @explanation = explanation + @original_transaction = original_transaction + end + end + + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @received_at = received_at + @return_description = return_description + @return_status = return_status + @returned_at = returned_at + end + end + + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_reason = cancellation_reason + @explanation = explanation + @received_at = received_at + end + end + # Evidence provided when `reason` is 'canceled'. + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + attr_accessor :service_not_as_described + + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ) + super + @canceled = canceled + @duplicate = duplicate + @fraudulent = fraudulent + @merchandise_not_as_described = merchandise_not_as_described + @no_valid_authorization = no_valid_authorization + @not_received = not_received + @other = other + @reason = reason + @service_not_as_described = service_not_as_described + end + end + + class Treasury < Stripe::RequestParams + # The ID of the ReceivedDebit to initiate an Issuings dispute for. + attr_accessor :received_debit + + def initialize(received_debit: nil) + super + @received_debit = received_debit + end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + attr_accessor :amount + # Evidence provided for the dispute. + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + attr_accessor :transaction + # Params for disputes related to Treasury FinancialAccounts + attr_accessor :treasury + + def initialize( + amount: nil, + evidence: nil, + expand: nil, + metadata: nil, + transaction: nil, + treasury: nil + ) + super + @amount = amount + @evidence = evidence + @expand = expand + @metadata = metadata + @transaction = transaction + @treasury = treasury + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_policy_provided = cancellation_policy_provided + @cancellation_reason = cancellation_reason + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + @return_status = return_status + @returned_at = returned_at + end + end + + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + attr_accessor :original_transaction + + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ) + super + @additional_documentation = additional_documentation + @card_statement = card_statement + @cash_receipt = cash_receipt + @check_image = check_image + @explanation = explanation + @original_transaction = original_transaction + end + end + + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @received_at = received_at + @return_description = return_description + @return_status = return_status + @returned_at = returned_at + end + end + + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_reason = cancellation_reason + @explanation = explanation + @received_at = received_at + end + end + # Evidence provided when `reason` is 'canceled'. + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + attr_accessor :service_not_as_described + + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ) + super + @canceled = canceled + @duplicate = duplicate + @fraudulent = fraudulent + @merchandise_not_as_described = merchandise_not_as_described + @no_valid_authorization = no_valid_authorization + @not_received = not_received + @other = other + @reason = reason + @service_not_as_described = service_not_as_described + end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Evidence provided for the dispute. + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil) + super + @amount = amount + @evidence = evidence + @expand = expand + @metadata = metadata + end + end + + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end end # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). attr_reader :amount @@ -92,11 +842,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/disputes", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/dispute_settlement_detail.rb b/lib/stripe/resources/issuing/dispute_settlement_detail.rb index c94ed93cd..73c36c58d 100644 --- a/lib/stripe/resources/issuing/dispute_settlement_detail.rb +++ b/lib/stripe/resources/issuing/dispute_settlement_detail.rb @@ -12,6 +12,43 @@ def self.object_name "issuing.dispute_settlement_detail" end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Select the Issuing dispute settlement details for the given settlement. + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @settlement = settlement + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). attr_reader :amount # The card used to make the original transaction. @@ -36,11 +73,11 @@ def self.object_name attr_reader :settlement # Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/dispute_settlement_details", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/fraud_liability_debit.rb b/lib/stripe/resources/issuing/fraud_liability_debit.rb index 19872b9fb..5aff1b654 100644 --- a/lib/stripe/resources/issuing/fraud_liability_debit.rb +++ b/lib/stripe/resources/issuing/fraud_liability_debit.rb @@ -12,6 +12,61 @@ def self.object_name "issuing.fraud_liability_debit" end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return Issuing Fraud Liability Debits that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. attr_reader :amount # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. @@ -30,11 +85,11 @@ def self.object_name attr_reader :object # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/fraud_liability_debits", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/personalization_design.rb b/lib/stripe/resources/issuing/personalization_design.rb index 06387b16d..3988f45b4 100644 --- a/lib/stripe/resources/issuing/personalization_design.rb +++ b/lib/stripe/resources/issuing/personalization_design.rb @@ -15,15 +15,275 @@ def self.object_name end class CarrierText < Stripe::StripeObject - attr_reader :footer_body, :footer_title, :header_body, :header_title + # The footer body text of the carrier letter. + attr_reader :footer_body + # The footer title text of the carrier letter. + attr_reader :footer_title + # The header body text of the carrier letter. + attr_reader :header_body + # The header title text of the carrier letter. + attr_reader :header_title end class Preferences < Stripe::StripeObject - attr_reader :is_default, :is_platform_default + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + attr_reader :is_default + # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. + attr_reader :is_platform_default end class RejectionReasons < Stripe::StripeObject - attr_reader :card_logo, :carrier_text + # The reason(s) the card logo was rejected. + attr_reader :card_logo + # The reason(s) the carrier text was rejected. + attr_reader :carrier_text + end + + class ListParams < Stripe::RequestParams + class Preferences < Stripe::RequestParams + # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. + attr_accessor :is_default + # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + attr_accessor :is_platform_default + + def initialize(is_default: nil, is_platform_default: nil) + super + @is_default = is_default + @is_platform_default = is_platform_default + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return personalization designs with the given lookup keys. + attr_accessor :lookup_keys + # Only return personalization designs with the given preferences. + attr_accessor :preferences + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return personalization designs with the given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + preferences: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @lookup_keys = lookup_keys + @preferences = preferences + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + attr_accessor :footer_body + # The footer title text of the carrier letter. + attr_accessor :footer_title + # The header body text of the carrier letter. + attr_accessor :header_body + # The header title text of the carrier letter. + attr_accessor :header_title + + def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil) + super + @footer_body = footer_body + @footer_title = footer_title + @header_body = header_body + @header_title = header_title + end + end + + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + attr_accessor :is_default + + def initialize(is_default: nil) + super + @is_default = is_default + end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Friendly display name. + attr_accessor :name + # The physical bundle object belonging to this personalization design. + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + attr_accessor :transfer_lookup_key + + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ) + super + @card_logo = card_logo + @carrier_text = carrier_text + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @name = name + @physical_bundle = physical_bundle + @preferences = preferences + @transfer_lookup_key = transfer_lookup_key + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + attr_accessor :footer_body + # The footer title text of the carrier letter. + attr_accessor :footer_title + # The header body text of the carrier letter. + attr_accessor :header_body + # The header title text of the carrier letter. + attr_accessor :header_title + + def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil) + super + @footer_body = footer_body + @footer_title = footer_title + @header_body = header_body + @header_title = header_title + end + end + + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + attr_accessor :is_default + + def initialize(is_default: nil) + super + @is_default = is_default + end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Friendly display name. Providing an empty string will set the field to null. + attr_accessor :name + # The physical bundle object belonging to this personalization design. + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + attr_accessor :transfer_lookup_key + + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ) + super + @card_logo = card_logo + @carrier_text = carrier_text + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @name = name + @physical_bundle = physical_bundle + @preferences = preferences + @transfer_lookup_key = transfer_lookup_key + end + end + + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RejectParams < Stripe::RequestParams + class RejectionReasons < Stripe::RequestParams + # The reason(s) the card logo was rejected. + attr_accessor :card_logo + # The reason(s) the carrier text was rejected. + attr_accessor :carrier_text + + def initialize(card_logo: nil, carrier_text: nil) + super + @card_logo = card_logo + @carrier_text = carrier_text + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The reason(s) the personalization design was rejected. + attr_accessor :rejection_reasons + + def initialize(expand: nil, rejection_reasons: nil) + super + @expand = expand + @rejection_reasons = rejection_reasons + end end # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. attr_reader :card_logo @@ -63,11 +323,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/personalization_designs", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/physical_bundle.rb b/lib/stripe/resources/issuing/physical_bundle.rb index 2914698ba..eb7821af4 100644 --- a/lib/stripe/resources/issuing/physical_bundle.rb +++ b/lib/stripe/resources/issuing/physical_bundle.rb @@ -13,7 +13,54 @@ def self.object_name end class Features < Stripe::StripeObject - attr_reader :card_logo, :carrier_text, :second_line + # The policy for how to use card logo images in a card design with this physical bundle. + attr_reader :card_logo + # The policy for how to use carrier letter text in a card design with this physical bundle. + attr_reader :carrier_text + # The policy for how to use a second line on a card with this physical bundle. + attr_reader :second_line + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return physical bundles with the given status. + attr_accessor :status + # Only return physical bundles with the given type. + attr_accessor :type + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + type: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Attribute for field features attr_reader :features @@ -31,11 +78,11 @@ class Features < Stripe::StripeObject attr_reader :type # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/physical_bundles", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/issuing/token.rb b/lib/stripe/resources/issuing/token.rb index 22d116c94..df95ff1cf 100644 --- a/lib/stripe/resources/issuing/token.rb +++ b/lib/stripe/resources/issuing/token.rb @@ -15,24 +15,157 @@ def self.object_name class NetworkData < Stripe::StripeObject class Device < Stripe::StripeObject - attr_reader :device_fingerprint, :ip_address, :location, :name, :phone_number, :type + # An obfuscated ID derived from the device ID. + attr_reader :device_fingerprint + # The IP address of the device at provisioning time. + attr_reader :ip_address + # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. + attr_reader :location + # The name of the device used for tokenization. + attr_reader :name + # The phone number of the device used for tokenization. + attr_reader :phone_number + # The type of device used for tokenization. + attr_reader :type end class Mastercard < Stripe::StripeObject - attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_requestor_name + # A unique reference ID from MasterCard to represent the card account number. + attr_reader :card_reference_id + # The network-unique identifier for the token. + attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to MasterCard. + attr_reader :token_requestor_id + # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. + attr_reader :token_requestor_name end class Visa < Stripe::StripeObject - attr_reader :card_reference_id, :token_reference_id, :token_requestor_id, :token_risk_score + # A unique reference ID from Visa to represent the card account number. + attr_reader :card_reference_id + # The network-unique identifier for the token. + attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to Visa. + attr_reader :token_requestor_id + # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. + attr_reader :token_risk_score end class WalletProvider < Stripe::StripeObject class CardholderAddress < Stripe::StripeObject - attr_reader :line1, :postal_code + # The street address of the cardholder tokenizing the card. + attr_reader :line1 + # The postal code of the cardholder tokenizing the card. + attr_reader :postal_code end - attr_reader :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 + # The wallet provider-given account ID of the digital wallet the token belongs to. + attr_reader :account_id + # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. + attr_reader :account_trust_score + # The method used for tokenizing a card. + attr_reader :card_number_source + # Attribute for field cardholder_address + attr_reader :cardholder_address + # The name of the cardholder tokenizing the card. + attr_reader :cardholder_name + # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. + attr_reader :device_trust_score + # The hashed email address of the cardholder's account with the wallet provider. + attr_reader :hashed_account_email_address + # The reasons for suggested tokenization given by the card network. + attr_reader :reason_codes + # The recommendation on responding to the tokenization request. + attr_reader :suggested_decision + # The version of the standard for mapping reason codes followed by the wallet provider. + attr_reader :suggested_decision_version + end + # Attribute for field device + attr_reader :device + # Attribute for field mastercard + attr_reader :mastercard + # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. + attr_reader :type + # Attribute for field visa + attr_reader :visa + # Attribute for field wallet_provider + attr_reader :wallet_provider + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # The Issuing card identifier to list tokens for. + attr_accessor :card + # Only return Issuing tokens that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Select Issuing tokens with the given status. + attr_accessor :status + + def initialize( + card: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @card = card + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Specifies which status the token should be updated to. + attr_accessor :status + + def initialize(expand: nil, status: nil) + super + @expand = expand + @status = status end - attr_reader :device, :mastercard, :type, :visa, :wallet_provider end # Card associated with this token. attr_reader :card @@ -60,8 +193,8 @@ class CardholderAddress < Stripe::StripeObject attr_reader :wallet_provider # Lists all Issuing Token objects for a given card. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/issuing/tokens", params: params, opts: opts) end # Attempts to update the specified Issuing Token object to the status specified. diff --git a/lib/stripe/resources/issuing/transaction.rb b/lib/stripe/resources/issuing/transaction.rb index f59cbefc8..eb5696b6e 100644 --- a/lib/stripe/resources/issuing/transaction.rb +++ b/lib/stripe/resources/issuing/transaction.rb @@ -18,63 +18,917 @@ def self.object_name end class AmountDetails < Stripe::StripeObject - attr_reader :atm_fee, :cashback_amount + # The fee charged by the ATM for the cash withdrawal. + attr_reader :atm_fee + # The amount of cash requested by the cardholder. + attr_reader :cashback_amount end class MerchantData < Stripe::StripeObject - attr_reader :category, :category_code, :city, :country, :name, :network_id, :postal_code, :state, :tax_id, :terminal_id, :url + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_reader :category + # The merchant category code for the seller’s business + attr_reader :category_code + # City where the seller is located + attr_reader :city + # Country where the seller is located + attr_reader :country + # Name of the seller + attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_reader :network_id + # Postal code where the seller is located + attr_reader :postal_code + # State where the seller is located + attr_reader :state + # The seller's tax identification number. Currently populated for French merchants only. + attr_reader :tax_id + # An ID assigned by the seller to the location of the sale. + attr_reader :terminal_id + # URL provided by the merchant on a 3DS request + attr_reader :url end class NetworkData < Stripe::StripeObject - attr_reader :authorization_code, :processing_date, :transaction_id + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. + attr_reader :authorization_code + # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. + attr_reader :processing_date + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. + attr_reader :transaction_id end class PurchaseDetails < Stripe::StripeObject class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject - attr_reader :driver_id, :odometer, :unspecified_id, :user_id, :vehicle_number + # Driver ID. + attr_reader :driver_id + # Odometer reading. + attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_reader :unspecified_id + # User ID. + attr_reader :user_id + # Vehicle number. + attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject - attr_reader :local_amount_decimal, :national_amount_decimal + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_reader :national_amount_decimal end - attr_reader :fuel, :non_fuel, :tax + # Breakdown of fuel portion of the purchase. + attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. + attr_reader :non_fuel + # Information about tax included in this transaction. + attr_reader :tax end - attr_reader :cardholder_prompt_data, :purchase_type, :reported_breakdown, :service_type + # Answers to prompts presented to cardholder at point of sale. + attr_reader :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_reader :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_reader :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_reader :service_type end class Flight < Stripe::StripeObject class Segment < Stripe::StripeObject - attr_reader :arrival_airport_code, :carrier, :departure_airport_code, :flight_number, :service_class, :stopover_allowed + # The three-letter IATA airport code of the flight's destination. + attr_reader :arrival_airport_code + # The airline carrier code. + attr_reader :carrier + # The three-letter IATA airport code that the flight departed from. + attr_reader :departure_airport_code + # The flight number. + attr_reader :flight_number + # The flight's service class. + attr_reader :service_class + # Whether a stopover is allowed on this flight. + attr_reader :stopover_allowed end - attr_reader :departure_at, :passenger_name, :refundable, :segments, :travel_agency + # The time that the flight departed. + attr_reader :departure_at + # The name of the passenger. + attr_reader :passenger_name + # Whether the ticket is refundable. + attr_reader :refundable + # The legs of the trip. + attr_reader :segments + # The travel agency that issued the ticket. + attr_reader :travel_agency end class Fuel < Stripe::StripeObject - attr_reader :industry_product_code, :quantity_decimal, :type, :unit, :unit_cost_decimal + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_reader :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_reader :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_reader :unit_cost_decimal end class Lodging < Stripe::StripeObject - attr_reader :check_in_at, :nights + # The time of checking into the lodging. + attr_reader :check_in_at + # The number of nights stayed at the lodging. + attr_reader :nights end class Receipt < Stripe::StripeObject - attr_reader :description, :quantity, :total, :unit_cost + # The description of the item. The maximum length of this field is 26 characters. + attr_reader :description + # The quantity of the item. + attr_reader :quantity + # The total for this line item in cents. + attr_reader :total + # The unit cost of the item in cents. + attr_reader :unit_cost end - attr_reader :fleet, :flight, :fuel, :lodging, :receipt, :reference + # Fleet-specific information for transactions using Fleet cards. + attr_reader :fleet + # Information about the flight that was purchased with this transaction. + attr_reader :flight + # Information about fuel that was purchased with this transaction. + attr_reader :fuel + # Information about lodging that was purchased with this transaction. + attr_reader :lodging + # The line items in the purchase. + attr_reader :receipt + # A merchant-specific order number. + attr_reader :reference end class Treasury < Stripe::StripeObject - attr_reader :received_credit, :received_debit + # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund + attr_reader :received_credit + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture + attr_reader :received_debit + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return transactions that belong to the given card. + attr_accessor :card + # Only return transactions that belong to the given cardholder. + attr_accessor :cardholder + # Only return transactions that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return transactions that are associated with the given settlement. + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return transactions that have the given type. One of `capture` or `refund`. + attr_accessor :type + + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil, + type: nil + ) + super + @card = card + @cardholder = cardholder + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @settlement = settlement + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class RefundParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :refund_amount + + def initialize(expand: nil, refund_amount: nil) + super + @expand = expand + @refund_amount = refund_amount + end + end + + class CreateForceCaptureParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_accessor :category + # City where the seller is located + attr_accessor :city + # Country where the seller is located + attr_accessor :country + # Name of the seller + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_accessor :network_id + # Postal code where the seller is located + attr_accessor :postal_code + # State where the seller is located + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + attr_accessor :url + + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ) + super + @category = category + @city = city + @country = country + @name = name + @network_id = network_id + @postal_code = postal_code + @state = state + @terminal_id = terminal_id + @url = url + end + end + + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + attr_accessor :arrival_airport_code + # The airline carrier code. + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + attr_accessor :departure_airport_code + # The flight number. + attr_accessor :flight_number + # The flight's service class. + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + attr_accessor :stopover_allowed + + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ) + super + @arrival_airport_code = arrival_airport_code + @carrier = carrier + @departure_airport_code = departure_airport_code + @flight_number = flight_number + @service_class = service_class + @stopover_allowed = stopover_allowed + end + end + # The time that the flight departed. + attr_accessor :departure_at + # The name of the passenger. + attr_accessor :passenger_name + # Whether the ticket is refundable. + attr_accessor :refundable + # The legs of the trip. + attr_accessor :segments + # The travel agency that issued the ticket. + attr_accessor :travel_agency + + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ) + super + @departure_at = departure_at + @passenger_name = passenger_name + @refundable = refundable + @segments = segments + @travel_agency = travel_agency + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + attr_accessor :nights + + def initialize(check_in_at: nil, nights: nil) + super + @check_in_at = check_in_at + @nights = nights + end + end + + class Receipt < Stripe::RequestParams + # Attribute for param field description + attr_accessor :description + # Attribute for param field quantity + attr_accessor :quantity + # Attribute for param field total + attr_accessor :total + # Attribute for param field unit_cost + attr_accessor :unit_cost + + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) + super + @description = description + @quantity = quantity + @total = total + @unit_cost = unit_cost + end + end + # Fleet-specific information for transactions using Fleet cards. + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + attr_accessor :lodging + # The line items in the purchase. + attr_accessor :receipt + # A merchant-specific order number. + attr_accessor :reference + + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ) + super + @fleet = fleet + @flight = flight + @fuel = fuel + @lodging = lodging + @receipt = receipt + @reference = reference + end + end + # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Card associated with this transaction. + attr_accessor :card + # The currency of the capture. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + attr_accessor :purchase_details + + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ) + super + @amount = amount + @card = card + @currency = currency + @expand = expand + @merchant_data = merchant_data + @purchase_details = purchase_details + end + end + + class CreateUnlinkedRefundParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_accessor :category + # City where the seller is located + attr_accessor :city + # Country where the seller is located + attr_accessor :country + # Name of the seller + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_accessor :network_id + # Postal code where the seller is located + attr_accessor :postal_code + # State where the seller is located + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + attr_accessor :url + + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ) + super + @category = category + @city = city + @country = country + @name = name + @network_id = network_id + @postal_code = postal_code + @state = state + @terminal_id = terminal_id + @url = url + end + end + + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + attr_accessor :arrival_airport_code + # The airline carrier code. + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + attr_accessor :departure_airport_code + # The flight number. + attr_accessor :flight_number + # The flight's service class. + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + attr_accessor :stopover_allowed + + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ) + super + @arrival_airport_code = arrival_airport_code + @carrier = carrier + @departure_airport_code = departure_airport_code + @flight_number = flight_number + @service_class = service_class + @stopover_allowed = stopover_allowed + end + end + # The time that the flight departed. + attr_accessor :departure_at + # The name of the passenger. + attr_accessor :passenger_name + # Whether the ticket is refundable. + attr_accessor :refundable + # The legs of the trip. + attr_accessor :segments + # The travel agency that issued the ticket. + attr_accessor :travel_agency + + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ) + super + @departure_at = departure_at + @passenger_name = passenger_name + @refundable = refundable + @segments = segments + @travel_agency = travel_agency + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + attr_accessor :nights + + def initialize(check_in_at: nil, nights: nil) + super + @check_in_at = check_in_at + @nights = nights + end + end + + class Receipt < Stripe::RequestParams + # Attribute for param field description + attr_accessor :description + # Attribute for param field quantity + attr_accessor :quantity + # Attribute for param field total + attr_accessor :total + # Attribute for param field unit_cost + attr_accessor :unit_cost + + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) + super + @description = description + @quantity = quantity + @total = total + @unit_cost = unit_cost + end + end + # Fleet-specific information for transactions using Fleet cards. + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + attr_accessor :lodging + # The line items in the purchase. + attr_accessor :receipt + # A merchant-specific order number. + attr_accessor :reference + + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ) + super + @fleet = fleet + @flight = flight + @fuel = fuel + @lodging = lodging + @receipt = receipt + @reference = reference + end + end + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Card associated with this unlinked refund transaction. + attr_accessor :card + # The currency of the unlinked refund. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + attr_accessor :purchase_details + + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ) + super + @amount = amount + @card = card + @currency = currency + @expand = expand + @merchant_data = merchant_data + @purchase_details = purchase_details + end end # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount @@ -124,11 +978,11 @@ class Treasury < Stripe::StripeObject attr_reader :wallet # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/issuing/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/line_item.rb b/lib/stripe/resources/line_item.rb index ae720b1f1..dae0bf217 100644 --- a/lib/stripe/resources/line_item.rb +++ b/lib/stripe/resources/line_item.rb @@ -10,19 +10,44 @@ def self.object_name end class AdjustableQuantity < Stripe::StripeObject - attr_reader :enabled, :maximum, :minimum + # Attribute for field enabled + attr_reader :enabled + # Attribute for field maximum + attr_reader :maximum + # Attribute for field minimum + attr_reader :minimum end class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Display < Stripe::StripeObject - attr_reader :description, :images, :name + # Attribute for field description + attr_reader :description + # Attribute for field images + attr_reader :images + # Attribute for field name + attr_reader :name end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end # Attribute for field adjustable_quantity attr_reader :adjustable_quantity diff --git a/lib/stripe/resources/mandate.rb b/lib/stripe/resources/mandate.rb index c1cca7a8c..c3d2bb418 100644 --- a/lib/stripe/resources/mandate.rb +++ b/lib/stripe/resources/mandate.rb @@ -13,26 +13,51 @@ class CustomerAcceptance < Stripe::StripeObject class Offline < Stripe::StripeObject; end class Online < Stripe::StripeObject - attr_reader :ip_address, :user_agent + # The customer accepts the mandate from this IP address. + attr_reader :ip_address + # The customer accepts the mandate using the user agent of the browser. + attr_reader :user_agent end - attr_reader :accepted_at, :offline, :online, :type + # The time that the customer accepts the mandate. + attr_reader :accepted_at + # Attribute for field offline + attr_reader :offline + # Attribute for field online + attr_reader :online + # The mandate includes the type of customer acceptance information, such as: `online` or `offline`. + attr_reader :type end class MultiUse < Stripe::StripeObject; end class PaymentMethodDetails < Stripe::StripeObject class AcssDebit < Stripe::StripeObject - attr_reader :default_for, :interval_description, :payment_schedule, :transaction_type + # List of Stripe products where this mandate can be selected automatically. + attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. attr_reader :url end class BacsDebit < Stripe::StripeObject - attr_reader :network_status, :reference, :revocation_reason, :url + # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. + attr_reader :network_status + # The unique reference identifying the mandate on the Bacs network. + attr_reader :reference + # When the mandate is revoked on the Bacs network this field displays the reason for the revocation. + attr_reader :revocation_reason + # The URL that will contain the mandate that the customer has signed. + attr_reader :url end class Card < Stripe::StripeObject; end @@ -42,27 +67,94 @@ class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - attr_reader :billing_agreement_id, :fingerprint, :payer_id, :verified_email + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_reader :billing_agreement_id + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + attr_reader :fingerprint + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email end class Payto < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_reader :start_date end class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject - attr_reader :reference, :url + # The unique reference of the mandate. + attr_reader :reference + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. + attr_reader :url end class UsBankAccount < Stripe::StripeObject + # Mandate collection method attr_reader :collection_method end - attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :card, :cashapp, :kakao_pay, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :type, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field card + attr_reader :card + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class SingleUse < Stripe::StripeObject - attr_reader :amount, :currency + # The amount of the payment on a single use mandate. + attr_reader :amount + # The currency of the payment on a single use mandate. + attr_reader :currency + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Attribute for field customer_acceptance attr_reader :customer_acceptance diff --git a/lib/stripe/resources/margin.rb b/lib/stripe/resources/margin.rb index 3724a5b7d..a898096f3 100644 --- a/lib/stripe/resources/margin.rb +++ b/lib/stripe/resources/margin.rb @@ -14,6 +14,78 @@ def self.object_name "margin" end + class ListParams < Stripe::RequestParams + # Only return margins that are active or inactive. For example, pass `true` to only list active margins. + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(active: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @active = active + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + attr_accessor :name + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + attr_accessor :percent_off + + def initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil) + super + @active = active + @expand = expand + @metadata = metadata + @name = name + @percent_off = percent_off + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + attr_accessor :name + + def initialize(active: nil, expand: nil, metadata: nil, name: nil) + super + @active = active + @expand = expand + @metadata = metadata + @name = name + end + end # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. attr_reader :active # Time at which the object was created. Measured in seconds since the Unix epoch. @@ -39,8 +111,8 @@ def self.create(params = {}, opts = {}) end # Retrieve a list of your margins. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/billing/margins", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/billing/margins", params: params, opts: opts) end # Update the specified margin object. Certain fields of the margin object are not editable. diff --git a/lib/stripe/resources/order.rb b/lib/stripe/resources/order.rb index fad2e9ec0..a5c75211b 100644 --- a/lib/stripe/resources/order.rb +++ b/lib/stripe/resources/order.rb @@ -18,151 +18,2779 @@ def self.object_name end class AutomaticTax < Stripe::StripeObject - attr_reader :enabled, :status + # Whether Stripe automatically computes tax on this Order. + attr_reader :enabled + # The status of the most recent automated tax calculation for this Order. + attr_reader :status end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address for the order. + attr_reader :address + # Email address for the order. + attr_reader :email + # Full name for the order. + attr_reader :name + # Billing phone number for the order (including extension). + attr_reader :phone end class Credit < Stripe::StripeObject class GiftCard < Stripe::StripeObject + # The token of the gift card applied to the order attr_reader :card end - attr_reader :amount, :gift_card, :ineligible_line_items, :type + # The amount of this credit to apply to the order. + attr_reader :amount + # Details for a gift card. + attr_reader :gift_card + # Line items on this order that are ineligible for this credit + attr_reader :ineligible_line_items + # The type of credit to apply to the order, only `gift_card` currently supported. + attr_reader :type end class Payment < Stripe::StripeObject class Settings < Stripe::StripeObject class AutomaticPaymentMethods < Stripe::StripeObject + # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). attr_reader :enabled end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :mandate_options, :setup_future_usage, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class AfterpayClearpay < Stripe::StripeObject - attr_reader :capture_method, :reference, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + attr_reader :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Card < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :requested_address_types, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type, :setup_future_usage + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. + attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Link < Stripe::StripeObject - attr_reader :capture_method, :persistent_token, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Oxxo < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :behavior + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :amount + # The tax behavior for the line item. + attr_reader :behavior end - attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount + # Type of the line item. + attr_reader :category + # Description of the line item. + attr_reader :description + # Descriptive name of the line item. + attr_reader :name + # Quantity of the line item. Cannot be a negative number. + attr_reader :quantity + # Client facing stock keeping unit, article number or similar. + attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + attr_reader :sold_by + # Attribute for field tax + attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :unit_amount end - attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # The line items purchased by the customer. + attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. + attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. attr_reader :reference_prefix end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the SOFORT authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class WechatPay < Stripe::StripeObject - attr_reader :app_id, :client, :setup_future_usage + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_reader :app_id + # The client type that the end customer will pay from + attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end - attr_reader :acss_debit, :afterpay_clearpay, :alipay, :bancontact, :card, :customer_balance, :ideal, :klarna, :link, :oxxo, :p24, :paypal, :sepa_debit, :sofort, :wechat_pay + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field card + attr_reader :card + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field ideal + attr_reader :ideal + # Attribute for field klarna + attr_reader :klarna + # Attribute for field link + attr_reader :link + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field paypal + attr_reader :paypal + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # Attribute for field wechat_pay + attr_reader :wechat_pay end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_reader :amount + # ID of the Connected account receiving the transfer. + attr_reader :destination end - attr_reader :application_fee_amount, :automatic_payment_methods, :payment_method_options, :payment_method_types, :return_url, :statement_descriptor, :statement_descriptor_suffix, :transfer_data + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_reader :application_fee_amount + # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. + attr_reader :automatic_payment_methods + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + attr_reader :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_reader :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + attr_reader :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + attr_reader :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + attr_reader :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + attr_reader :transfer_data end - attr_reader :payment_intent, :settings, :status + # ID of the payment intent associated with this order. Null when the order is `open`. + attr_reader :payment_intent + # Settings describing how the order should configure generated PaymentIntents. + attr_reader :settings + # The status of the underlying payment associated with this order, if any. Null when the order is `open`. + attr_reader :status end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this order. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :name, :phone + # Recipient shipping address. Required if the order includes products that are shippable. + attr_reader :address + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone end class TaxDetails < Stripe::StripeObject class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :tax_exempt, :tax_ids + # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + attr_reader :tax_exempt + # The purchaser's tax IDs to be used in calculation of tax for this Order. + attr_reader :tax_ids end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount + end + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes + end + # Attribute for field amount_credit + attr_reader :amount_credit + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown + end + + class ListParams < Stripe::RequestParams + # Only return orders for the given customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address provided by the customer. + attr_accessor :address + # The billing email provided by the customer. + attr_accessor :email + # The billing name provided by the customer. + attr_accessor :name + # The billing phone number provided by the customer. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + attr_accessor :type + + def initialize(gift_card: nil, type: nil) + super + @gift_card = gift_card + @type = type + end + end + + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + + def initialize(coupon: nil, discount: nil) + super + @coupon = coupon + @discount = discount + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end end - attr_reader :discounts, :taxes + + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ) + super + @description = description + @id = id + @images = images + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @shippable = shippable + @tax_code = tax_code + @url = url + end + end + # The description for the line item. Will default to the name of the associated product. + attr_accessor :description + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + attr_accessor :product_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates applied to this line item. + attr_accessor :tax_rates + + def initialize( + description: nil, + discounts: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @description = description + @discounts = discounts + @price = price + @price_data = price_data + @product = product + @product_data = product_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + attr_accessor :wechat_pay + + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ) + super + @acss_debit = acss_debit + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @ideal = ideal + @klarna = klarna + @link = link + @oxxo = oxxo + @p24 = p24 + @paypal = paypal + @sepa_debit = sepa_debit + @sofort = sofort + @wechat_pay = wechat_pay + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # ID of the Connected account receiving the transfer. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + attr_accessor :transfer_data + + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ) + super + @application_fee_amount = application_fee_amount + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @return_url = return_url + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + end + end + # Settings describing how the order should configure generated PaymentIntents. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The shipping address for the order. + attr_accessor :address + # The name of the recipient of the order. + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + attr_accessor :tax_ids + + def initialize(tax_exempt: nil, tax_ids: nil) + super + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + # Settings for automatic tax calculation for this order. + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The customer associated with this order. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The IP address of the purchaser for this order. + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + attr_accessor :shipping_cost + # Shipping details for the order. + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + attr_accessor :tax_details + + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ) + super + @automatic_tax = automatic_tax + @billing_details = billing_details + @credits = credits + @currency = currency + @customer = customer + @description = description + @discounts = discounts + @expand = expand + @ip_address = ip_address + @line_items = line_items + @metadata = metadata + @payment = payment + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @tax_details = tax_details + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address provided by the customer. + attr_accessor :address + # The billing email provided by the customer. + attr_accessor :email + # The billing name provided by the customer. + attr_accessor :name + # The billing phone number provided by the customer. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + attr_accessor :type + + def initialize(gift_card: nil, type: nil) + super + @gift_card = gift_card + @type = type + end + end + + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + + def initialize(coupon: nil, discount: nil) + super + @coupon = coupon + @discount = discount + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ) + super + @description = description + @id = id + @images = images + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @shippable = shippable + @tax_code = tax_code + @url = url + end + end + # The description for the line item. Will default to the name of the associated product. + attr_accessor :description + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of an existing line item on the order. + attr_accessor :id + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + attr_accessor :product_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates applied to this line item. + attr_accessor :tax_rates + + def initialize( + description: nil, + discounts: nil, + id: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @description = description + @discounts = discounts + @id = id + @price = price + @price_data = price_data + @product = product + @product_data = product_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + attr_accessor :wechat_pay + + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ) + super + @acss_debit = acss_debit + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @ideal = ideal + @klarna = klarna + @link = link + @oxxo = oxxo + @p24 = p24 + @paypal = paypal + @sepa_debit = sepa_debit + @sofort = sofort + @wechat_pay = wechat_pay + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # ID of the Connected account receiving the transfer. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + attr_accessor :transfer_data + + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ) + super + @application_fee_amount = application_fee_amount + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @return_url = return_url + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + end + end + # Settings describing how the order should configure generated PaymentIntents. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The shipping address for the order. + attr_accessor :address + # The name of the recipient of the order. + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + attr_accessor :tax_ids + + def initialize(tax_exempt: nil, tax_ids: nil) + super + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + # Settings for automatic tax calculation for this order. + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field. + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The customer associated with this order. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The IP address of the purchaser for this order. + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + attr_accessor :shipping_cost + # Shipping details for the order. + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + attr_accessor :tax_details + + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ) + super + @automatic_tax = automatic_tax + @billing_details = billing_details + @credits = credits + @currency = currency + @customer = customer + @description = description + @discounts = discounts + @expand = expand + @ip_address = ip_address + @line_items = line_items + @metadata = metadata + @payment = payment + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @tax_details = tax_details + end + end + + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReopenParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. + attr_accessor :expected_total + + def initialize(expand: nil, expected_total: nil) + super + @expand = expand + @expected_total = expected_total end - attr_reader :amount_credit, :amount_discount, :amount_shipping, :amount_tax, :breakdown end # Attribute for field amount_remaining attr_reader :amount_remaining @@ -245,8 +2873,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/orders", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/orders", params: params, opts: opts) end # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/payment_attempt_record.rb b/lib/stripe/resources/payment_attempt_record.rb index 7b5bf5829..2d6839109 100644 --- a/lib/stripe/resources/payment_attempt_record.rb +++ b/lib/stripe/resources/payment_attempt_record.rb @@ -15,44 +15,130 @@ def self.object_name end class AmountCanceled < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountFailed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountGuaranteed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountRequested < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class CustomerDetails < Stripe::StripeObject - attr_reader :customer, :email, :name, :phone + # ID of the Stripe Customer associated with this payment. + attr_reader :customer + # The customer's email address. + attr_reader :email + # The customer's name. + attr_reader :name + # The customer's phone number. + attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # A representation of a physical address. + attr_reader :address + # The billing email associated with the method of payment. + attr_reader :email + # The billing name associated with the method of payment. + attr_reader :name + # The billing phone number associated with the method of payment. + attr_reader :phone end class Custom < Stripe::StripeObject - attr_reader :display_name, :type + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_reader :display_name + # The custom payment method type associated with this payment. + attr_reader :type end - attr_reader :billing_details, :custom, :payment_method, :type + # The billing details associated with the method of payment. + attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. + attr_reader :payment_method + # The type of Payment Method used for this payment attempt. + attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # A representation of a physical address. + attr_reader :address + # The shipping recipient's name. + attr_reader :name + # The shipping recipient's phone number. + attr_reader :phone + end + + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the Payment Record. + attr_accessor :payment_record + + def initialize(expand: nil, payment_record: nil) + super + @expand = expand + @payment_record = payment_record + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :address, :name, :phone end # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_canceled @@ -88,11 +174,11 @@ class Address < Stripe::StripeObject attr_reader :shipping_details # List all the Payment Attempt Records attached to the specified Payment Record. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_attempt_records", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/payment_intent.rb b/lib/stripe/resources/payment_intent.rb index 8c158afc7..29e7d611f 100644 --- a/lib/stripe/resources/payment_intent.rb +++ b/lib/stripe/resources/payment_intent.rb @@ -26,542 +26,13147 @@ def self.object_name class AmountDetails < Stripe::StripeObject class Tip < Stripe::StripeObject + # Portion of the amount that corresponds to a tip. attr_reader :amount end + # Attribute for field tip attr_reader :tip end class AsyncWorkflows < Stripe::StripeObject class Inputs < Stripe::StripeObject class Tax < Stripe::StripeObject + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id attr_reader :calculation end + # Attribute for field tax attr_reader :tax end + # Attribute for field inputs attr_reader :inputs end class AutomaticPaymentMethods < Stripe::StripeObject - attr_reader :allow_redirects, :enabled + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + attr_reader :allow_redirects + # Automatically calculates compatible payment methods + attr_reader :enabled end class LastPaymentError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class NextAction < Stripe::StripeObject class AlipayHandleRedirect < Stripe::StripeObject - attr_reader :native_data, :native_url, :return_url, :url + # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. + attr_reader :native_data + # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. + attr_reader :native_url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. + attr_reader :url end class BoletoDisplayDetails < Stripe::StripeObject - attr_reader :expires_at, :hosted_voucher_url, :number, :pdf + # The timestamp after which the boleto expires. + attr_reader :expires_at + # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. + attr_reader :hosted_voucher_url + # The boleto number. + attr_reader :number + # The URL to the downloadable boleto voucher PDF. + attr_reader :pdf end class CardAwaitNotification < Stripe::StripeObject - attr_reader :charge_attempt_at, :customer_approval_required + # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. + attr_reader :charge_attempt_at + # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. + attr_reader :customer_approval_required end class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - attr_reader :expires_at, :image_url_png, :image_url_svg + # The date (unix timestamp) when the QR code expires. + attr_reader :expires_at + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end - attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + attr_reader :hosted_instructions_url + # The url for mobile redirect based auth + attr_reader :mobile_auth_url + # Attribute for field qr_code + attr_reader :qr_code end class DisplayBankTransferInstructions < Stripe::StripeObject class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :routing_number + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The ABA account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The ABA routing number + attr_reader :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :bank_address, :bic, :country, :iban + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address + # The BIC/SWIFT code of the account. + attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # The IBAN of the account. + attr_reader :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :bank_address, :sort_code + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The name of the person or business that owns the bank account + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # Attribute for field bank_address + attr_reader :bank_address + # The six-digit sort code + attr_reader :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :bank_address, :bank_code, :bank_name, :clabe + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # Attribute for field bank_address + attr_reader :bank_address + # The three-digit bank code + attr_reader :bank_code + # The short banking institution name + attr_reader :bank_name + # The CLABE number + attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_name, :swift_code + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The account type + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank name + attr_reader :bank_name + # The SWIFT code + attr_reader :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class BankAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :account_holder_address, :account_holder_name, :account_number, :account_type, :bank_address, :bank_code, :bank_name, :branch_code, :branch_name + # Attribute for field account_holder_address + attr_reader :account_holder_address + # The account holder name + attr_reader :account_holder_name + # The account number + attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. + attr_reader :account_type + # Attribute for field bank_address + attr_reader :bank_address + # The bank code of the account + attr_reader :bank_code + # The bank name of the account + attr_reader :bank_name + # The branch code of the account + attr_reader :branch_code + # The branch name of the account + attr_reader :branch_name end - attr_reader :aba, :iban, :sort_code, :spei, :supported_networks, :swift, :type, :zengin + # ABA Records contain U.S. bank account details per the ABA format. + attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. + attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. + attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. + attr_reader :spei + # The payment networks supported by this FinancialAddress + attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. + attr_reader :swift + # The type of financial address + attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. + attr_reader :zengin end - attr_reader :amount_remaining, :currency, :financial_addresses, :hosted_instructions_url, :reference, :type + # The remaining amount that needs to be transferred to complete the payment. + attr_reader :amount_remaining + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A list of financial addresses that can be used to fund the customer balance + attr_reader :financial_addresses + # A link to a hosted page that guides your customer through completing the transfer. + attr_reader :hosted_instructions_url + # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. + attr_reader :reference + # Type of bank transfer + attr_reader :type end class KonbiniDisplayDetails < Stripe::StripeObject class Stores < Stripe::StripeObject class Familymart < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end class Lawson < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end class Ministop < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end class Seicomart < Stripe::StripeObject - attr_reader :confirmation_number, :payment_code + # The confirmation number. + attr_reader :confirmation_number + # The payment code. + attr_reader :payment_code end - attr_reader :familymart, :lawson, :ministop, :seicomart + # FamilyMart instruction details. + attr_reader :familymart + # Lawson instruction details. + attr_reader :lawson + # Ministop instruction details. + attr_reader :ministop + # Seicomart instruction details. + attr_reader :seicomart end - attr_reader :expires_at, :hosted_voucher_url, :stores + # The timestamp at which the pending Konbini payment expires. + attr_reader :expires_at + # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. + attr_reader :hosted_voucher_url + # Attribute for field stores + attr_reader :stores end class MultibancoDisplayDetails < Stripe::StripeObject - attr_reader :entity, :expires_at, :hosted_voucher_url, :reference + # Entity number associated with this Multibanco payment. + attr_reader :entity + # The timestamp at which the Multibanco voucher expires. + attr_reader :expires_at + # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. + attr_reader :hosted_voucher_url + # Reference number associated with this Multibanco payment. + attr_reader :reference end class OxxoDisplayDetails < Stripe::StripeObject - attr_reader :expires_after, :hosted_voucher_url, :number + # The timestamp after which the OXXO voucher expires. + attr_reader :expires_after + # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. + attr_reader :hosted_voucher_url + # OXXO reference number. + attr_reader :number end class PaynowDisplayQrCode < Stripe::StripeObject - attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. + attr_reader :hosted_instructions_url + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end class PixDisplayQrCode < Stripe::StripeObject - attr_reader :data, :expires_at, :hosted_instructions_url, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The date (unix timestamp) when the PIX expires. + attr_reader :expires_at + # The URL to the hosted pix instructions page, which allows customers to view the pix QR code. + attr_reader :hosted_instructions_url + # The image_url_png string used to render png QR code + attr_reader :image_url_png + # The image_url_svg string used to render svg QR code + attr_reader :image_url_svg end class PromptpayDisplayQrCode < Stripe::StripeObject - attr_reader :data, :hosted_instructions_url, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. + attr_reader :hosted_instructions_url + # The PNG path used to render the QR code, can be used as the source in an HTML img tag + attr_reader :image_url_png + # The SVG path used to render the QR code, can be used as the source in an HTML img tag + attr_reader :image_url_svg end class RedirectToUrl < Stripe::StripeObject - attr_reader :return_url, :url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. + attr_reader :url end class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - attr_reader :data, :image_url_png, :image_url_svg + # The raw data string used to generate QR code, it should be used together with QR code library. + attr_reader :data + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end - attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + # The URL to the hosted Swish instructions page, which allows customers to view the QR code. + attr_reader :hosted_instructions_url + # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). + attr_reader :mobile_auth_url + # Attribute for field qr_code + attr_reader :qr_code end class VerifyWithMicrodeposits < Stripe::StripeObject - attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type + # The timestamp when the microdeposits are expected to land. + attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. + attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + attr_reader :microdeposit_type end class WechatPayDisplayQrCode < Stripe::StripeObject - attr_reader :data, :hosted_instructions_url, :image_data_url, :image_url_png, :image_url_svg + # The data being used to generate QR code + attr_reader :data + # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. + attr_reader :hosted_instructions_url + # The base64 image data for a pre-generated QR code + attr_reader :image_data_url + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end class WechatPayRedirectToAndroidApp < Stripe::StripeObject - attr_reader :app_id, :nonce_str, :package, :partner_id, :prepay_id, :sign, :timestamp + # app_id is the APP ID registered on WeChat open platform + attr_reader :app_id + # nonce_str is a random string + attr_reader :nonce_str + # package is static value + attr_reader :package + # an unique merchant ID assigned by WeChat Pay + attr_reader :partner_id + # an unique trading ID assigned by WeChat Pay + attr_reader :prepay_id + # A signature + attr_reader :sign + # Specifies the current time in epoch format + attr_reader :timestamp end class WechatPayRedirectToIosApp < Stripe::StripeObject + # An universal link that redirect to WeChat Pay app attr_reader :native_url end - attr_reader :alipay_handle_redirect, :boleto_display_details, :card_await_notification, :cashapp_handle_redirect_or_display_qr_code, :display_bank_transfer_instructions, :konbini_display_details, :multibanco_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 + # Attribute for field alipay_handle_redirect + attr_reader :alipay_handle_redirect + # Attribute for field boleto_display_details + attr_reader :boleto_display_details + # Attribute for field card_await_notification + attr_reader :card_await_notification + # Attribute for field cashapp_handle_redirect_or_display_qr_code + attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field display_bank_transfer_instructions + attr_reader :display_bank_transfer_instructions + # Attribute for field konbini_display_details + attr_reader :konbini_display_details + # Attribute for field multibanco_display_details + attr_reader :multibanco_display_details + # Attribute for field oxxo_display_details + attr_reader :oxxo_display_details + # Attribute for field paynow_display_qr_code + attr_reader :paynow_display_qr_code + # Attribute for field pix_display_qr_code + attr_reader :pix_display_qr_code + # Attribute for field promptpay_display_qr_code + attr_reader :promptpay_display_qr_code + # Attribute for field redirect_to_url + attr_reader :redirect_to_url + # Attribute for field swish_handle_redirect_or_display_qr_code + attr_reader :swish_handle_redirect_or_display_qr_code + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + attr_reader :type + # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits + attr_reader :verify_with_microdeposits + # Attribute for field wechat_pay_display_qr_code + attr_reader :wechat_pay_display_qr_code + # Attribute for field wechat_pay_redirect_to_android_app + attr_reader :wechat_pay_redirect_to_android_app + # Attribute for field wechat_pay_redirect_to_ios_app + attr_reader :wechat_pay_redirect_to_ios_app end class PaymentDetails < Stripe::StripeObject class CarRental < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - attr_reader :email, :name, :phone + # The email of the recipient the ticket is delivered to. + attr_reader :email + # The name of the recipient the ticket is delivered to. + attr_reader :name + # The phone number of the recipient the ticket is delivered to. + attr_reader :phone end - attr_reader :mode, :recipient + # The delivery method for the payment + attr_reader :mode + # Attribute for field recipient + attr_reader :recipient end class Driver < Stripe::StripeObject + # Full name of the driver on the reservation. attr_reader :name end class PickupAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ReturnAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :affiliate, :booking_number, :car_class_code, :car_make, :car_model, :company, :customer_service_phone_number, :days_rented, :delivery, :drivers, :extra_charges, :no_show, :pickup_address, :pickup_at, :rate_amount, :rate_interval, :renter_name, :return_address, :return_at, :tax_exempt + # Attribute for field affiliate + attr_reader :affiliate + # The booking number associated with the car rental. + attr_reader :booking_number + # Class code of the car. + attr_reader :car_class_code + # Make of the car. + attr_reader :car_make + # Model of the car. + attr_reader :car_model + # The name of the rental car company. + attr_reader :company + # The customer service phone number of the car rental company. + attr_reader :customer_service_phone_number + # Number of days the car is being rented. + attr_reader :days_rented + # Attribute for field delivery + attr_reader :delivery + # The details of the drivers associated with the trip. + attr_reader :drivers + # List of additional charges being billed. + attr_reader :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_reader :no_show + # Attribute for field pickup_address + attr_reader :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_reader :pickup_at + # Rental rate. + attr_reader :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_reader :rate_interval + # The full name of the person or entity renting the car. + attr_reader :renter_name + # Attribute for field return_address + attr_reader :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_reader :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_reader :tax_exempt end class EventDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject - attr_reader :email, :name, :phone + # The email of the recipient the ticket is delivered to. + attr_reader :email + # The name of the recipient the ticket is delivered to. + attr_reader :name + # The phone number of the recipient the ticket is delivered to. + attr_reader :phone end - attr_reader :mode, :recipient + # The delivery method for the payment + attr_reader :mode + # Attribute for field recipient + attr_reader :recipient end - attr_reader :access_controlled_venue, :address, :affiliate, :company, :delivery, :ends_at, :genre, :name, :starts_at + # Indicates if the tickets are digitally checked when entering the venue. + attr_reader :access_controlled_venue + # Attribute for field address + attr_reader :address + # Attribute for field affiliate + attr_reader :affiliate + # The name of the company + attr_reader :company + # Attribute for field delivery + attr_reader :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_reader :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_reader :genre + # The name of the event. + attr_reader :name + # Event start time. Measured in seconds since the Unix epoch. + attr_reader :starts_at end class Subscription < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. attr_reader :name end class BillingInterval < Stripe::StripeObject - attr_reader :count, :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval end - attr_reader :affiliate, :auto_renewal, :billing_interval, :ends_at, :name, :starts_at + # Attribute for field affiliate + attr_reader :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_reader :auto_renewal + # Attribute for field billing_interval + attr_reader :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_reader :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription. + attr_reader :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_reader :starts_at end - attr_reader :car_rental, :event_details, :subscription + # Attribute for field car_rental + attr_reader :car_rental + # Attribute for field event_details + attr_reader :event_details + # Attribute for field subscription + attr_reader :subscription end class PaymentMethodConfigurationDetails < Stripe::StripeObject - attr_reader :id, :parent + # ID of the payment method configuration used. + attr_reader :id + # ID of the parent payment method configuration used. + attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :mandate_options, :setup_future_usage, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class Affirm < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject - attr_reader :capture_method, :reference, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Alma < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class AmazonPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. attr_reader :reference_prefix end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Blik < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject class AvailablePlan < Stripe::StripeObject - attr_reader :count, :interval, :type + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_reader :interval + # Type of installment plan, one of `fixed_count`. + attr_reader :type end class Plan < Stripe::StripeObject - attr_reader :count, :interval, :type + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. + attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_reader :interval + # Type of installment plan, one of `fixed_count`. + attr_reader :type end - attr_reader :available_plans, :enabled, :plan + # Installment plans that may be selected for this PaymentIntent. + attr_reader :available_plans + # Whether Installments are enabled for this PaymentIntent. + attr_reader :enabled + # Installment plan selected for this PaymentIntent. + attr_reader :plan end class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types + # Amount to be charged for future payments. + attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_reader :interval_count + # Unique identifier for the mandate or subscription. + attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_reader :supported_types end class StatementDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :phone + # Attribute for field address + attr_reader :address + # Phone number + attr_reader :phone end - attr_reader :capture_method, :installments, :mandate_options, :network, :request_decremental_authorization, :request_extended_authorization, :request_incremental_authorization, :request_multicapture, :request_overcapture, :request_partial_authorization, :request_three_d_secure, :require_cvc_recollection, :setup_future_usage, :statement_descriptor_suffix_kana, :statement_descriptor_suffix_kanji, :statement_details + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_reader :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_reader :mandate_options + # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. + attr_reader :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_reader :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_reader :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_reader :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_reader :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_reader :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_reader :statement_descriptor_suffix_kanji + # Attribute for field statement_details + attr_reader :statement_details end class CardPresent < Stripe::StripeObject class Routing < Stripe::StripeObject + # Requested routing priority attr_reader :requested_priority end - attr_reader :request_extended_authorization, :request_incremental_authorization_support, :routing + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_reader :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_reader :request_incremental_authorization_support + # Attribute for field routing + attr_reader :routing end class Cashapp < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :requested_address_types, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type, :setup_future_usage + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Gopay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class IdBankTransfer < Stripe::StripeObject - attr_reader :expires_after, :expires_at, :setup_future_usage + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. + attr_reader :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class InteracPresent < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject - attr_reader :capture_method, :preferred_locale, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. + attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject - attr_reader :confirmation_number, :expires_after_days, :expires_at, :product_description, :setup_future_usage + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. + attr_reader :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. + attr_reader :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_reader :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_reader :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Link < Stripe::StripeObject - attr_reader :capture_method, :persistent_token, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class MbWay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Oxxo < Stripe::StripeObject - attr_reader :expires_after_days, :setup_future_usage + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :behavior + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :amount + # The tax behavior for the line item. + attr_reader :behavior end - attr_reader :category, :description, :name, :quantity, :sku, :sold_by, :tax, :unit_amount + # Type of the line item. + attr_reader :category + # Description of the line item. + attr_reader :description + # Descriptive name of the line item. + attr_reader :name + # Quantity of the line item. Cannot be a negative number. + attr_reader :quantity + # Client facing stock keeping unit, article number or similar. + attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). + attr_reader :sold_by + # Attribute for field tax + attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_reader :unit_amount end - attr_reader :capture_method, :line_items, :preferred_locale, :reference, :reference_id, :setup_future_usage, :subsellers + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # The line items purchased by the customer. + attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. + attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Pix < Stripe::StripeObject - attr_reader :expires_after_seconds, :expires_at, :setup_future_usage + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. + attr_reader :expires_after_seconds + # The timestamp at which the Pix expires. + attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Promptpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Qris < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject - attr_reader :capture_method, :setup_future_usage + # Controls when the funds will be captured from the customer's account. + attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. attr_reader :reference_prefix end - attr_reader :mandate_options, :setup_future_usage + # Attribute for field mandate_options + attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Shopeepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject - attr_reader :preferred_language, :setup_future_usage + # Preferred language of the SOFORT authorization page that the customer is redirected to. + attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Swish < Stripe::StripeObject - attr_reader :reference, :setup_future_usage + # A reference for this payment to be displayed in the Swish app. + attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Twint < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. attr_reader :mode end - attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + # Attribute for field filters + attr_reader :filters + # Attribute for field manual_entry + attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method attr_reader :collection_method end - attr_reader :financial_connections, :mandate_options, :preferred_settlement_speed, :setup_future_usage, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Attribute for field mandate_options + attr_reader :mandate_options + # Preferred transaction settlement speed + attr_reader :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage + # Bank account verification method. + attr_reader :verification_method end class WechatPay < Stripe::StripeObject - attr_reader :app_id, :client, :setup_future_usage + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_reader :app_id + # The client type that the end customer will pay from + attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_reader :setup_future_usage end class Zip < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). attr_reader :setup_future_usage end - attr_reader :acss_debit, :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :blik, :boleto, :card, :card_present, :cashapp, :customer_balance, :eps, :fpx, :giropay, :gopay, :grabpay, :id_bank_transfer, :ideal, :interac_present, :kakao_pay, :klarna, :konbini, :kr_card, :link, :mb_way, :mobilepay, :multibanco, :naver_pay, :oxxo, :p24, :payco, :paynow, :paypal, :payto, :pix, :promptpay, :qris, :rechnung, :revolut_pay, :samsung_pay, :sepa_debit, :shopeepay, :sofort, :swish, :twint, :us_bank_account, :wechat_pay, :zip + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field blik + attr_reader :blik + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_balance + attr_reader :customer_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field fpx + attr_reader :fpx + # Attribute for field giropay + attr_reader :giropay + # Attribute for field gopay + attr_reader :gopay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field interac_present + attr_reader :interac_present + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field konbini + attr_reader :konbini + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field mb_way + attr_reader :mb_way + # Attribute for field mobilepay + attr_reader :mobilepay + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field naver_pay + attr_reader :naver_pay + # Attribute for field oxxo + attr_reader :oxxo + # Attribute for field p24 + attr_reader :p24 + # Attribute for field payco + attr_reader :payco + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field pix + attr_reader :pix + # Attribute for field promptpay + attr_reader :promptpay + # Attribute for field qris + attr_reader :qris + # Attribute for field rechnung + attr_reader :rechnung + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field samsung_pay + attr_reader :samsung_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field shopeepay + attr_reader :shopeepay + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field twint + attr_reader :twint + # Attribute for field us_bank_account + attr_reader :us_bank_account + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class Processing < Stripe::StripeObject class Card < Stripe::StripeObject class CustomerNotification < Stripe::StripeObject - attr_reader :approval_requested, :completes_at + # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. + attr_reader :approval_requested + # If customer approval is required, they need to provide approval before this time. + attr_reader :completes_at end + # Attribute for field customer_notification attr_reader :customer_notification end - attr_reader :card, :type + # Attribute for field card + attr_reader :card + # Type of the payment method for which payment is in `processing` state, one of `card`. + attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # The account (if any) that the payment is attributed to for tax + # reporting, and where funds from the payment are transferred to after + # payment success. + attr_reader :destination + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + attr_accessor :created + # Only return PaymentIntents for the customer that this customer ID specifies. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + attr_accessor :allow_redirects + # Whether this feature is enabled. + attr_accessor :enabled + + def initialize(allow_redirects: nil, enabled: nil) + super + @allow_redirects = allow_redirects + @enabled = enabled + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(code: nil, setup_future_usage: nil) + super + @code = code + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Please pass in an address that is within your Stripe user account country + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + attr_accessor :phone + + def initialize(address: nil, phone: nil) + super + @address = address + @phone = phone + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @exemption_indicator = exemption_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + attr_accessor :three_d_secure + + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ) + super + @capture_method = capture_method + @cvc_token = cvc_token + @installments = installments + @mandate_options = mandate_options + @moto = moto + @network = network + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_partial_authorization = request_partial_authorization + @request_three_d_secure = request_three_d_secure + @require_cvc_recollection = require_cvc_recollection + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + @statement_details = statement_details + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + attr_accessor :requested_priority + + def initialize(requested_priority: nil) + super + @requested_priority = requested_priority + end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + attr_accessor :routing + + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ) + super + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization_support = request_incremental_authorization_support + @routing = routing + end + end + + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after = expires_after + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ) + super + @confirmation_number = confirmation_number + @expires_after_days = expires_after_days + @expires_at = expires_at + @product_description = product_description + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after_seconds = expires_after_seconds + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Rechnung < Stripe::RequestParams + end + + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(reference: nil, setup_future_usage: nil) + super + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Preferred transaction settlement speed + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @preferred_settlement_speed = preferred_settlement_speed + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @card_present = card_present + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + # The amount is capped at the total transaction amount and if no amount is set, + # the full amount is transferred. + # + # If you intend to collect a fee and you need a more robust reporting experience, using + # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) + # might be a better fit for your integration. + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. + attr_accessor :automatic_payment_methods + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + attr_accessor :confirm + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + attr_accessor :confirmation_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :mandate + # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :off_session + # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :on_behalf_of + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + # + # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + attr_accessor :radar_options + # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :return_url + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + attr_accessor :secret_key_confirmation + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a Transfer. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + attr_accessor :transfer_group + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + automatic_payment_methods: nil, + capture_method: nil, + confirm: nil, + confirmation_method: nil, + confirmation_token: nil, + currency: nil, + customer: nil, + description: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + secret_key_confirmation: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil, + use_stripe_sdk: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @automatic_payment_methods = automatic_payment_methods + @capture_method = capture_method + @confirm = confirm + @confirmation_method = confirmation_method + @confirmation_token = confirmation_token + @currency = currency + @customer = customer + @description = description + @error_on_requires_action = error_on_requires_action + @expand = expand + @mandate = mandate + @mandate_data = mandate_data + @metadata = metadata + @off_session = off_session + @on_behalf_of = on_behalf_of + @payment_details = payment_details + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @radar_options = radar_options + @receipt_email = receipt_email + @return_url = return_url + @secret_key_confirmation = secret_key_confirmation + @setup_future_usage = setup_future_usage + @shipping = shipping + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + @use_stripe_sdk = use_stripe_sdk + end + end + + class RetrieveParams < Stripe::RequestParams + # The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(client_secret: nil, expand: nil) + super + @client_secret = client_secret + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. + attr_accessor :type + + def initialize(online: nil, type: nil) + super + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(code: nil, setup_future_usage: nil) + super + @code = code + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Please pass in an address that is within your Stripe user account country + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + attr_accessor :phone + + def initialize(address: nil, phone: nil) + super + @address = address + @phone = phone + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @exemption_indicator = exemption_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + attr_accessor :three_d_secure + + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ) + super + @capture_method = capture_method + @cvc_token = cvc_token + @installments = installments + @mandate_options = mandate_options + @moto = moto + @network = network + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_partial_authorization = request_partial_authorization + @request_three_d_secure = request_three_d_secure + @require_cvc_recollection = require_cvc_recollection + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + @statement_details = statement_details + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + attr_accessor :requested_priority + + def initialize(requested_priority: nil) + super + @requested_priority = requested_priority + end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + attr_accessor :routing + + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ) + super + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization_support = request_incremental_authorization_support + @routing = routing + end + end + + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after = expires_after + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ) + super + @confirmation_number = confirmation_number + @expires_after_days = expires_after_days + @expires_at = expires_at + @product_description = product_description + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after_seconds = expires_after_seconds + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Rechnung < Stripe::RequestParams + end + + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(reference: nil, setup_future_usage: nil) + super + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Preferred transaction settlement speed + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @preferred_settlement_speed = preferred_settlement_speed + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @card_present = card_present + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # This hash contains details about the Mandate to create. + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # Attribute for param field payment_method + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + attr_accessor :payment_method_data + # Payment-method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_group + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + currency: nil, + customer: nil, + description: nil, + expand: nil, + mandate_data: nil, + metadata: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @capture_method = capture_method + @currency = currency + @customer = customer + @description = description + @expand = expand + @mandate_data = mandate_data + @metadata = metadata + @payment_details = payment_details + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @receipt_email = receipt_email + @setup_future_usage = setup_future_usage + @shipping = shipping + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class ApplyCustomerBalanceParams < Stripe::RequestParams + # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. + # + # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. + # + # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amount: nil, currency: nil, expand: nil) + super + @amount = amount + @currency = currency + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(cancellation_reason: nil, expand: nil) + super + @cancellation_reason = cancellation_reason + @expand = expand + end + end + + class CaptureParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. + attr_accessor :amount_to_capture + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + attr_accessor :final_capture + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a transfer after the payment + # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + + def initialize( + amount_to_capture: nil, + application_fee_amount: nil, + async_workflows: nil, + expand: nil, + final_capture: nil, + metadata: nil, + payment_details: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ) + super + @amount_to_capture = amount_to_capture + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @expand = expand + @final_capture = final_capture + @metadata = metadata + @payment_details = payment_details + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + end + end + + class ConfirmParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(code: nil, setup_future_usage: nil) + super + @code = code + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Please pass in an address that is within your Stripe user account country + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + attr_accessor :phone + + def initialize(address: nil, phone: nil) + super + @address = address + @phone = phone + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @exemption_indicator = exemption_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + attr_accessor :three_d_secure + + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ) + super + @capture_method = capture_method + @cvc_token = cvc_token + @installments = installments + @mandate_options = mandate_options + @moto = moto + @network = network + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_partial_authorization = request_partial_authorization + @request_three_d_secure = request_three_d_secure + @require_cvc_recollection = require_cvc_recollection + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + @statement_details = statement_details + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + attr_accessor :requested_priority + + def initialize(requested_priority: nil) + super + @requested_priority = requested_priority + end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + attr_accessor :routing + + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ) + super + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization_support = request_incremental_authorization_support + @routing = routing + end + end + + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after = expires_after + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ) + super + @confirmation_number = confirmation_number + @expires_after_days = expires_after_days + @expires_at = expires_at + @product_description = product_description + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after_seconds = expires_after_seconds + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Rechnung < Stripe::RequestParams + end + + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(reference: nil, setup_future_usage: nil) + super + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Preferred transaction settlement speed + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @preferred_settlement_speed = preferred_settlement_speed + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @card_present = card_present + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the mandate that's used for this payment. + attr_accessor :mandate + # Attribute for param field mandate_data + attr_accessor :mandate_data + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + attr_accessor :off_session + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + attr_accessor :radar_options + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + attr_accessor :return_url + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + attr_accessor :shipping + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + confirmation_token: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + off_session: nil, + payment_details: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil, + use_stripe_sdk: nil + ) + super + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @capture_method = capture_method + @confirmation_token = confirmation_token + @error_on_requires_action = error_on_requires_action + @expand = expand + @mandate = mandate + @mandate_data = mandate_data + @off_session = off_session + @payment_details = payment_details + @payment_method = payment_method + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @radar_options = radar_options + @receipt_email = receipt_email + @return_url = return_url + @setup_future_usage = setup_future_usage + @shipping = shipping + @use_stripe_sdk = use_stripe_sdk + end + end + + class DecrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + transfer_data: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @description = description + @expand = expand + @metadata = metadata + @transfer_data = transfer_data + end + end + + class IncrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + + def initialize(request_partial_authorization: nil) + super + @request_partial_authorization = request_partial_authorization + end + end + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + + def initialize(card: nil) + super + @card = card + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Payment method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + attr_accessor :statement_descriptor + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + payment_method_options: nil, + statement_descriptor: nil, + transfer_data: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @description = description + @expand = expand + @metadata = metadata + @payment_method_options = payment_method_options + @statement_descriptor = statement_descriptor + @transfer_data = transfer_data + end + end + + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amounts: nil, descriptor_code: nil, expand: nil) + super + @amounts = amounts + @descriptor_code = descriptor_code + @expand = expand + end + end + + class TriggerActionParams < Stripe::RequestParams + class ScanQrCode < Stripe::RequestParams + # Whether the QR Code scan's payment should succeed or fail. + attr_accessor :result + + def initialize(result: nil) + super + @result = result + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # True to simulate success, false to simulate failure. + attr_accessor :scan_qr_code + # The type of action to be simulated. + attr_accessor :type + + def initialize(expand: nil, scan_qr_code: nil, type: nil) + super + @expand = expand + @scan_qr_code = scan_qr_code + @type = type + end end # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). attr_reader :amount @@ -941,8 +13546,8 @@ def self.increment_authorization(intent, params = {}, opts = {}) end # Returns a list of PaymentIntents. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_intents", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_intents", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/payment_link.rb b/lib/stripe/resources/payment_link.rb index b01ba8e39..5565ae88d 100644 --- a/lib/stripe/resources/payment_link.rb +++ b/lib/stripe/resources/payment_link.rb @@ -19,134 +19,1560 @@ def self.object_name class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # The custom message that is displayed to the customer after the purchase is complete. attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the purchase is complete. attr_reader :url end - attr_reader :hosted_confirmation, :redirect, :type + # Attribute for field hosted_confirmation + attr_reader :hosted_confirmation + # Attribute for field redirect + attr_reader :redirect + # The specified behavior after the purchase is complete. + attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability + # If `true`, tax will be calculated automatically using the customer's location. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. attr_reader :position end - attr_reader :payment_method_reuse_agreement, :promotions, :terms_of_service + # Settings related to the payment method reuse text shown in the Checkout UI. + attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. + attr_reader :promotions + # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. + attr_reader :terms_of_service end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject - attr_reader :label, :value + # The label for the option, displayed to the customer. Up to 100 characters. + attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_reader :value end + # The options available for the customer to select. Up to 200 options allowed. attr_reader :options end class Label < Stripe::StripeObject - attr_reader :custom, :type + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_reader :custom + # The type of the label. + attr_reader :type end class Numeric < Stripe::StripeObject - attr_reader :maximum_length, :minimum_length + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length end class Text < Stripe::StripeObject - attr_reader :maximum_length, :minimum_length + # The maximum character length constraint for the customer's input. + attr_reader :maximum_length + # The minimum character length requirement for the customer's input. + attr_reader :minimum_length end - attr_reader :dropdown, :key, :label, :numeric, :optional, :text, :type + # Attribute for field dropdown + attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_reader :key + # Attribute for field label + attr_reader :label + # Attribute for field numeric + attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_reader :optional + # Attribute for field text + attr_reader :text + # The type of the field. + attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. attr_reader :message end - attr_reader :after_submit, :shipping_address, :submit, :terms_of_service_acceptance + # Custom text that should be displayed after the payment confirmation button. + attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_reader :terms_of_service_acceptance end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. attr_reader :amount_tax_display end - attr_reader :account_tax_ids, :custom_fields, :description, :footer, :issuer, :metadata, :rendering_options + # The account tax IDs associated with the invoice. + attr_reader :account_tax_ids + # A list of up to 4 custom fields to be displayed on the invoice. + attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Footer to be displayed on the invoice. + attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Options for invoice PDF rendering. + attr_reader :rendering_options end - attr_reader :enabled, :invoice_data + # Enable creating an invoice on successful payment. + attr_reader :enabled + # Configuration for the invoice. Default invoice values will be used if unspecified. + attr_reader :invoice_data end class PaymentIntentData < Stripe::StripeObject - attr_reader :capture_method, :description, :metadata, :setup_future_usage, :statement_descriptor, :statement_descriptor_suffix, :transfer_group + # Indicates when the funds will be captured from the customer's account. + attr_reader :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. + attr_reader :metadata + # Indicates that you intend to make future payments with the payment method collected during checkout. + attr_reader :setup_future_usage + # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. + attr_reader :statement_descriptor + # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. + attr_reader :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_reader :transfer_group end class PhoneNumberCollection < Stripe::StripeObject + # If `true`, a phone number will be collected during checkout. attr_reader :enabled end class Restrictions < Stripe::StripeObject class CompletedSessions < Stripe::StripeObject - attr_reader :count, :limit + # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. + attr_reader :count + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + attr_reader :limit end + # Attribute for field completed_sessions attr_reader :completed_sessions end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. attr_reader :allowed_countries end class ShippingOption < Stripe::StripeObject - attr_reader :shipping_amount, :shipping_rate + # A non-negative integer in cents representing how much to charge. + attr_reader :shipping_amount + # The ID of the Shipping Rate to use for this shipping option. + attr_reader :shipping_rate end class SubscriptionData < Stripe::StripeObject class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end + # Attribute for field issuer attr_reader :issuer end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. attr_reader :end_behavior end - attr_reader :description, :invoice_settings, :metadata, :trial_period_days, :trial_settings + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Attribute for field invoice_settings + attr_reader :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. + attr_reader :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_reader :trial_period_days + # Settings related to subscription trials. + attr_reader :trial_settings end class TaxIdCollection < Stripe::StripeObject - attr_reader :enabled, :required + # Indicates whether tax ID collection is enabled for the session. + attr_reader :enabled + # Attribute for field required + attr_reader :required end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount + # The connected account receiving the transfer. + attr_reader :destination + end + + class ListParams < Stripe::RequestParams + # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(active: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @active = active + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + attr_accessor :custom_message + + def initialize(custom_message: nil) + super + @custom_message = custom_message + end + end + + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + attr_accessor :url + + def initialize(url: nil) + super + @url = url + end + end + # Configuration when `type=hosted_confirmation`. + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + attr_accessor :type + + def initialize(hosted_confirmation: nil, redirect: nil, type: nil) + super + @hosted_confirmation = hosted_confirmation + @redirect = redirect + @type = type + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + attr_accessor :position + + def initialize(position: nil) + super + @position = position + end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + attr_accessor :terms_of_service + + def initialize(payment_method_reuse_agreement: nil, promotions: nil, terms_of_service: nil) + super + @payment_method_reuse_agreement = payment_method_reuse_agreement + @promotions = promotions + @terms_of_service = terms_of_service + end + end + + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_accessor :value + + def initialize(label: nil, value: nil) + super + @label = label + @value = value + end + end + # The options available for the customer to select. Up to 200 options allowed. + attr_accessor :options + + def initialize(options: nil) + super + @options = options + end + end + + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_accessor :custom + # The type of the label. + attr_accessor :type + + def initialize(custom: nil, type: nil) + super + @custom = custom + @type = type + end + end + + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + # Configuration for `type=dropdown` fields. + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_accessor :key + # The label for the field, displayed to the customer. + attr_accessor :label + # Configuration for `type=numeric` fields. + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_accessor :optional + # Configuration for `type=text` fields. + attr_accessor :text + # The type of the field. + attr_accessor :type + + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ) + super + @dropdown = dropdown + @key = key + @label = label + @numeric = numeric + @optional = optional + @text = text + @type = type + end + end + + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + # Custom text that should be displayed after the payment confirmation button. + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_accessor :terms_of_service_acceptance + + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ) + super + @after_submit = after_submit + @shipping_address = shipping_address + @submit = submit + @terms_of_service_acceptance = terms_of_service_acceptance + end + end + + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + + def initialize(amount_tax_display: nil) + super + @amount_tax_display = amount_tax_display + end + end + # The account tax IDs associated with the invoice. + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ) + super + @account_tax_ids = account_tax_ids + @custom_fields = custom_fields + @description = description + @footer = footer + @issuer = issuer + @metadata = metadata + @rendering_options = rendering_options + end + end + # Whether the feature is enabled + attr_accessor :enabled + # Invoice PDF configuration. + attr_accessor :invoice_data + + def initialize(enabled: nil, invoice_data: nil) + super + @enabled = enabled + @invoice_data = invoice_data + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + attr_accessor :adjustable_quantity + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + attr_accessor :price + # The quantity of the line item being purchased. + attr_accessor :quantity + + def initialize(adjustable_quantity: nil, price: nil, quantity: nil) + super + @adjustable_quantity = adjustable_quantity + @price = price + @quantity = quantity + end + end + + class PaymentIntentData < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + # + # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + attr_accessor :setup_future_usage + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + capture_method: nil, + description: nil, + metadata: nil, + setup_future_usage: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ) + super + @capture_method = capture_method + @description = description + @metadata = metadata + @setup_future_usage = setup_future_usage + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_group = transfer_group + end + end + + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + attr_accessor :limit + + def initialize(limit: nil) + super + @limit = limit + end + end + # Configuration for the `completed_sessions` restriction type. + attr_accessor :completed_sessions + + def initialize(completed_sessions: nil) + super + @completed_sessions = completed_sessions + end + end + + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + attr_accessor :allowed_countries + + def initialize(allowed_countries: nil) + super + @allowed_countries = allowed_countries + end + end + + class ShippingOption < Stripe::RequestParams + # The ID of the Shipping Rate to use for this shipping option. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(issuer: nil) + super + @issuer = issuer + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + description: nil, + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @description = description + @invoice_settings = invoice_settings + @metadata = metadata + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + attr_accessor :required + + def initialize(enabled: nil, required: nil) + super + @enabled = enabled + @required = required + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # Behavior after the purchase is complete. + attr_accessor :after_completion + # Enables user redeemable promotion codes. + attr_accessor :allow_promotion_codes + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :application_fee_percent + # Configuration for automatic tax collection. + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + attr_accessor :billing_address_collection + # Configure fields to gather active consent from customers. + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + attr_accessor :metadata + # The account on behalf of which to charge. + attr_accessor :on_behalf_of + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). + attr_accessor :payment_method_types + # Controls phone number collection settings during checkout. + # + # We recommend that you review your privacy policy and check with your legal contacts. + attr_accessor :phone_number_collection + # Settings that restrict the usage of a payment link. + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + attr_accessor :shipping_address_collection + # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + attr_accessor :shipping_options + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + attr_accessor :tax_id_collection + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + attr_accessor :transfer_data + + def initialize( + after_completion: nil, + allow_promotion_codes: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_address_collection: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + on_behalf_of: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + phone_number_collection: nil, + restrictions: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil, + transfer_data: nil + ) + super + @after_completion = after_completion + @allow_promotion_codes = allow_promotion_codes + @application_fee_amount = application_fee_amount + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_address_collection = billing_address_collection + @consent_collection = consent_collection + @currency = currency + @custom_fields = custom_fields + @custom_text = custom_text + @customer_creation = customer_creation + @expand = expand + @inactive_message = inactive_message + @invoice_creation = invoice_creation + @line_items = line_items + @metadata = metadata + @on_behalf_of = on_behalf_of + @payment_intent_data = payment_intent_data + @payment_method_collection = payment_method_collection + @payment_method_types = payment_method_types + @phone_number_collection = phone_number_collection + @restrictions = restrictions + @shipping_address_collection = shipping_address_collection + @shipping_options = shipping_options + @submit_type = submit_type + @subscription_data = subscription_data + @tax_id_collection = tax_id_collection + @transfer_data = transfer_data + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + attr_accessor :custom_message + + def initialize(custom_message: nil) + super + @custom_message = custom_message + end + end + + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + attr_accessor :url + + def initialize(url: nil) + super + @url = url + end + end + # Configuration when `type=hosted_confirmation`. + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + attr_accessor :type + + def initialize(hosted_confirmation: nil, redirect: nil, type: nil) + super + @hosted_confirmation = hosted_confirmation + @redirect = redirect + @type = type + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_accessor :value + + def initialize(label: nil, value: nil) + super + @label = label + @value = value + end + end + # The options available for the customer to select. Up to 200 options allowed. + attr_accessor :options + + def initialize(options: nil) + super + @options = options + end + end + + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_accessor :custom + # The type of the label. + attr_accessor :type + + def initialize(custom: nil, type: nil) + super + @custom = custom + @type = type + end + end + + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + # Configuration for `type=dropdown` fields. + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_accessor :key + # The label for the field, displayed to the customer. + attr_accessor :label + # Configuration for `type=numeric` fields. + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_accessor :optional + # Configuration for `type=text` fields. + attr_accessor :text + # The type of the field. + attr_accessor :type + + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ) + super + @dropdown = dropdown + @key = key + @label = label + @numeric = numeric + @optional = optional + @text = text + @type = type + end + end + + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + # Custom text that should be displayed after the payment confirmation button. + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_accessor :terms_of_service_acceptance + + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ) + super + @after_submit = after_submit + @shipping_address = shipping_address + @submit = submit + @terms_of_service_acceptance = terms_of_service_acceptance + end + end + + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + + def initialize(amount_tax_display: nil) + super + @amount_tax_display = amount_tax_display + end + end + # The account tax IDs associated with the invoice. + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ) + super + @account_tax_ids = account_tax_ids + @custom_fields = custom_fields + @description = description + @footer = footer + @issuer = issuer + @metadata = metadata + @rendering_options = rendering_options + end + end + # Whether the feature is enabled + attr_accessor :enabled + # Invoice PDF configuration. + attr_accessor :invoice_data + + def initialize(enabled: nil, invoice_data: nil) + super + @enabled = enabled + @invoice_data = invoice_data + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + attr_accessor :adjustable_quantity + # The ID of an existing line item on the payment link. + attr_accessor :id + # The quantity of the line item being purchased. + attr_accessor :quantity + + def initialize(adjustable_quantity: nil, id: nil, quantity: nil) + super + @adjustable_quantity = adjustable_quantity + @id = id + @quantity = quantity + end + end + + class PaymentIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + description: nil, + metadata: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ) + super + @description = description + @metadata = metadata + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_group = transfer_group + end + end + + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + attr_accessor :limit + + def initialize(limit: nil) + super + @limit = limit + end + end + # Configuration for the `completed_sessions` restriction type. + attr_accessor :completed_sessions + + def initialize(completed_sessions: nil) + super + @completed_sessions = completed_sessions + end + end + + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + attr_accessor :allowed_countries + + def initialize(allowed_countries: nil) + super + @allowed_countries = allowed_countries + end + end + + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(issuer: nil) + super + @issuer = issuer + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @invoice_settings = invoice_settings + @metadata = metadata + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + attr_accessor :required + + def initialize(enabled: nil, required: nil) + super + @enabled = enabled + @required = required + end + end + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + attr_accessor :active + # Behavior after the purchase is complete. + attr_accessor :after_completion + # Enables user redeemable promotion codes. + attr_accessor :allow_promotion_codes + # Configuration for automatic tax collection. + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + attr_accessor :billing_address_collection + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + attr_accessor :metadata + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Settings that restrict the usage of a payment link. + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + attr_accessor :shipping_address_collection + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + attr_accessor :tax_id_collection + + def initialize( + active: nil, + after_completion: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + restrictions: nil, + shipping_address_collection: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil + ) + super + @active = active + @after_completion = after_completion + @allow_promotion_codes = allow_promotion_codes + @automatic_tax = automatic_tax + @billing_address_collection = billing_address_collection + @custom_fields = custom_fields + @custom_text = custom_text + @customer_creation = customer_creation + @expand = expand + @inactive_message = inactive_message + @invoice_creation = invoice_creation + @line_items = line_items + @metadata = metadata + @payment_intent_data = payment_intent_data + @payment_method_collection = payment_method_collection + @payment_method_types = payment_method_types + @restrictions = restrictions + @shipping_address_collection = shipping_address_collection + @submit_type = submit_type + @subscription_data = subscription_data + @tax_id_collection = tax_id_collection + end + end + + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end end # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. attr_reader :active @@ -221,8 +1647,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your payment links. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_links", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_links", params: params, opts: opts) end # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. diff --git a/lib/stripe/resources/payment_method.rb b/lib/stripe/resources/payment_method.rb index 4f47f1a86..af59d3692 100644 --- a/lib/stripe/resources/payment_method.rb +++ b/lib/stripe/resources/payment_method.rb @@ -18,7 +18,16 @@ def self.object_name end class AcssDebit < Stripe::StripeObject - attr_reader :bank_name, :fingerprint, :institution_number, :last4, :transit_number + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Institution number of the bank account. + attr_reader :institution_number + # Last four digits of the bank account number. + attr_reader :last4 + # Transit number of the bank account. + attr_reader :transit_number end class Affirm < Stripe::StripeObject; end @@ -28,59 +37,177 @@ class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4 + # Six-digit number identifying bank and branch associated with this bank account. + attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 end class BacsDebit < Stripe::StripeObject - attr_reader :fingerprint, :last4, :sort_code + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) + attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # Billing address. + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name + # Billing phone number (including extension). + attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class GeneratedFrom < Stripe::StripeObject class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Receipt < Stripe::StripeObject - attr_reader :account_type, :application_cryptogram, :application_preferred_name, :authorization_code, :authorization_response_code, :cardholder_verification_method, :dedicated_file_name, :terminal_verification_results, :transaction_status_information + # The type of account being debited or credited + attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. + attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. + attr_reader :application_preferred_name + # Identifier for this transaction. + attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. + attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. + attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. + attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. + attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. + attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :amount_authorized, :brand, :brand_product, :capture_before, :cardholder_name, :country, :description, :emv_auth_data, :exp_month, :exp_year, :fingerprint, :funding, :generated_card, :iin, :incremental_authorization_supported, :issuer, :last4, :network, :network_transaction_id, :offline, :overcapture_supported, :preferred_locales, :read_method, :receipt, :wallet + # The authorized amount + attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. + attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Authorization response cryptogram. + attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). + attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. + attr_reader :network_transaction_id + # Details about payments collected offline. + attr_reader :offline + # Defines whether the authorized amount can be over-captured or not + attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. + attr_reader :receipt + # Attribute for field wallet + attr_reader :wallet end - attr_reader :card_present, :type + # Attribute for field card_present + attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. + attr_reader :type end - attr_reader :charge, :payment_method_details, :setup_attempt + # The charge that created this object. + attr_reader :charge + # Transaction-specific details of the payment method used in the payment. + attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. + attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. attr_reader :supported end @@ -92,59 +219,218 @@ class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class ShippingAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :billing_address, :email, :name, :shipping_address + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :shipping_address end - attr_reader :amex_express_checkout, :apple_pay, :dynamic_last4, :google_pay, :link, :masterpass, :samsung_pay, :type, :visa_checkout + # Attribute for field amex_express_checkout + attr_reader :amex_express_checkout + # Attribute for field apple_pay + attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. + attr_reader :dynamic_last4 + # Attribute for field google_pay + attr_reader :google_pay + # Attribute for field link + attr_reader :link + # Attribute for field masterpass + attr_reader :masterpass + # Attribute for field samsung_pay + attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type + # Attribute for field visa_checkout + attr_reader :visa_checkout end - attr_reader :brand, :checks, :country, :description, :display_brand, :exp_month, :exp_year, :fingerprint, :funding, :generated_from, :iin, :issuer, :last4, :networks, :regulated_status, :three_d_secure_usage, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Checks on Card address and CVC if provided. + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. + attr_reader :display_brand + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Details of the original PaymentMethod that created this object. + attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Status of a card based on the card issuer. + attr_reader :regulated_status + # Contains details on how this Card may be used for 3D Secure authentication. + attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. attr_reader :type end - attr_reader :brand, :brand_product, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :offline, :preferred_locales, :read_method, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. + attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # Details about payment methods collected offline. + attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method + # Attribute for field wallet + attr_reader :wallet end class Cashapp < Stripe::StripeObject - attr_reader :buyer_id, :cashtag + # A unique and immutable identifier assigned by Cash App to every buyer. + attr_reader :buyer_id + # A public identifier for buyers using Cash App. + attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. attr_reader :bank end class Fpx < Stripe::StripeObject - attr_reader :account_holder_type, :bank + # Account holder type, if provided. Can be one of `individual` or `company`. + attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. + attr_reader :bank end class Giropay < Stripe::StripeObject; end @@ -152,37 +438,91 @@ class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :bank, :bank_code, :bank_name, :display_name + # Attribute for field bank + attr_reader :bank + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field display_name + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. + attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :available, :preferred + # All available networks for the card. + attr_reader :available + # The preferred network for the card. + attr_reader :preferred end - attr_reader :brand, :cardholder_name, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :networks, :preferred_locales, :read_method + # Card brand. Can be `interac`, `mastercard` or `visa`. + attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. + attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Contains information about card networks that can be used to process the payment. + attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. + attr_reader :preferred_locales + # How card details were read in this transaction. + attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # The customer's date of birth, if provided. attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject - attr_reader :brand, :last4 + # The local credit or debit card brand. + attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. + attr_reader :last4 end class Link < Stripe::StripeObject - attr_reader :email, :persistent_token + # Account owner's email address. + attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_reader :persistent_token end class MbWay < Stripe::StripeObject; end @@ -190,12 +530,14 @@ class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. attr_reader :bank end @@ -203,11 +545,25 @@ class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject - attr_reader :fingerprint, :payer_email, :payer_id, :verified_email + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. + attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. + attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email end class Payto < Stripe::StripeObject - attr_reader :bsb_number, :last4, :pay_id + # Bank-State-Branch number of the bank account. + attr_reader :bsb_number + # Last four digits of the bank account number. + attr_reader :last4 + # The PayID alias for the bank account. + attr_reader :pay_id end class Pix < Stripe::StripeObject; end @@ -215,13 +571,20 @@ class Promptpay < Stripe::StripeObject; end class Qris < Stripe::StripeObject; end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. attr_reader :session end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end + # Attribute for field dob attr_reader :dob end @@ -230,14 +593,29 @@ class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject - attr_reader :charge, :setup_attempt + # The ID of the Charge that generated this PaymentMethod, if any. + attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. + attr_reader :setup_attempt end - attr_reader :bank_code, :branch_code, :country, :fingerprint, :generated_from, :last4 + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Branch code of bank associated with the bank account. + attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. + attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. + attr_reader :generated_from + # Last four characters of the IBAN. + attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. attr_reader :country end @@ -246,20 +624,946 @@ class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject - attr_reader :preferred, :supported + # The preferred network. + attr_reader :preferred + # All supported networks. + attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject - attr_reader :network_code, :reason + # The ACH network code that resulted in this block. + attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked + attr_reader :reason end + # Attribute for field blocked attr_reader :blocked end - attr_reader :account_holder_type, :account_number, :account_type, :bank_name, :financial_connections_account, :fingerprint, :last4, :networks, :routing_number, :status_details + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account number of the bank account. + attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # The name of the bank. + attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. + attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # Contains information about US bank account networks that can be used. + attr_reader :networks + # Routing number of the bank account. + attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. + attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end + + class ListParams < Stripe::RequestParams + # The ID of the customer whose PaymentMethods will be retrieved. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + attr_accessor :type + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + attr_accessor :preferred + + def initialize(preferred: nil) + super + @preferred = preferred + end + end + # The card's CVC. It is highly recommended to always include this value. + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + attr_accessor :networks + # The card number, as a string without any separators. + attr_accessor :number + # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + attr_accessor :token + + def initialize( + cvc: nil, + exp_month: nil, + exp_year: nil, + networks: nil, + number: nil, + token: nil + ) + super + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @networks = networks + @number = number + @token = token + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. + attr_accessor :card + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # The `Customer` to whom the original PaymentMethod is attached. + attr_accessor :customer + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # The PaymentMethod to share. + attr_accessor :payment_method + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + payment_method: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @card = card + @cashapp = cashapp + @customer = customer + @customer_balance = customer_balance + @eps = eps + @expand = expand + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @payment_method = payment_method + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + attr_accessor :preferred + + def initialize(preferred: nil) + super + @preferred = preferred + end + end + # Two-digit number representing the card's expiration month. + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + attr_accessor :networks + + def initialize(exp_month: nil, exp_year: nil, networks: nil) + super + @exp_month = exp_month + @exp_year = exp_year + @networks = networks + end + end + + class Link < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class UsBankAccount < Stripe::RequestParams + # Bank account holder type. + attr_accessor :account_holder_type + # Bank account type. + attr_accessor :account_type + + def initialize(account_holder_type: nil, account_type: nil) + super + @account_holder_type = account_holder_type + @account_type = account_type + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `card` PaymentMethod, this hash contains the user's card details. + attr_accessor :card + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + + def initialize( + allow_redisplay: nil, + billing_details: nil, + card: nil, + expand: nil, + link: nil, + metadata: nil, + naver_pay: nil, + payto: nil, + us_bank_account: nil + ) + super + @allow_redisplay = allow_redisplay + @billing_details = billing_details + @card = card + @expand = expand + @link = link + @metadata = metadata + @naver_pay = naver_pay + @payto = payto + @us_bank_account = us_bank_account + end + end + + class AttachParams < Stripe::RequestParams + # The ID of the customer to which to attach the PaymentMethod. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(customer: nil, expand: nil) + super + @customer = customer + @expand = expand + end + end + + class DetachParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Attribute for field acss_debit attr_reader :acss_debit # Attribute for field affirm @@ -457,8 +1761,8 @@ def self.detach(payment_method, params = {}, opts = {}) end # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payment_methods", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payment_methods", params: params, opts: opts) end # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. diff --git a/lib/stripe/resources/payment_method_configuration.rb b/lib/stripe/resources/payment_method_configuration.rb index fece78419..d466c2955 100644 --- a/lib/stripe/resources/payment_method_configuration.rb +++ b/lib/stripe/resources/payment_method_configuration.rb @@ -28,324 +28,2930 @@ def self.object_name class AcssDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Affirm < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class AfterpayClearpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Alipay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Alma < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class AmazonPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class ApplePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class AuBecsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class BacsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Bancontact < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Blik < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Boleto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Card < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class CartesBancaires < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Cashapp < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class CustomerBalance < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Eps < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Fpx < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Giropay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class GooglePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Gopay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Grabpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class IdBankTransfer < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Ideal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Jcb < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Klarna < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Konbini < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Link < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Mobilepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Multibanco < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Oxxo < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class P24 < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Paynow < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Paypal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Payto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Promptpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Qris < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class RevolutPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class SepaDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Shopeepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Sofort < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Swish < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Twint < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class UsBankAccount < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class WechatPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value end - attr_reader :available, :display_preference + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference end class Zip < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject - attr_reader :overridable, :preference, :value + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. + attr_reader :overridable + # The account's display preference. + attr_reader :preference + # The effective display preference value. + attr_reader :value + end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. + attr_reader :available + # Attribute for field display_preference + attr_reader :display_preference + end + + class ListParams < Stripe::RequestParams + # The Connect application to filter by. + attr_accessor :application + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + application: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @application = application + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + attr_accessor :acss_debit + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + attr_accessor :eps + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + attr_accessor :multibanco + # Configuration name. + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + attr_accessor :p24 + # Configuration's parent configuration. Specify to create a child configuration. + attr_accessor :parent + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + parent: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @apple_pay = apple_pay + @apple_pay_later = apple_pay_later + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @cartes_bancaires = cartes_bancaires + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @expand = expand + @fpx = fpx + @giropay = giropay + @google_pay = google_pay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @jcb = jcb + @klarna = klarna + @konbini = konbini + @link = link + @mobilepay = mobilepay + @multibanco = multibanco + @name = name + @oxxo = oxxo + @p24 = p24 + @parent = parent + @paynow = paynow + @paypal = paypal + @payto = payto + @promptpay = promptpay + @qris = qris + @revolut_pay = revolut_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + attr_accessor :acss_debit + # Whether the configuration can be used for new payments. + attr_accessor :active + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + attr_accessor :eps + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + attr_accessor :multibanco + # Configuration name. + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + attr_accessor :p24 + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + attr_accessor :zip + + def initialize( + acss_debit: nil, + active: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @active = active + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @apple_pay = apple_pay + @apple_pay_later = apple_pay_later + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @cartes_bancaires = cartes_bancaires + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @expand = expand + @fpx = fpx + @giropay = giropay + @google_pay = google_pay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @jcb = jcb + @klarna = klarna + @konbini = konbini + @link = link + @mobilepay = mobilepay + @multibanco = multibanco + @name = name + @oxxo = oxxo + @p24 = p24 + @paynow = paynow + @paypal = paypal + @payto = payto + @promptpay = promptpay + @qris = qris + @revolut_pay = revolut_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip end - attr_reader :available, :display_preference end # Attribute for field acss_debit attr_reader :acss_debit @@ -467,11 +3073,11 @@ def self.create(params = {}, opts = {}) end # List payment method configurations - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_method_configurations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/payment_method_domain.rb b/lib/stripe/resources/payment_method_domain.rb index 5e16e18fd..24ecec316 100644 --- a/lib/stripe/resources/payment_method_domain.rb +++ b/lib/stripe/resources/payment_method_domain.rb @@ -18,37 +18,138 @@ def self.object_name class AmazonPay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class ApplePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class GooglePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class Link < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details end class Paypal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. attr_reader :error_message end - attr_reader :status, :status_details + # The status of the payment method on the domain. + attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. + attr_reader :status_details + end + + class ListParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + attr_accessor :enabled + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + domain_name: nil, + enabled: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @domain_name = domain_name + @enabled = enabled + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(domain_name: nil, enabled: nil, expand: nil) + super + @domain_name = domain_name + @enabled = enabled + @expand = expand + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(enabled: nil, expand: nil) + super + @enabled = enabled + @expand = expand + end + end + + class ValidateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Indicates the status of a specific payment method on a payment method domain. attr_reader :amazon_pay @@ -84,11 +185,11 @@ def self.create(params = {}, opts = {}) end # Lists the details of existing payment method domains. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/payment_method_domains", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/payment_record.rb b/lib/stripe/resources/payment_record.rb index 6c7ec4d26..a48fb6059 100644 --- a/lib/stripe/resources/payment_record.rb +++ b/lib/stripe/resources/payment_record.rb @@ -13,44 +13,595 @@ def self.object_name end class AmountCanceled < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountFailed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountGuaranteed < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class AmountRequested < Stripe::StripeObject - attr_reader :currency, :value + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_reader :value end class CustomerDetails < Stripe::StripeObject - attr_reader :customer, :email, :name, :phone + # ID of the Stripe Customer associated with this payment. + attr_reader :customer + # The customer's email address. + attr_reader :email + # The customer's name. + attr_reader :name + # The customer's phone number. + attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone + # A representation of a physical address. + attr_reader :address + # The billing email associated with the method of payment. + attr_reader :email + # The billing name associated with the method of payment. + attr_reader :name + # The billing phone number associated with the method of payment. + attr_reader :phone end class Custom < Stripe::StripeObject - attr_reader :display_name, :type + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_reader :display_name + # The custom payment method type associated with this payment. + attr_reader :type end - attr_reader :billing_details, :custom, :payment_method, :type + # The billing details associated with the method of payment. + attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. + attr_reader :payment_method + # The type of Payment Method used for this payment attempt. + attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + # A representation of a physical address. + attr_reader :address + # The shipping recipient's name. + attr_reader :name + # The shipping recipient's phone number. + attr_reader :phone + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReportPaymentAttemptParams < Stripe::RequestParams + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + attr_accessor :failed_at + + def initialize(failed_at: nil) + super + @failed_at = failed_at + end + end + + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + attr_accessor :guaranteed_at + + def initialize(guaranteed_at: nil) + super + @guaranteed_at = guaranteed_at + end + end + + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address associated with the method of payment. + attr_accessor :address + # The billing email associated with the method of payment. + attr_accessor :email + # The billing name associated with the method of payment. + attr_accessor :name + # The billing phone number associated with the method of payment. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_accessor :display_name + # The custom payment method type associated with this payment. + attr_accessor :type + + def initialize(display_name: nil, type: nil) + super + @display_name = display_name + @type = type + end + end + # The billing details associated with the method of payment. + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + attr_accessor :type + + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil) + super + @billing_details = billing_details + @custom = custom + @payment_method = payment_method + @type = type + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The physical shipping address. + attr_accessor :address + # The shipping recipient's name. + attr_accessor :name + # The shipping recipient's phone number. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the payment attempt failure. + attr_accessor :failed + # Information about the payment attempt guarantee. + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The outcome of the reported payment. + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + attr_accessor :payment_method_details + # Shipping information for this payment. + attr_accessor :shipping_details + + def initialize( + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + shipping_details: nil + ) + super + @description = description + @expand = expand + @failed = failed + @guaranteed = guaranteed + @initiated_at = initiated_at + @metadata = metadata + @outcome = outcome + @payment_method_details = payment_method_details + @shipping_details = shipping_details + end + end + + class ReportPaymentAttemptCanceledParams < Stripe::RequestParams + # When the reported payment was canceled. Measured in seconds since the Unix epoch. + attr_accessor :canceled_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field metadata + attr_accessor :metadata + + def initialize(canceled_at: nil, expand: nil, metadata: nil) + super + @canceled_at = canceled_at + @expand = expand + @metadata = metadata + end + end + + class ReportPaymentAttemptFailedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # When the reported payment failed. Measured in seconds since the Unix epoch. + attr_accessor :failed_at + # Attribute for param field metadata + attr_accessor :metadata + + def initialize(expand: nil, failed_at: nil, metadata: nil) + super + @expand = expand + @failed_at = failed_at + @metadata = metadata + end + end + + class ReportPaymentAttemptGuaranteedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + attr_accessor :guaranteed_at + # Attribute for param field metadata + attr_accessor :metadata + + def initialize(expand: nil, guaranteed_at: nil, metadata: nil) + super + @expand = expand + @guaranteed_at = guaranteed_at + @metadata = metadata + end + end + + class ReportPaymentParams < Stripe::RequestParams + class AmountRequested < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_accessor :value + + def initialize(currency: nil, value: nil) + super + @currency = currency + @value = value + end + end + + class CustomerDetails < Stripe::RequestParams + # The customer who made the payment. + attr_accessor :customer + # The customer's phone number. + attr_accessor :email + # The customer's name. + attr_accessor :name + # The customer's phone number. + attr_accessor :phone + + def initialize(customer: nil, email: nil, name: nil, phone: nil) + super + @customer = customer + @email = email + @name = name + @phone = phone + end + end + + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + attr_accessor :failed_at + + def initialize(failed_at: nil) + super + @failed_at = failed_at + end + end + + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + attr_accessor :guaranteed_at + + def initialize(guaranteed_at: nil) + super + @guaranteed_at = guaranteed_at + end + end + + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address associated with the method of payment. + attr_accessor :address + # The billing email associated with the method of payment. + attr_accessor :email + # The billing name associated with the method of payment. + attr_accessor :name + # The billing phone number associated with the method of payment. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_accessor :display_name + # The custom payment method type associated with this payment. + attr_accessor :type + + def initialize(display_name: nil, type: nil) + super + @display_name = display_name + @type = type + end + end + # The billing details associated with the method of payment. + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + attr_accessor :type + + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil) + super + @billing_details = billing_details + @custom = custom + @payment_method = payment_method + @type = type + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The physical shipping address. + attr_accessor :address + # The shipping recipient's name. + attr_accessor :name + # The shipping recipient's phone number. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + # The amount you intend to collect for this payment. + attr_accessor :amount_requested + # Customer information for this payment. + attr_accessor :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. + attr_accessor :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the payment attempt failure. + attr_accessor :failed + # Information about the payment attempt guarantee. + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The outcome of the reported payment. + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + attr_accessor :payment_method_details + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + attr_accessor :payment_reference + # Shipping information for this payment. + attr_accessor :shipping_details + + def initialize( + amount_requested: nil, + customer_details: nil, + customer_presence: nil, + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + payment_reference: nil, + shipping_details: nil + ) + super + @amount_requested = amount_requested + @customer_details = customer_details + @customer_presence = customer_presence + @description = description + @expand = expand + @failed = failed + @guaranteed = guaranteed + @initiated_at = initiated_at + @metadata = metadata + @outcome = outcome + @payment_method_details = payment_method_details + @payment_reference = payment_reference + @shipping_details = shipping_details end - attr_reader :address, :name, :phone end # A representation of an amount of money, consisting of an amount and a currency. attr_reader :amount_canceled diff --git a/lib/stripe/resources/payout.rb b/lib/stripe/resources/payout.rb index dc6220842..fdc5fba46 100644 --- a/lib/stripe/resources/payout.rb +++ b/lib/stripe/resources/payout.rb @@ -21,7 +21,177 @@ def self.object_name end class TraceId < Stripe::StripeObject - attr_reader :status, :value + # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. + attr_reader :status + # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. + attr_reader :value + end + + class ListParams < Stripe::RequestParams + class ArrivalDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return payouts that are expected to arrive during the given date interval. + attr_accessor :arrival_date + # Only return payouts that were created during the given date interval. + attr_accessor :created + # The ID of an external account - only return payouts sent to this external account. + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + attr_accessor :status + + def initialize( + arrival_date: nil, + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @arrival_date = arrival_date + @created = created + @destination = destination + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer in cents representing how much to payout. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. + attr_accessor :destination + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + attr_accessor :method + # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. + attr_accessor :source_type + # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + method: nil, + source_type: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @description = description + @destination = destination + @expand = expand + @metadata = metadata + @method = method + @source_type = source_type + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end end # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. attr_reader :amount @@ -106,8 +276,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/payouts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/payouts", params: params, opts: opts) end # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. diff --git a/lib/stripe/resources/person.rb b/lib/stripe/resources/person.rb index b4d84fddc..f3a8270f8 100644 --- a/lib/stripe/resources/person.rb +++ b/lib/stripe/resources/person.rb @@ -17,66 +17,201 @@ def self.object_name class AdditionalTosAcceptances < Stripe::StripeObject class Account < Stripe::StripeObject - attr_reader :date, :ip, :user_agent + # The Unix timestamp marking when the legal guardian accepted the service agreement. + attr_reader :date + # The IP address from which the legal guardian accepted the service agreement. + attr_reader :ip + # The user agent of the browser from which the legal guardian accepted the service agreement. + attr_reader :user_agent end + # Details on the legal guardian's acceptance of the main Stripe service agreement. attr_reader :account end class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class AddressKana < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class AddressKanji < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state, :town + # City/Ward. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Block/Building number. + attr_reader :line1 + # Building details. + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # Prefecture. + attr_reader :state + # Town/cho-me. + attr_reader :town end class Dob < Stripe::StripeObject - attr_reader :day, :month, :year + # The day of birth, between 1 and 31. + attr_reader :day + # The month of birth, between 1 and 12. + attr_reader :month + # The four-digit year of birth. + attr_reader :year end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class RegisteredAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class Relationship < Stripe::StripeObject - attr_reader :authorizer, :director, :executive, :legal_guardian, :owner, :percent_ownership, :representative, :title + # Whether the person is the authorizer of the account's representative. + attr_reader :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_reader :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_reader :executive + # Whether the person is the legal guardian of the account's representative. + attr_reader :legal_guardian + # Whether the person is an owner of the account’s legal entity. + attr_reader :owner + # The percent owned by the person of the account's legal entity. + attr_reader :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + attr_reader :representative + # The person's title (e.g., CEO, Support Engineer). + attr_reader :title end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject - attr_reader :alternative_fields_due, :original_fields_due + # Fields that can be provided to satisfy all fields in `original_fields_due`. + attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. + attr_reader :original_fields_due end class Error < Stripe::StripeObject - attr_reader :code, :reason, :requirement + # The code for the type of error. + attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. + attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. + attr_reader :requirement end - attr_reader :alternatives, :currently_due, :errors, :eventually_due, :past_due, :pending_verification + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. + attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. + attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. + attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. + attr_reader :eventually_due + # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. + attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. + attr_reader :pending_verification end class Verification < Stripe::StripeObject class AdditionalDocument < Stripe::StripeObject - attr_reader :back, :details, :details_code, :front + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :front end class Document < Stripe::StripeObject - attr_reader :back, :details, :details_code, :front + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". + attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. + attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_reader :front end - attr_reader :additional_document, :details, :details_code, :document, :status + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_reader :additional_document + # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". + attr_reader :details + # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. + attr_reader :details_code + # Attribute for field document + attr_reader :document + # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. + attr_reader :status end # The account the person is associated with. attr_reader :account diff --git a/lib/stripe/resources/plan.rb b/lib/stripe/resources/plan.rb index c55fdceb1..d4936376b 100644 --- a/lib/stripe/resources/plan.rb +++ b/lib/stripe/resources/plan.rb @@ -22,11 +22,284 @@ def self.object_name end class Tier < Stripe::StripeObject - attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + # Price for the entire tier. + attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. + attr_reader :up_to end class TransformUsage < Stripe::StripeObject - attr_reader :divide_by, :round + # Divide usage by this number. + attr_reader :divide_by + # After division, either round the result `up` or `down`. + attr_reader :round + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Whether the plan is currently available for new subscriptions. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A brief description of the plan, hidden from customers. + attr_accessor :nickname + # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + attr_accessor :product + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_accessor :trial_period_days + + def initialize( + active: nil, + expand: nil, + metadata: nil, + nickname: nil, + product: nil, + trial_period_days: nil + ) + super + @active = active + @expand = expand + @metadata = metadata + @nickname = nickname + @product = product + @trial_period_days = trial_period_days + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return plans for the given product. + attr_accessor :product + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + product: nil, + starting_after: nil + ) + super + @active = active + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @product = product + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Product < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_accessor :unit_label + + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ) + super + @active = active + @id = id + @metadata = metadata + @name = name + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @unit_label = unit_label + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + + class TransformUsage < Stripe::RequestParams + # Divide usage by this number. + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + attr_accessor :round + + def initialize(divide_by: nil, round: nil) + super + @divide_by = divide_by + @round = round + end + end + # Whether the plan is currently available for new subscriptions. Defaults to `true`. + attr_accessor :active + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + attr_accessor :aggregate_usage + # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. + attr_accessor :amount + # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + attr_accessor :amount_decimal + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + attr_accessor :id + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The meter tracking the usage of a metered price + attr_accessor :meter + # A brief description of the plan, hidden from customers. + attr_accessor :nickname + # Attribute for param field product + attr_accessor :product + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + attr_accessor :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + attr_accessor :transform_usage + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_accessor :usage_type + + def initialize( + active: nil, + aggregate_usage: nil, + amount: nil, + amount_decimal: nil, + billing_scheme: nil, + currency: nil, + expand: nil, + id: nil, + interval: nil, + interval_count: nil, + metadata: nil, + meter: nil, + nickname: nil, + product: nil, + tiers: nil, + tiers_mode: nil, + transform_usage: nil, + trial_period_days: nil, + usage_type: nil + ) + super + @active = active + @aggregate_usage = aggregate_usage + @amount = amount + @amount_decimal = amount_decimal + @billing_scheme = billing_scheme + @currency = currency + @expand = expand + @id = id + @interval = interval + @interval_count = interval_count + @metadata = metadata + @meter = meter + @nickname = nickname + @product = product + @tiers = tiers + @tiers_mode = tiers_mode + @transform_usage = transform_usage + @trial_period_days = trial_period_days + @usage_type = usage_type + end end # Whether the plan can be used for new purchases. attr_reader :active @@ -99,8 +372,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your plans. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/plans", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/plans", params: params, opts: opts) end # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. diff --git a/lib/stripe/resources/price.rb b/lib/stripe/resources/price.rb index 2a10a85bd..064d26bd4 100644 --- a/lib/stripe/resources/price.rb +++ b/lib/stripe/resources/price.rb @@ -21,33 +21,624 @@ def self.object_name class CurrencyOptions < Stripe::StripeObject class CustomUnitAmount < Stripe::StripeObject - attr_reader :maximum, :minimum, :preset + # The maximum unit amount the customer can specify for this item. + attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_reader :minimum + # The starting unit amount which can be updated by the customer. + attr_reader :preset end class Tier < Stripe::StripeObject - attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + # Price for the entire tier. + attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. + attr_reader :up_to end - attr_reader :custom_unit_amount, :tax_behavior, :tiers, :unit_amount, :unit_amount_decimal + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_reader :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_reader :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_reader :tiers + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + attr_reader :unit_amount_decimal end class CustomUnitAmount < Stripe::StripeObject - attr_reader :maximum, :minimum, :preset + # The maximum unit amount the customer can specify for this item. + attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_reader :minimum + # The starting unit amount which can be updated by the customer. + attr_reader :preset end class MigrateTo < Stripe::StripeObject - attr_reader :behavior, :effective_after, :price + # The behavior controlling at what point in the subscription lifecycle to migrate the price + attr_reader :behavior + # The unix timestamp after at which subscriptions will start to migrate to the new price. + attr_reader :effective_after + # The id of the price being migrated to + attr_reader :price end class Recurring < Stripe::StripeObject - attr_reader :aggregate_usage, :interval, :interval_count, :meter, :trial_period_days, :usage_type + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. + attr_reader :aggregate_usage + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + attr_reader :interval_count + # The meter tracking the usage of a metered price + attr_reader :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_reader :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_reader :usage_type end class Tier < Stripe::StripeObject - attr_reader :flat_amount, :flat_amount_decimal, :unit_amount, :unit_amount_decimal, :up_to + # Price for the entire tier. + attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. + attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. + attr_reader :up_to end class TransformQuantity < Stripe::StripeObject - attr_reader :divide_by, :round + # Divide usage by this number. + attr_reader :divide_by + # After division, either round the result `up` or `down`. + attr_reader :round + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Recurring < Stripe::RequestParams + # Filter by billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # Filter by the price's meter. + attr_accessor :meter + # Filter by the usage type for this price. Can be either `metered` or `licensed`. + attr_accessor :usage_type + + def initialize(interval: nil, meter: nil, usage_type: nil) + super + @interval = interval + @meter = meter + @usage_type = usage_type + end + end + # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return prices for the given currency. + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. + attr_accessor :lookup_keys + # Only return prices for the given product. + attr_accessor :product + # Only return prices with these recurring fields. + attr_accessor :recurring + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return prices of type `recurring` or `one_time`. + attr_accessor :type + + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + product: nil, + recurring: nil, + starting_after: nil, + type: nil + ) + super + @active = active + @created = created + @currency = currency + @ending_before = ending_before + @expand = expand + @limit = limit + @lookup_keys = lookup_keys + @product = product + @recurring = recurring + @starting_after = starting_after + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @custom_unit_amount = custom_unit_amount + @tax_behavior = tax_behavior + @tiers = tiers + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class ProductData < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_accessor :unit_label + + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ) + super + @active = active + @id = id + @metadata = metadata + @name = name + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @unit_label = unit_label + end + end + + class Recurring < Stripe::RequestParams + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. + attr_accessor :aggregate_usage + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + # The meter tracking the usage of a metered price + attr_accessor :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_accessor :usage_type + + def initialize( + aggregate_usage: nil, + interval: nil, + interval_count: nil, + meter: nil, + trial_period_days: nil, + usage_type: nil + ) + super + @aggregate_usage = aggregate_usage + @interval = interval + @interval_count = interval_count + @meter = meter + @trial_period_days = trial_period_days + @usage_type = usage_type + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + + class TransformQuantity < Stripe::RequestParams + # Divide usage by this number. + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + attr_accessor :round + + def initialize(divide_by: nil, round: nil) + super + @divide_by = divide_by + @round = round + end + end + # Whether the price can be used for new purchases. Defaults to `true`. + attr_accessor :active + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A brief description of the price, hidden from customers. + attr_accessor :nickname + # The ID of the product that this price will belong to. + attr_accessor :product + # These fields can be used to create a new product that this price will belong to. + attr_accessor :product_data + # The recurring components of a price such as `interval` and `usage_type`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + attr_accessor :tiers_mode + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + attr_accessor :transfer_lookup_key + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + attr_accessor :transform_quantity + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + active: nil, + billing_scheme: nil, + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + nickname: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + tiers: nil, + tiers_mode: nil, + transfer_lookup_key: nil, + transform_quantity: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @active = active + @billing_scheme = billing_scheme + @currency = currency + @currency_options = currency_options + @custom_unit_amount = custom_unit_amount + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @nickname = nickname + @product = product + @product_data = product_data + @recurring = recurring + @tax_behavior = tax_behavior + @tiers = tiers + @tiers_mode = tiers_mode + @transfer_lookup_key = transfer_lookup_key + @transform_quantity = transform_quantity + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @custom_unit_amount = custom_unit_amount + @tax_behavior = tax_behavior + @tiers = tiers + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class MigrateTo < Stripe::RequestParams + # The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. + attr_accessor :behavior + # The time after which subscriptions should start using the new price. + attr_accessor :effective_after + # The ID of the price object. + attr_accessor :price + + def initialize(behavior: nil, effective_after: nil, price: nil) + super + @behavior = behavior + @effective_after = effective_after + @price = price + end + end + # Whether the price can be used for new purchases. Defaults to `true`. + attr_accessor :active + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If specified, subscriptions using this price will be updated to use the new referenced price. + attr_accessor :migrate_to + # A brief description of the price, hidden from customers. + attr_accessor :nickname + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + attr_accessor :transfer_lookup_key + + def initialize( + active: nil, + currency_options: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + migrate_to: nil, + nickname: nil, + tax_behavior: nil, + transfer_lookup_key: nil + ) + super + @active = active + @currency_options = currency_options + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @migrate_to = migrate_to + @nickname = nickname + @tax_behavior = tax_behavior + @transfer_lookup_key = transfer_lookup_key + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end end # Whether the price can be used for new purchases. attr_reader :active @@ -102,8 +693,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/prices", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/prices", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/product.rb b/lib/stripe/resources/product.rb index 85379e215..73f260c20 100644 --- a/lib/stripe/resources/product.rb +++ b/lib/stripe/resources/product.rb @@ -26,21 +26,516 @@ def self.object_name nested_resource_class_methods :feature, operations: %i[create retrieve delete list] class MarketingFeature < Stripe::StripeObject + # The marketing feature name. Up to 80 characters long. attr_reader :name end class PackageDimensions < Stripe::StripeObject - attr_reader :height, :length, :weight, :width + # Height, in inches. + attr_reader :height + # Length, in inches. + attr_reader :length + # Weight, in ounces. + attr_reader :weight + # Width, in inches. + attr_reader :width end class Provisioning < Stripe::StripeObject class GiftCard < Stripe::StripeObject class FixedAmount < Stripe::StripeObject - attr_reader :amount, :currency + # The initial amount with which the provisioned gift card will be created. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency end - attr_reader :fixed_amount, :type + # Attribute for field fixed_amount + attr_reader :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. + attr_reader :type + end + # Attribute for field gift_card + attr_reader :gift_card + # The type of provisioning, only `gift_card` currently supported. + attr_reader :type + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + # Whether the product is available for purchase. + attr_accessor :active + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + attr_accessor :default_price + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + active: nil, + default_price: nil, + description: nil, + expand: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil, + url: nil + ) + super + @active = active + @default_price = default_price + @description = description + @expand = expand + @images = images + @marketing_features = marketing_features + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @shippable = shippable + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @unit_label = unit_label + @url = url + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + attr_accessor :active + # Only return products that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). + attr_accessor :ids + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return products that can be shipped (i.e., physical, not digital products). + attr_accessor :shippable + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return products of this type. + attr_accessor :type + # Only return products with the given url. + attr_accessor :url + + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + ids: nil, + limit: nil, + shippable: nil, + starting_after: nil, + type: nil, + url: nil + ) + super + @active = active + @created = created + @ending_before = ending_before + @expand = expand + @ids = ids + @limit = limit + @shippable = shippable + @starting_after = starting_after + @type = type + @url = url + end + end + + class CreateParams < Stripe::RequestParams + class DefaultPriceData < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @custom_unit_amount = custom_unit_amount + @tax_behavior = tax_behavior + @tiers = tiers + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @currency_options = currency_options + @custom_unit_amount = custom_unit_amount + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + + class Provisioning < Stripe::RequestParams + class GiftCard < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + # The initial amount with which the provisioned gift card will be created. + attr_accessor :amount + # Attribute for param field currency + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + # Attribute for param field fixed_amount + attr_accessor :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. + attr_accessor :type + + def initialize(fixed_amount: nil, type: nil) + super + @fixed_amount = fixed_amount + @type = type + end + end + # Attribute for param field gift_card + attr_accessor :gift_card + # The type of provisioning, only `gift_card` currently supported. + attr_accessor :type + + def initialize(gift_card: nil, type: nil) + super + @gift_card = gift_card + @type = type + end + end + # Whether the product is currently available for purchase. Defaults to `true`. + attr_accessor :active + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + attr_accessor :default_price_data + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Provisioning configuration for this product. + attr_accessor :provisioning + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. Only used for subscription payments. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + attr_accessor :type + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + active: nil, + default_price_data: nil, + description: nil, + expand: nil, + id: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + provisioning: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + type: nil, + unit_label: nil, + url: nil + ) + super + @active = active + @default_price_data = default_price_data + @description = description + @expand = expand + @id = id + @images = images + @marketing_features = marketing_features + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @provisioning = provisioning + @shippable = shippable + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @type = type + @unit_label = unit_label + @url = url + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query end - attr_reader :gift_card, :type end # Whether the product is currently available for purchase. attr_reader :active @@ -111,8 +606,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/products", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/products", params: params, opts: opts) end def self.search(params = {}, opts = {}) diff --git a/lib/stripe/resources/promotion_code.rb b/lib/stripe/resources/promotion_code.rb index 1339b7eb5..7af96650f 100644 --- a/lib/stripe/resources/promotion_code.rb +++ b/lib/stripe/resources/promotion_code.rb @@ -16,9 +16,204 @@ def self.object_name class Restrictions < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). attr_reader :minimum_amount end - attr_reader :currency_options, :first_time_transaction, :minimum_amount, :minimum_amount_currency + # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + attr_reader :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_reader :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + attr_reader :minimum_amount_currency + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Filter promotion codes by whether they are active. + attr_accessor :active + # Only return promotion codes that have this case-insensitive code. + attr_accessor :code + # Only return promotion codes for this coupon. + attr_accessor :coupon + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return promotion codes that are restricted to this customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + code: nil, + coupon: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @code = code + @coupon = coupon + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_accessor :minimum_amount + + def initialize(minimum_amount: nil) + super + @minimum_amount = minimum_amount + end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + attr_accessor :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_accessor :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + attr_accessor :minimum_amount_currency + + def initialize( + currency_options: nil, + first_time_transaction: nil, + minimum_amount: nil, + minimum_amount_currency: nil + ) + super + @currency_options = currency_options + @first_time_transaction = first_time_transaction + @minimum_amount = minimum_amount + @minimum_amount_currency = minimum_amount_currency + end + end + # Whether the promotion code is currently active. + attr_accessor :active + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + # + # If left blank, we will generate one automatically. + attr_accessor :code + # The coupon for this promotion code. + attr_accessor :coupon + # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + attr_accessor :expires_at + # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + attr_accessor :restrictions + + def initialize( + active: nil, + code: nil, + coupon: nil, + customer: nil, + expand: nil, + expires_at: nil, + max_redemptions: nil, + metadata: nil, + restrictions: nil + ) + super + @active = active + @code = code + @coupon = coupon + @customer = customer + @expand = expand + @expires_at = expires_at + @max_redemptions = max_redemptions + @metadata = metadata + @restrictions = restrictions + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_accessor :minimum_amount + + def initialize(minimum_amount: nil) + super + @minimum_amount = minimum_amount + end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(currency_options: nil) + super + @currency_options = currency_options + end + end + # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + attr_accessor :restrictions + + def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil) + super + @active = active + @expand = expand + @metadata = metadata + @restrictions = restrictions + end end # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. attr_reader :active @@ -55,8 +250,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your promotion codes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/promotion_codes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/promotion_codes", params: params, opts: opts) end # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. diff --git a/lib/stripe/resources/quote.rb b/lib/stripe/resources/quote.rb index a0844890d..aab4bc374 100644 --- a/lib/stripe/resources/quote.rb +++ b/lib/stripe/resources/quote.rb @@ -20,174 +20,2898 @@ def self.object_name class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :enabled, :liability, :status + # Automatically calculate taxes + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this quote. + attr_reader :status end class Computed < Stripe::StripeObject class LastReestimationDetails < Stripe::StripeObject class Failed < Stripe::StripeObject - attr_reader :failure_code, :message, :reason + # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. + attr_reader :failure_code + # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". + attr_reader :message + # The reason the reestimation failed. + attr_reader :reason end - attr_reader :failed, :status + # When `status` is `failed`, provides details about the quote reestimation failure. + attr_reader :failed + # Latest status of the reestimation. + attr_reader :status end class Recurring < Stripe::StripeObject class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end - attr_reader :amount_subtotal, :amount_total, :interval, :interval_count, :total_details + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total after discounts and taxes are applied. + attr_reader :amount_total + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + attr_reader :interval_count + # Attribute for field total_details + attr_reader :total_details end class Upfront < Stripe::StripeObject class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end - attr_reader :amount_subtotal, :amount_total, :line_items, :total_details + # Total before any discounts or taxes are applied. + attr_reader :amount_subtotal + # Total after discounts and taxes are applied. + attr_reader :amount_total + # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. + attr_reader :line_items + # Attribute for field total_details + attr_reader :total_details end - attr_reader :last_reestimation_details, :recurring, :updated_at, :upfront + # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. + attr_reader :last_reestimation_details + # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. + attr_reader :recurring + # The time at which the quote's estimated schedules and upcoming invoices were generated. + attr_reader :updated_at + # Attribute for field upfront + attr_reader :upfront end class FromQuote < Stripe::StripeObject - attr_reader :is_revision, :quote + # Whether this quote is a revision of a different quote. + attr_reader :is_revision + # The quote that was cloned. + attr_reader :quote end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :days_until_due, :issuer + # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + attr_reader :days_until_due + # Attribute for field issuer + attr_reader :issuer end class StatusDetails < Stripe::StripeObject class Canceled < Stripe::StripeObject - attr_reader :reason, :transitioned_at + # The reason this quote was marked as canceled. + attr_reader :reason + # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. + attr_reader :transitioned_at end class Stale < Stripe::StripeObject class LastReason < Stripe::StripeObject class LinesInvalid < Stripe::StripeObject - attr_reader :invalid_at, :lines + # The timestamp at which the lines were marked as invalid. + attr_reader :invalid_at + # The list of lines that became invalid at the given timestamp. + attr_reader :lines end class SubscriptionChanged < Stripe::StripeObject + # The subscription's state before the quote was marked as stale. attr_reader :previous_subscription end class SubscriptionScheduleChanged < Stripe::StripeObject + # The subscription schedule's state before the quote was marked as stale. attr_reader :previous_subscription_schedule end - attr_reader :line_invalid, :lines_invalid, :marked_stale, :subscription_canceled, :subscription_changed, :subscription_expired, :subscription_schedule_canceled, :subscription_schedule_changed, :subscription_schedule_released, :type + # The ID of the line that is invalid if the stale reason type is `line_invalid`. + attr_reader :line_invalid + # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. + attr_reader :lines_invalid + # The user supplied mark stale reason. + attr_reader :marked_stale + # The ID of the subscription that was canceled. + attr_reader :subscription_canceled + # Attribute for field subscription_changed + attr_reader :subscription_changed + # The ID of the subscription that was expired. + attr_reader :subscription_expired + # The ID of the subscription schedule that was canceled. + attr_reader :subscription_schedule_canceled + # Attribute for field subscription_schedule_changed + attr_reader :subscription_schedule_changed + # The ID of the subscription schedule that was released. + attr_reader :subscription_schedule_released + # The reason the quote was marked as stale. + attr_reader :type end - attr_reader :expires_at, :last_reason, :last_updated_at, :transitioned_at + # Time at which the quote expires. Measured in seconds since the Unix epoch. + attr_reader :expires_at + # The most recent reason this quote was marked as stale. + attr_reader :last_reason + # Time at which the stale reason was updated. Measured in seconds since the Unix epoch. + attr_reader :last_updated_at + # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. + attr_reader :transitioned_at end - attr_reader :canceled, :stale + # Attribute for field canceled + attr_reader :canceled + # Attribute for field stale + attr_reader :stale end class StatusTransitions < Stripe::StripeObject - attr_reader :accepted_at, :canceled_at, :finalized_at + # The time that the quote was accepted. Measured in seconds since Unix epoch. + attr_reader :accepted_at + # The time that the quote was canceled. Measured in seconds since Unix epoch. + attr_reader :canceled_at + # The time that the quote was finalized. Measured in seconds since Unix epoch. + attr_reader :finalized_at end class SubscriptionData < Stripe::StripeObject class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :line_starts_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # The timestamp the given line starts at. + attr_reader :line_starts_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_from` time. + attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :duration, :line_ends_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. + attr_reader :duration + # The timestamp the given line ends at. + attr_reader :line_ends_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_until` time. + attr_reader :type end - attr_reader :bill_from, :bill_until + # The start of the period to bill from when the Quote is accepted. + attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_reader :bill_until end class Prebilling < Stripe::StripeObject + # Attribute for field iterations attr_reader :iterations end - attr_reader :bill_on_acceptance, :billing_behavior, :billing_cycle_anchor, :description, :effective_date, :end_behavior, :from_subscription, :metadata, :prebilling, :proration_behavior, :trial_period_days + # Describes the period to bill for upon accepting the quote. + attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + # Whether the subscription will always start a new billing period when the quote is accepted. + attr_reader :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. + attr_reader :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_reader :end_behavior + # The id of the subscription that will be updated when the quote is accepted. + attr_reader :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_reader :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + attr_reader :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. + attr_reader :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_reader :trial_period_days end class SubscriptionDataOverride < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :line_starts_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # The timestamp the given line starts at. + attr_reader :line_starts_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_from` time. + attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :duration, :line_ends_at, :timestamp, :type + # The materialized time. + attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. + attr_reader :duration + # The timestamp the given line ends at. + attr_reader :line_ends_at + # A precise Unix timestamp. + attr_reader :timestamp + # The type of method to specify the `bill_until` time. + attr_reader :type end - attr_reader :bill_from, :bill_until + # The start of the period to bill from when the Quote is accepted. + attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_reader :bill_until end - attr_reader :applies_to, :bill_on_acceptance, :billing_behavior, :customer, :description, :end_behavior, :proration_behavior + # Attribute for field applies_to + attr_reader :applies_to + # Describes the period to bill for upon accepting the quote. + attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_reader :billing_behavior + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_reader :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_reader :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. + attr_reader :proration_behavior end class SubscriptionSchedule < Stripe::StripeObject class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end - attr_reader :applies_to, :subscription_schedule + # Attribute for field applies_to + attr_reader :applies_to + # The subscription schedule that was created or updated from this quote. + attr_reader :subscription_schedule end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount discounted. + attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) + attr_reader :discount end class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :discounts, :taxes + # The aggregated discounts. + attr_reader :discounts + # The aggregated tax amounts by rate. + attr_reader :taxes end - attr_reader :amount_discount, :amount_shipping, :amount_tax, :breakdown + # This is the sum of all the discounts. + attr_reader :amount_discount + # This is the sum of all the shipping amounts. + attr_reader :amount_shipping + # This is the sum of all the tax amounts. + attr_reader :amount_tax + # Attribute for field breakdown + attr_reader :breakdown end class TransferData < Stripe::StripeObject - attr_reader :amount, :amount_percent, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + attr_reader :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination + end + + class ListParams < Stripe::RequestParams + # The ID of the customer whose quotes will be retrieved. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The subscription which the quote updates. + attr_accessor :from_subscription + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the quote. + attr_accessor :status + # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. + attr_accessor :test_clock + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + from_subscription: nil, + limit: nil, + starting_after: nil, + status: nil, + test_clock: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @from_subscription = from_subscription + @limit = limit + @starting_after = starting_after + @status = status + @test_clock = test_clock + end + end + + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class FromQuote < Stripe::RequestParams + # Whether this quote is a revision of the previous quote. + attr_accessor :is_revision + # The `id` of the quote that will be cloned. + attr_accessor :quote + + def initialize(is_revision: nil, quote: nil) + super + @is_revision = is_revision + @quote = quote + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(days_until_due: nil, issuer: nil) + super + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details for the `add_discount` type. + attr_accessor :add_discount + # Details for the `add_item` type. + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + attr_accessor :add_metadata + # Details for the `remove_discount` type. + attr_accessor :remove_discount + # Details for the `remove_item` type. + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + attr_accessor :set_discounts + # Details for the `set_items` type. + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + attr_accessor :set_metadata + # The type of action the quote line performs. + attr_accessor :type + + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ) + super + @add_discount = add_discount + @add_item = add_item + @add_metadata = add_metadata + @remove_discount = remove_discount + @remove_item = remove_item + @remove_metadata = remove_metadata + @set_discounts = set_discounts + @set_items = set_items + @set_metadata = set_metadata + @type = type + end + end + + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + attr_accessor :prorate + + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil) + super + @cancel_at = cancel_at + @invoice_now = invoice_now + @prorate = prorate + end + end + + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + attr_accessor :duration + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class LineEndsAt < Stripe::RequestParams + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # The timestamp the given line ends at. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + attr_accessor :type + + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # An array of operations the quote line performs. + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + attr_accessor :ends_at + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :starts_at + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ) + super + @actions = actions + @applies_to = applies_to + @billing_cycle_anchor = billing_cycle_anchor + @cancel_subscription_schedule = cancel_subscription_schedule + @ends_at = ends_at + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @starts_at = starts_at + @trial_settings = trial_settings + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_accessor :trial_period_days + + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + from_subscription: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ) + super + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @billing_cycle_anchor = billing_cycle_anchor + @description = description + @effective_date = effective_date + @end_behavior = end_behavior + @from_subscription = from_subscription + @metadata = metadata + @prebilling = prebilling + @proration_behavior = proration_behavior + @trial_period_days = trial_period_days + end + end + + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ) + super + @applies_to = applies_to + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @customer = customer + @description = description + @end_behavior = end_behavior + @proration_behavior = proration_behavior + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, amount_percent: nil, destination: nil) + super + @amount = amount + @amount_percent = amount_percent + @destination = destination + end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :description + # The discounts applied to the quote. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :footer + # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + attr_accessor :from_quote + # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :header + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge. + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + attr_accessor :subscription_data_overrides + # ID of the test clock to attach to the quote. + attr_accessor :test_clock + # The data with which to automatically create a Transfer for each of the invoices. + attr_accessor :transfer_data + + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + from_quote: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + test_clock: nil, + transfer_data: nil + ) + super + @allow_backdated_lines = allow_backdated_lines + @application_fee_amount = application_fee_amount + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @collection_method = collection_method + @customer = customer + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @expires_at = expires_at + @footer = footer + @from_quote = from_quote + @header = header + @invoice_settings = invoice_settings + @line_items = line_items + @lines = lines + @metadata = metadata + @on_behalf_of = on_behalf_of + @subscription_data = subscription_data + @subscription_data_overrides = subscription_data_overrides + @test_clock = test_clock + @transfer_data = transfer_data + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(days_until_due: nil, issuer: nil) + super + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details for the `add_discount` type. + attr_accessor :add_discount + # Details for the `add_item` type. + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + attr_accessor :add_metadata + # Details for the `remove_discount` type. + attr_accessor :remove_discount + # Details for the `remove_item` type. + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + attr_accessor :set_discounts + # Details for the `set_items` type. + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + attr_accessor :set_metadata + # The type of action the quote line performs. + attr_accessor :type + + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ) + super + @add_discount = add_discount + @add_item = add_item + @add_metadata = add_metadata + @remove_discount = remove_discount + @remove_item = remove_item + @remove_metadata = remove_metadata + @set_discounts = set_discounts + @set_items = set_items + @set_metadata = set_metadata + @type = type + end + end + + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + attr_accessor :prorate + + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil) + super + @cancel_at = cancel_at + @invoice_now = invoice_now + @prorate = prorate + end + end + + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + attr_accessor :duration + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # The timestamp the given line ends at. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + attr_accessor :type + + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # An array of operations the quote line performs. + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + attr_accessor :ends_at + # The ID of an existing line on the quote. + attr_accessor :id + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :starts_at + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + id: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ) + super + @actions = actions + @applies_to = applies_to + @billing_cycle_anchor = billing_cycle_anchor + @cancel_subscription_schedule = cancel_subscription_schedule + @ends_at = ends_at + @id = id + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @starts_at = starts_at + @trial_settings = trial_settings + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of an existing line item on the quote. + attr_accessor :id + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + id: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @id = id + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_accessor :trial_period_days + + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ) + super + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @billing_cycle_anchor = billing_cycle_anchor + @description = description + @effective_date = effective_date + @end_behavior = end_behavior + @metadata = metadata + @prebilling = prebilling + @proration_behavior = proration_behavior + @trial_period_days = trial_period_days + end + end + + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ) + super + @applies_to = applies_to + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @customer = customer + @description = description + @end_behavior = end_behavior + @proration_behavior = proration_behavior + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, amount_percent: nil, destination: nil) + super + @amount = amount + @amount_percent = amount_percent + @destination = destination + end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. + attr_accessor :description + # The discounts applied to the quote. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. + attr_accessor :footer + # A header that will be displayed on the quote PDF. + attr_accessor :header + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge. + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + attr_accessor :subscription_data_overrides + # The data with which to automatically create a Transfer for each of the invoices. + attr_accessor :transfer_data + + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + transfer_data: nil + ) + super + @allow_backdated_lines = allow_backdated_lines + @application_fee_amount = application_fee_amount + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @collection_method = collection_method + @customer = customer + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @expires_at = expires_at + @footer = footer + @header = header + @invoice_settings = invoice_settings + @line_items = line_items + @lines = lines + @metadata = metadata + @on_behalf_of = on_behalf_of + @subscription_data = subscription_data + @subscription_data_overrides = subscription_data_overrides + @transfer_data = transfer_data + end + end + + class ListComputedUpfrontLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class ListLinesParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class AcceptParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FinalizeQuoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + attr_accessor :expires_at + + def initialize(expand: nil, expires_at: nil) + super + @expand = expand + @expires_at = expires_at + end + end + + class MarkDraftParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class MarkStaleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Reason the Quote is being marked stale. + attr_accessor :reason + + def initialize(expand: nil, reason: nil) + super + @expand = expand + @reason = reason + end + end + + class ReestimateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListPreviewInvoiceLinesParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end end # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. attr_reader :allow_backdated_lines @@ -336,8 +3060,8 @@ def self.finalize_quote(quote, params = {}, opts = {}) end # Returns a list of your quotes. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/quotes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/quotes", params: params, opts: opts) end # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. diff --git a/lib/stripe/resources/quote_line.rb b/lib/stripe/resources/quote_line.rb index 16cd4815c..24a928a15 100644 --- a/lib/stripe/resources/quote_line.rb +++ b/lib/stripe/resources/quote_line.rb @@ -12,100 +12,238 @@ def self.object_name class Action < Stripe::StripeObject class AddDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end type. attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :index, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_reader :index + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class AddItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end class RemoveDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class RemoveItem < Stripe::StripeObject + # ID of a price to remove. attr_reader :price end class SetDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class SetItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :discounts, :metadata, :price, :quantity, :tax_rates, :trial + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end - attr_reader :add_discount, :add_item, :add_metadata, :remove_discount, :remove_item, :remove_metadata, :set_discounts, :set_items, :set_metadata, :type + # Details for the `add_discount` type. + attr_reader :add_discount + # Details for the `add_item` type. + attr_reader :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + attr_reader :add_metadata + # Details for the `remove_discount` type. + attr_reader :remove_discount + # Details for the `remove_item` type. + attr_reader :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + attr_reader :remove_metadata + # Details for the `set_discounts` type. + attr_reader :set_discounts + # Details for the `set_items` type. + attr_reader :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + attr_reader :set_metadata + # The type of action the quote line performs. + attr_reader :type end class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class CancelSubscriptionSchedule < Stripe::StripeObject - attr_reader :cancel_at, :invoice_now, :prorate + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + attr_reader :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + attr_reader :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + attr_reader :prorate end class EndsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. attr_reader :discount end class Duration < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_reader :interval_count end - attr_reader :computed, :discount_end, :duration, :timestamp, :type + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. + attr_reader :computed + # Use the `end` time of a given discount. + attr_reader :discount_end + # Time span for the quote line starting from the `starts_at` date. + attr_reader :duration + # A precise Unix timestamp. + attr_reader :timestamp + # Select a way to pass in `ends_at`. + attr_reader :type end class SetPauseCollection < Stripe::StripeObject class Set < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end - attr_reader :set, :type + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :set + # Defines the type of the pause_collection behavior for the quote line. + attr_reader :type end class StartsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. attr_reader :discount end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. attr_reader :id end - attr_reader :computed, :discount_end, :line_ends_at, :timestamp, :type + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. + attr_reader :computed + # Use the `end` time of a given discount. + attr_reader :discount_end + # The timestamp the given line ends at. + attr_reader :line_ends_at + # A precise Unix timestamp. + attr_reader :timestamp + # Select a way to pass in `starts_at`. + attr_reader :type end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end # A list of items the customer is being quoted for. diff --git a/lib/stripe/resources/quote_preview_invoice.rb b/lib/stripe/resources/quote_preview_invoice.rb index d10f9a109..f9004ca6a 100644 --- a/lib/stripe/resources/quote_preview_invoice.rb +++ b/lib/stripe/resources/quote_preview_invoice.rb @@ -41,79 +41,231 @@ def self.object_name end class AmountsDue < Stripe::StripeObject - attr_reader :amount, :amount_paid, :amount_remaining, :days_until_due, :description, :due_date, :paid_at, :status + # Incremental amount due for this payment in cents (or local equivalent). + attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. + attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). + attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. + attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_reader :description + # Date on which a payment plan’s payment is due. + attr_reader :due_date + # Timestamp when the payment was paid. + attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` + attr_reader :status end class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability, :status + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. + attr_reader :status end class CustomField < Stripe::StripeObject - attr_reader :name, :value + # The name of the custom field. + attr_reader :name + # The value of the custom field. + attr_reader :value end class CustomerAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end class FromInvoice < Stripe::StripeObject - attr_reader :action, :invoice + # The relation between this invoice and the cloned invoice + attr_reader :action + # The invoice that was cloned. + attr_reader :invoice end class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end class LastFinalizationError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. attr_reader :transaction_type end - attr_reader :mandate_options, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. attr_reader :enabled end - attr_reader :installments, :request_three_d_secure + # Attribute for field installments + attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -123,74 +275,198 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end - attr_reader :filters, :permissions, :prefetch + # Attribute for field filters + attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch end - attr_reader :financial_connections, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_reader :us_bank_account end - attr_reader :default_mandate, :payment_method_options, :payment_method_types + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. attr_reader :page_size end - attr_reader :amount_tax_display, :pdf, :template, :template_version + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. + attr_reader :amount_tax_display + # Invoice pdf rendering options + attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. + attr_reader :template + # Version of the rendering template that the invoice is using. + attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject - attr_reader :amount, :rate, :taxability_reason, :taxable_amount + # Amount of tax applied for this rate. + attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) + attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end - attr_reader :amount_subtotal, :amount_tax, :amount_total, :shipping_rate, :taxes + # Total shipping cost before any taxes are applied. + attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. + attr_reader :amount_tax + # Total shipping cost after taxes are applied. + attr_reader :amount_total + # The ID of the ShippingRate for this invoice. + attr_reader :shipping_rate + # The taxes applied to the shipping rate. + attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject - attr_reader :finalized_at, :marked_uncollectible_at, :paid_at, :voided_at + # The time that the invoice draft was finalized. + attr_reader :finalized_at + # The time that the invoice was marked uncollectible. + attr_reader :marked_uncollectible_at + # The time that the invoice was paid. + attr_reader :paid_at + # The time that the invoice was voided. + attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject - attr_reader :behavior, :resumes_at + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_reader :behavior + # The time after which the subscription will resume collecting payments. + attr_reader :resumes_at end - attr_reader :metadata, :pause_collection + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* + attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject - attr_reader :line_item_ids, :usage_gte + # The IDs of the line items that triggered the threshold invoice. + attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. + attr_reader :usage_gte end - attr_reader :amount_gte, :item_reasons + # The total invoice amount threshold boundary if it triggered the threshold invoice. + attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. + attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject - attr_reader :amount, :discount + # The amount, in cents (or local equivalent), of the discount. + attr_reader :amount + # The discount that was applied to get this discount amount. + attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject - attr_reader :amount, :margin + # The amount, in cents (or local equivalent), of the reduction in line item amount. + attr_reader :amount + # The margin that was applied to get this margin amount. + attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject - attr_reader :amount, :credit_balance_transaction, :discount, :margin, :type + # The amount, in cents (or local equivalent), of the pretax credit amount. + attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. + attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. + attr_reader :discount + # The margin that was applied to get this pretax credit amount. + attr_reader :margin + # Type of the pretax credit amount referenced. + attr_reader :type end class TotalTaxAmount < Stripe::StripeObject - attr_reader :amount, :inclusive, :tax_rate, :taxability_reason, :taxable_amount + # The amount, in cents (or local equivalent), of the tax. + attr_reader :amount + # Whether this tax amount is inclusive or exclusive. + attr_reader :inclusive + # The tax rate that was applied to get this tax amount. + attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). + attr_reader :taxable_amount end class TransferData < Stripe::StripeObject - attr_reader :amount, :destination + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. + attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end # The country of the business associated with this invoice, most often the business creating the invoice. attr_reader :account_country diff --git a/lib/stripe/resources/quote_preview_subscription_schedule.rb b/lib/stripe/resources/quote_preview_subscription_schedule.rb index efb6bb307..faa150563 100644 --- a/lib/stripe/resources/quote_preview_subscription_schedule.rb +++ b/lib/stripe/resources/quote_preview_subscription_schedule.rb @@ -9,118 +9,310 @@ def self.object_name end class AppliesTo < Stripe::StripeObject - attr_reader :new_reference, :subscription_schedule, :type + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_reader :new_reference + # The ID of the schedule the line applies to. + attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_reader :type end class CurrentPhase < Stripe::StripeObject - attr_reader :end_date, :start_date + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The start of this phase of the subscription schedule. + attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # Attribute for field issuer + attr_reader :issuer end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end - attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Attribute for field invoice_settings + attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - attr_reader :source_price, :target_price + # The original price to be migrated. + attr_reader :source_price + # The intended resulting price of the migration. + attr_reader :target_price end - attr_reader :errored_at, :failed_transitions, :type + # The time at which the price migration encountered an error. + attr_reader :errored_at + # The involved price pairs in each failed transition. + attr_reader :failed_transitions + # The type of error encountered by the price migration. + attr_reader :type end class Phase < Stripe::StripeObject class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end - attr_reader :discounts, :price, :quantity, :tax_rates + # The stackable discounts that will be applied to the item. + attr_reader :discounts + # ID of the price used to generate the invoice item. + attr_reader :price + # The quantity of the invoice item. + attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the plan to which the customer should be subscribed. + attr_reader :plan + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end - attr_reader :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, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. + attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. + attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + attr_reader :discounts + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The invoice settings applicable during this phase. + attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. + attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. + attr_reader :proration_behavior + # The start of this phase of the subscription schedule. + attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries + attr_reader :trial_continuation + # When the trial ends within the phase. + attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. + attr_reader :trial_settings end class Prebilling < Stripe::StripeObject - attr_reader :invoice, :period_end, :period_start, :update_behavior + # ID of the prebilling invoice. + attr_reader :invoice + # The end of the last period for which the invoice pre-bills. + attr_reader :period_end + # The start of the first period for which the invoice pre-bills. + attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + attr_reader :update_behavior end # ID of the Connect Application that created the schedule. attr_reader :application diff --git a/lib/stripe/resources/radar/early_fraud_warning.rb b/lib/stripe/resources/radar/early_fraud_warning.rb index 04f91876b..8c2923911 100644 --- a/lib/stripe/resources/radar/early_fraud_warning.rb +++ b/lib/stripe/resources/radar/early_fraud_warning.rb @@ -15,6 +15,69 @@ def self.object_name "radar.early_fraud_warning" end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return early fraud warnings for the charge specified by this charge ID. + attr_accessor :charge + # Only return early fraud warnings that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. attr_reader :actionable # ID of the charge this early fraud warning is for, optionally expanded. @@ -33,11 +96,11 @@ def self.object_name attr_reader :payment_intent # Returns a list of early fraud warnings. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/early_fraud_warnings", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/radar/value_list.rb b/lib/stripe/resources/radar/value_list.rb index bfe3302be..82a3984ed 100644 --- a/lib/stripe/resources/radar/value_list.rb +++ b/lib/stripe/resources/radar/value_list.rb @@ -17,6 +17,113 @@ def self.object_name "radar.value_list" end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # The name of the value list for use in rules. + attr_accessor :alias + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The human-readable name of the value list. + attr_accessor :name + + def initialize(alias_: nil, expand: nil, metadata: nil, name: nil) + super + @alias = alias_ + @expand = expand + @metadata = metadata + @name = name + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # The alias used to reference the value list when writing rules. + attr_accessor :alias + # A value contained within a value list - returns all value lists containing this value. + attr_accessor :contains + # Only return value lists that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + alias_: nil, + contains: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @alias = alias_ + @contains = contains + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # The name of the value list for use in rules. + attr_accessor :alias + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + attr_accessor :item_type + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The human-readable name of the value list. + attr_accessor :name + + def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil) + super + @alias = alias_ + @expand = expand + @item_type = item_type + @metadata = metadata + @name = name + end + end # The name of the value list for use in rules. attr_reader :alias # Time at which the object was created. Measured in seconds since the Unix epoch. @@ -71,11 +178,11 @@ def delete(params = {}, opts = {}) end # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_lists", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/radar/value_list_item.rb b/lib/stripe/resources/radar/value_list_item.rb index e2871b7b3..96134a8d1 100644 --- a/lib/stripe/resources/radar/value_list_item.rb +++ b/lib/stripe/resources/radar/value_list_item.rb @@ -16,6 +16,88 @@ def self.object_name "radar.value_list_item" end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return items that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Return items belonging to the parent list whose value matches the specified value (using an "is like" match). + attr_accessor :value + # Identifier for the parent value list this item belongs to. + attr_accessor :value_list + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + value: nil, + value_list: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @value = value + @value_list = value_list + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The value of the item (whose type must match the type of the parent value list). + attr_accessor :value + # The identifier of the value list which the created item will be added to. + attr_accessor :value_list + + def initialize(expand: nil, value: nil, value_list: nil) + super + @expand = expand + @value = value + @value_list = value_list + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # The name or email address of the user who added this item to the value list. @@ -64,11 +146,11 @@ def delete(params = {}, opts = {}) end # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/radar/value_list_items", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/refund.rb b/lib/stripe/resources/refund.rb index 8e5e64856..362fbf397 100644 --- a/lib/stripe/resources/refund.rb +++ b/lib/stripe/resources/refund.rb @@ -26,15 +26,30 @@ class AmazonPay < Stripe::StripeObject; end class AuBankTransfer < Stripe::StripeObject; end class Blik < Stripe::StripeObject - attr_reader :network_decline_code, :reference, :reference_status + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + attr_reader :network_decline_code + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class BrBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Card < Stripe::StripeObject - attr_reader :reference, :reference_status, :reference_type, :type + # Value of the reference number assigned to the refund. + attr_reader :reference + # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status + # Type of the reference number assigned to the refund. + attr_reader :reference_type + # The type of refund. This can be `refund`, `reversal`, or `pending`. + attr_reader :type end class Cashapp < Stripe::StripeObject; end @@ -42,36 +57,57 @@ class CustomerCashBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject; end class EuBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class GbBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class JpBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Klarna < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class MxBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class P24 < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class Paynow < Stripe::StripeObject; end @@ -81,30 +117,268 @@ class Revolut < Stripe::StripeObject; end class Sofort < Stripe::StripeObject; end class Swish < Stripe::StripeObject - attr_reader :network_decline_code, :reference, :reference_status + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. + attr_reader :network_decline_code + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class ThBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class UsBankTransfer < Stripe::StripeObject - attr_reader :reference, :reference_status + # The reference assigned to the refund. + attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. + attr_reader :reference_status end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - attr_reader :affirm, :afterpay_clearpay, :alipay, :alma, :amazon_pay, :au_bank_transfer, :blik, :br_bank_transfer, :card, :cashapp, :customer_cash_balance, :eps, :eu_bank_transfer, :gb_bank_transfer, :giropay, :grabpay, :id_bank_transfer, :jp_bank_transfer, :klarna, :multibanco, :mx_bank_transfer, :p24, :paynow, :paypal, :pix, :revolut, :sofort, :swish, :th_bank_transfer, :type, :us_bank_transfer, :wechat_pay, :zip + # Attribute for field affirm + attr_reader :affirm + # Attribute for field afterpay_clearpay + attr_reader :afterpay_clearpay + # Attribute for field alipay + attr_reader :alipay + # Attribute for field alma + attr_reader :alma + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_bank_transfer + attr_reader :au_bank_transfer + # Attribute for field blik + attr_reader :blik + # Attribute for field br_bank_transfer + attr_reader :br_bank_transfer + # Attribute for field card + attr_reader :card + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field customer_cash_balance + attr_reader :customer_cash_balance + # Attribute for field eps + attr_reader :eps + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer + attr_reader :gb_bank_transfer + # Attribute for field giropay + attr_reader :giropay + # Attribute for field grabpay + attr_reader :grabpay + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field jp_bank_transfer + attr_reader :jp_bank_transfer + # Attribute for field klarna + attr_reader :klarna + # Attribute for field multibanco + attr_reader :multibanco + # Attribute for field mx_bank_transfer + attr_reader :mx_bank_transfer + # Attribute for field p24 + attr_reader :p24 + # Attribute for field paynow + attr_reader :paynow + # Attribute for field paypal + attr_reader :paypal + # Attribute for field pix + attr_reader :pix + # Attribute for field revolut + attr_reader :revolut + # Attribute for field sofort + attr_reader :sofort + # Attribute for field swish + attr_reader :swish + # Attribute for field th_bank_transfer + attr_reader :th_bank_transfer + # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. + attr_reader :type + # Attribute for field us_bank_transfer + attr_reader :us_bank_transfer + # Attribute for field wechat_pay + attr_reader :wechat_pay + # Attribute for field zip + attr_reader :zip end class NextAction < Stripe::StripeObject class DisplayDetails < Stripe::StripeObject class EmailSent < Stripe::StripeObject - attr_reader :email_sent_at, :email_sent_to + # The timestamp when the email was sent. + attr_reader :email_sent_at + # The recipient's email address. + attr_reader :email_sent_to end - attr_reader :email_sent, :expires_at + # Attribute for field email_sent + attr_reader :email_sent + # The expiry timestamp. + attr_reader :expires_at + end + # Attribute for field display_details + attr_reader :display_details + # Type of the next action to perform. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return refunds for the charge specified by this charge ID. + attr_accessor :charge + # Only return refunds that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return refunds for the PaymentIntent specified by this ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Attribute for param field amount + attr_accessor :amount + # The identifier of the charge to refund. + attr_accessor :charge + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Customer whose customer balance to refund from. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. + attr_accessor :instructions_email + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Origin of the refund + attr_accessor :origin + # The identifier of the PaymentIntent to refund. + attr_accessor :payment_intent + # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + attr_accessor :reason + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + attr_accessor :refund_application_fee + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge. + attr_accessor :reverse_transfer + + def initialize( + amount: nil, + charge: nil, + currency: nil, + customer: nil, + expand: nil, + instructions_email: nil, + metadata: nil, + origin: nil, + payment_intent: nil, + reason: nil, + refund_application_fee: nil, + reverse_transfer: nil + ) + super + @amount = amount + @charge = charge + @currency = currency + @customer = customer + @expand = expand + @instructions_email = instructions_email + @metadata = metadata + @origin = origin + @payment_intent = payment_intent + @reason = reason + @refund_application_fee = refund_application_fee + @reverse_transfer = reverse_transfer + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand end - attr_reader :display_details, :type end # Amount, in cents (or local equivalent). attr_reader :amount @@ -187,8 +461,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/refunds", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/refunds", params: params, opts: opts) end # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. diff --git a/lib/stripe/resources/reporting/report_run.rb b/lib/stripe/resources/reporting/report_run.rb index b69c60b29..c9dcb8c1c 100644 --- a/lib/stripe/resources/reporting/report_run.rb +++ b/lib/stripe/resources/reporting/report_run.rb @@ -21,7 +21,133 @@ def self.object_name end class Parameters < Stripe::StripeObject - attr_reader :columns, :connected_account, :currency, :interval_end, :interval_start, :payout, :reporting_category, :timezone + # The set of output columns requested for inclusion in the report run. + attr_reader :columns + # Connected account ID by which to filter the report run. + attr_reader :connected_account + # Currency of objects to be included in the report run. + attr_reader :currency + # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. + attr_reader :interval_end + # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. + attr_reader :interval_start + # Payout ID by which to filter the report run. + attr_reader :payout + # Category of balance transactions to be included in the report run. + attr_reader :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + attr_reader :timezone + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return Report Runs that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Parameters < Stripe::RequestParams + # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. + attr_accessor :columns + # Connected account ID to filter for in the report run. + attr_accessor :connected_account + # Currency of objects to be included in the report run. + attr_accessor :currency + # Ending timestamp of data to be included in the report run (exclusive). + attr_accessor :interval_end + # Starting timestamp of data to be included in the report run. + attr_accessor :interval_start + # Payout ID by which to filter the report run. + attr_accessor :payout + # Category of balance transactions to be included in the report run. + attr_accessor :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + attr_accessor :timezone + + def initialize( + columns: nil, + connected_account: nil, + currency: nil, + interval_end: nil, + interval_start: nil, + payout: nil, + reporting_category: nil, + timezone: nil + ) + super + @columns = columns + @connected_account = connected_account + @currency = currency + @interval_end = interval_end + @interval_start = interval_start + @payout = payout + @reporting_category = reporting_category + @timezone = timezone + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + attr_accessor :parameters + # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. + attr_accessor :report_type + + def initialize(expand: nil, parameters: nil, report_type: nil) + super + @expand = expand + @parameters = parameters + @report_type = report_type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created @@ -60,11 +186,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Report Runs, with the most recent appearing first. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/reporting/report_runs", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/reporting/report_type.rb b/lib/stripe/resources/reporting/report_type.rb index 65e2a9de2..35d2d5782 100644 --- a/lib/stripe/resources/reporting/report_type.rb +++ b/lib/stripe/resources/reporting/report_type.rb @@ -19,6 +19,25 @@ def self.object_name "reporting.report_type" end + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. attr_reader :data_available_end # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. @@ -39,11 +58,11 @@ def self.object_name attr_reader :version # Returns a full list of Report Types. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/reporting/report_types", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/review.rb b/lib/stripe/resources/review.rb index 239cad633..8f9ae0830 100644 --- a/lib/stripe/resources/review.rb +++ b/lib/stripe/resources/review.rb @@ -15,11 +15,87 @@ def self.object_name end class IpAddressLocation < Stripe::StripeObject - attr_reader :city, :country, :latitude, :longitude, :region + # The city where the payment originated. + attr_reader :city + # Two-letter ISO code representing the country where the payment originated. + attr_reader :country + # The geographic latitude where the payment originated. + attr_reader :latitude + # The geographic longitude where the payment originated. + attr_reader :longitude + # The state/county/province/region where the payment originated. + attr_reader :region end class Session < Stripe::StripeObject - attr_reader :browser, :device, :platform, :version + # The browser used in this browser session (e.g., `Chrome`). + attr_reader :browser + # Information about the device used for the browser session (e.g., `Samsung SM-G930T`). + attr_reader :device + # The platform for the browser session (e.g., `Macintosh`). + attr_reader :platform + # The version for the browser session (e.g., `61.0.3163.100`). + attr_reader :version + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return reviews that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ApproveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # The ZIP or postal code of the card used, if applicable. attr_reader :billing_zip @@ -71,8 +147,8 @@ def self.approve(review, params = {}, opts = {}) end # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/reviews", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/reviews", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/setup_attempt.rb b/lib/stripe/resources/setup_attempt.rb index 53dd6e2bf..a200288c1 100644 --- a/lib/stripe/resources/setup_attempt.rb +++ b/lib/stripe/resources/setup_attempt.rb @@ -21,43 +21,139 @@ class AuBecsDebit < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject; end class Bancontact < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class Boleto < Stripe::StripeObject; end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject - attr_reader :address_line1_check, :address_postal_code_check, :cvc_check + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. + attr_reader :cvc_check end class ThreeDSecure < Stripe::StripeObject - attr_reader :authentication_flow, :electronic_commerce_indicator, :result, :result_reason, :transaction_id, :version + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. + attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. + attr_reader :electronic_commerce_indicator + # Indicates the outcome of 3D Secure authentication. + attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. + attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. + attr_reader :transaction_id + # The version of 3D Secure that was used. + attr_reader :version end class Wallet < Stripe::StripeObject class ApplePay < Stripe::StripeObject; end class GooglePay < Stripe::StripeObject; end - attr_reader :apple_pay, :google_pay, :type + # Attribute for field apple_pay + attr_reader :apple_pay + # Attribute for field google_pay + attr_reader :google_pay + # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. + attr_reader :type end - attr_reader :brand, :checks, :country, :description, :exp_month, :exp_year, :fingerprint, :funding, :iin, :issuer, :last4, :network, :three_d_secure, :wallet + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :brand + # Check results by Card networks on Card address and CVC at the time of authorization + attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. + attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + attr_reader :description + # Two-digit number representing the card's expiration month. + attr_reader :exp_month + # Four-digit number representing the card's expiration year. + attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. + attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) + attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) + attr_reader :issuer + # The last four digits of the card. + attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. + attr_reader :network + # Populated if this authorization used 3D Secure authentication. + attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. + attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject - attr_reader :stored_at, :type + # Time at which the payment was collected while offline + attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. + attr_reader :type end - attr_reader :generated_card, :offline + # The ID of the Card PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_card + # Details about payments collected offline. + attr_reader :offline end class Cashapp < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject - attr_reader :bank, :bank_code, :bank_name, :display_name + # Bank where the account is located. + attr_reader :bank + # Local bank code of the bank. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. + attr_reader :display_name end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :verified_name + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. + attr_reader :bank + # The Bank Identifier Code of the customer's bank. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class KakaoPay < Stripe::StripeObject; end @@ -70,15 +166,191 @@ class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject; end class Sofort < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :generated_sepa_debit, :generated_sepa_debit_mandate, :iban_last4, :preferred_language, :verified_name + # Bank code of bank associated with the bank account. + attr_reader :bank_code + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. + attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. + attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. + attr_reader :iban_last4 + # Preferred language of the Sofort authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` + attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Sofort directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name end class UsBankAccount < Stripe::StripeObject; end - attr_reader :acss_debit, :amazon_pay, :au_becs_debit, :bacs_debit, :bancontact, :boleto, :card, :card_present, :cashapp, :id_bank_transfer, :ideal, :kakao_pay, :klarna, :kr_card, :link, :paypal, :payto, :revolut_pay, :sepa_debit, :sofort, :type, :us_bank_account + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field au_becs_debit + attr_reader :au_becs_debit + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field bancontact + attr_reader :bancontact + # Attribute for field boleto + attr_reader :boleto + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field cashapp + attr_reader :cashapp + # Attribute for field id_bank_transfer + attr_reader :id_bank_transfer + # Attribute for field ideal + attr_reader :ideal + # Attribute for field kakao_pay + attr_reader :kakao_pay + # Attribute for field klarna + attr_reader :klarna + # Attribute for field kr_card + attr_reader :kr_card + # Attribute for field link + attr_reader :link + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field revolut_pay + attr_reader :revolut_pay + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field sofort + attr_reader :sofort + # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class SetupError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A filter on the list, based on the object `created` field. The value + # can be a string with an integer Unix timestamp or a + # dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return SetupAttempts created by the SetupIntent specified by + # this ID. + attr_accessor :setup_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + setup_intent: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @setup_intent = setup_intent + @starting_after = starting_after + end end # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. attr_reader :application @@ -116,8 +388,8 @@ class SetupError < Stripe::StripeObject attr_reader :usage # Returns a list of SetupAttempts that associate with a provided SetupIntent. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/setup_attempts", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/setup_attempts", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/setup_intent.rb b/lib/stripe/resources/setup_intent.rb index 9bad042b4..3436b3197 100644 --- a/lib/stripe/resources/setup_intent.rb +++ b/lib/stripe/resources/setup_intent.rb @@ -34,101 +34,3923 @@ def self.object_name end class AutomaticPaymentMethods < Stripe::StripeObject - attr_reader :allow_redirects, :enabled + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + attr_reader :allow_redirects + # Automatically calculates compatible payment methods + attr_reader :enabled end class LastSetupError < Stripe::StripeObject - attr_reader :charge, :code, :decline_code, :doc_url, :message, :network_advice_code, :network_decline_code, :param, :payment_intent, :payment_method, :payment_method_type, :request_log_url, :setup_intent, :source, :type + # For card errors, the ID of the failed charge. + attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. + attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. + attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. + attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. + attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. + attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. + attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. + attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. + attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) + attr_reader :setup_intent + # Attribute for field source + attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` + attr_reader :type end class NextAction < Stripe::StripeObject class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject - attr_reader :expires_at, :image_url_png, :image_url_svg + # The date (unix timestamp) when the QR code expires. + attr_reader :expires_at + # The image_url_png string used to render QR code + attr_reader :image_url_png + # The image_url_svg string used to render QR code + attr_reader :image_url_svg end - attr_reader :hosted_instructions_url, :mobile_auth_url, :qr_code + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. + attr_reader :hosted_instructions_url + # The url for mobile redirect based auth + attr_reader :mobile_auth_url + # Attribute for field qr_code + attr_reader :qr_code end class RedirectToUrl < Stripe::StripeObject - attr_reader :return_url, :url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. + attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate. + attr_reader :url end class VerifyWithMicrodeposits < Stripe::StripeObject - attr_reader :arrival_date, :hosted_verification_url, :microdeposit_type + # The timestamp when the microdeposits are expected to land. + attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. + attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. + attr_reader :microdeposit_type end - attr_reader :cashapp_handle_redirect_or_display_qr_code, :redirect_to_url, :type, :use_stripe_sdk, :verify_with_microdeposits + # Attribute for field cashapp_handle_redirect_or_display_qr_code + attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field redirect_to_url + attr_reader :redirect_to_url + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. + attr_reader :type + # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. + attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits + attr_reader :verify_with_microdeposits end class PaymentMethodConfigurationDetails < Stripe::StripeObject - attr_reader :id, :parent + # ID of the payment method configuration used. + attr_reader :id + # ID of the parent payment method configuration used. + attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :custom_mandate_url, :default_for, :interval_description, :payment_schedule, :transaction_type + # A URL for custom mandate text + attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. + attr_reader :interval_description + # Payment schedule for the mandate. + attr_reader :payment_schedule + # Transaction type of the mandate. + attr_reader :transaction_type end - attr_reader :currency, :mandate_options, :verification_method + # Currency supported by the bank account + attr_reader :currency + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class AmazonPay < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. attr_reader :reference_prefix end + # Attribute for field mandate_options attr_reader :mandate_options end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :currency, :description, :end_date, :interval, :interval_count, :reference, :start_date, :supported_types + # Amount to be charged for future payments. + attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_reader :amount_type + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_reader :interval_count + # Unique identifier for the mandate or subscription. + attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_reader :supported_types end - attr_reader :mandate_options, :network, :request_three_d_secure + # Configuration options for setting up an eMandate for cards issued in India. + attr_reader :mandate_options + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. + attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CardPresent < Stripe::StripeObject; end class Link < Stripe::StripeObject + # [Deprecated] This is a legacy parameter that no longer has any function. attr_reader :persistent_token end class Paypal < Stripe::StripeObject - attr_reader :billing_agreement_id, :currency, :subsellers + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_reader :billing_agreement_id + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :end_date, :payment_schedule, :payments_per_period, :purpose, :start_date + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_reader :end_date + # The periodicity at which payments will be collected. + attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_reader :start_date end + # Attribute for field mandate_options attr_reader :mandate_options end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. attr_reader :reference_prefix end + # Attribute for field mandate_options attr_reader :mandate_options end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. attr_reader :mode end - attr_reader :filters, :manual_entry, :permissions, :prefetch, :return_url + # Attribute for field filters + attr_reader :filters + # Attribute for field manual_entry + attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method attr_reader :collection_method end - attr_reader :financial_connections, :mandate_options, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method + end + # Attribute for field acss_debit + attr_reader :acss_debit + # Attribute for field amazon_pay + attr_reader :amazon_pay + # Attribute for field bacs_debit + attr_reader :bacs_debit + # Attribute for field card + attr_reader :card + # Attribute for field card_present + attr_reader :card_present + # Attribute for field link + attr_reader :link + # Attribute for field paypal + attr_reader :paypal + # Attribute for field payto + attr_reader :payto + # Attribute for field sepa_debit + attr_reader :sepa_debit + # Attribute for field us_bank_account + attr_reader :us_bank_account + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_accessor :attach_to_self + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return SetupIntents for the customer specified by this customer ID. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return SetupIntents that associate with the specified payment method. + attr_accessor :payment_method + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + attach_to_self: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_method: nil, + starting_after: nil + ) + super + @attach_to_self = attach_to_self + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_method = payment_method + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + attr_accessor :allow_redirects + # Whether this feature is enabled. + attr_accessor :enabled + + def initialize(allow_redirects: nil, enabled: nil) + super + @allow_redirects = allow_redirects + @enabled = enabled + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Bank account verification method. + attr_accessor :verification_method + + def initialize(currency: nil, mandate_options: nil, verification_method: nil) + super + @currency = currency + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class AmazonPay < Stripe::RequestParams + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @currency = currency + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + attr_accessor :three_d_secure + + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ) + super + @mandate_options = mandate_options + @moto = moto + @network = network + @request_three_d_secure = request_three_d_secure + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + + def initialize(persistent_token: nil) + super + @persistent_token = persistent_token + end + end + + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_accessor :billing_agreement_id + # Attribute for param field currency + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil) + super + @billing_agreement_id = billing_agreement_id + @currency = currency + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation. + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @verification_method = verification_method + end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @amazon_pay = amazon_pay + @bacs_debit = bacs_debit + @card = card + @card_present = card_present + @link = link + @paypal = paypal + @payto = payto + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + + class SingleUse < Stripe::RequestParams + # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_accessor :attach_to_self + # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. + attr_accessor :automatic_payment_methods + # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. + attr_accessor :confirm + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_accessor :flow_directions + # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account ID created for this SetupIntent. + attr_accessor :on_behalf_of + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + attr_accessor :return_url + # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + attr_accessor :single_use + # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + attr_accessor :usage + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + attach_to_self: nil, + automatic_payment_methods: nil, + confirm: nil, + confirmation_token: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + mandate_data: nil, + metadata: nil, + on_behalf_of: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + single_use: nil, + usage: nil, + use_stripe_sdk: nil + ) + super + @attach_to_self = attach_to_self + @automatic_payment_methods = automatic_payment_methods + @confirm = confirm + @confirmation_token = confirmation_token + @customer = customer + @description = description + @expand = expand + @flow_directions = flow_directions + @mandate_data = mandate_data + @metadata = metadata + @on_behalf_of = on_behalf_of + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @return_url = return_url + @single_use = single_use + @usage = usage + @use_stripe_sdk = use_stripe_sdk + end + end + + class RetrieveParams < Stripe::RequestParams + # The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(client_secret: nil, expand: nil) + super + @client_secret = client_secret + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Bank account verification method. + attr_accessor :verification_method + + def initialize(currency: nil, mandate_options: nil, verification_method: nil) + super + @currency = currency + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class AmazonPay < Stripe::RequestParams + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @currency = currency + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + attr_accessor :three_d_secure + + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ) + super + @mandate_options = mandate_options + @moto = moto + @network = network + @request_three_d_secure = request_three_d_secure + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + + def initialize(persistent_token: nil) + super + @persistent_token = persistent_token + end + end + + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_accessor :billing_agreement_id + # Attribute for param field currency + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil) + super + @billing_agreement_id = billing_agreement_id + @currency = currency + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation. + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @verification_method = verification_method + end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @amazon_pay = amazon_pay + @bacs_debit = bacs_debit + @card = card + @card_present = card_present + @link = link + @paypal = paypal + @payto = payto + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_accessor :attach_to_self + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_accessor :flow_directions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + + def initialize( + attach_to_self: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + metadata: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil + ) + super + @attach_to_self = attach_to_self + @customer = customer + @description = description + @expand = expand + @flow_directions = flow_directions + @metadata = metadata + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + end + end + + class CancelParams < Stripe::RequestParams + # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(cancellation_reason: nil, expand: nil) + super + @cancellation_reason = cancellation_reason + @expand = expand + end + end + + class ConfirmParams < Stripe::RequestParams + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Bank account verification method. + attr_accessor :verification_method + + def initialize(currency: nil, mandate_options: nil, verification_method: nil) + super + @currency = currency + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class AmazonPay < Stripe::RequestParams + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @currency = currency + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + attr_accessor :three_d_secure + + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ) + super + @mandate_options = mandate_options + @moto = moto + @network = network + @request_three_d_secure = request_three_d_secure + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + + def initialize(persistent_token: nil) + super + @persistent_token = persistent_token + end + end + + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_accessor :billing_agreement_id + # Attribute for param field currency + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil) + super + @billing_agreement_id = billing_agreement_id + @currency = currency + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation. + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @verification_method = verification_method + end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @amazon_pay = amazon_pay + @bacs_debit = bacs_debit + @card = card + @card_present = card_present + @link = link + @paypal = paypal + @payto = payto + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field mandate_data + attr_accessor :mandate_data + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + attr_accessor :payment_method + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + attr_accessor :payment_method_options + # The URL to redirect your customer back to after they authenticate on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + attr_accessor :return_url + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + confirmation_token: nil, + expand: nil, + mandate_data: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + return_url: nil, + use_stripe_sdk: nil + ) + super + @confirmation_token = confirmation_token + @expand = expand + @mandate_data = mandate_data + @payment_method = payment_method + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @return_url = return_url + @use_stripe_sdk = use_stripe_sdk + end + end + + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amounts: nil, descriptor_code: nil, expand: nil) + super + @amounts = amounts + @descriptor_code = descriptor_code + @expand = expand end - attr_reader :acss_debit, :amazon_pay, :bacs_debit, :card, :card_present, :link, :paypal, :payto, :sepa_debit, :us_bank_account end # ID of the Connect application that created the SetupIntent. attr_reader :application @@ -270,8 +4092,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of SetupIntents. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/setup_intents", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/setup_intents", params: params, opts: opts) end # Updates a SetupIntent object. diff --git a/lib/stripe/resources/shipping_rate.rb b/lib/stripe/resources/shipping_rate.rb index d3d42f641..b2e3ceb90 100644 --- a/lib/stripe/resources/shipping_rate.rb +++ b/lib/stripe/resources/shipping_rate.rb @@ -16,20 +16,249 @@ def self.object_name class DeliveryEstimate < Stripe::StripeObject class Maximum < Stripe::StripeObject - attr_reader :unit, :value + # A unit of time. + attr_reader :unit + # Must be greater than 0. + attr_reader :value end class Minimum < Stripe::StripeObject - attr_reader :unit, :value + # A unit of time. + attr_reader :unit + # Must be greater than 0. + attr_reader :value end - attr_reader :maximum, :minimum + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_reader :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_reader :minimum end class FixedAmount < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject - attr_reader :amount, :tax_behavior + # A non-negative integer in cents representing how much to charge. + attr_reader :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_reader :tax_behavior + end + # A non-negative integer in cents representing how much to charge. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency_options + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return shipping rates that are active or inactive. + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return shipping rates for the given currency. + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @created = created + @currency = currency + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + expand: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @expand = expand + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(currency_options: nil) + super + @currency_options = currency_options + end + end + # Whether the shipping rate can be used for new purchases. Defaults to `true`. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(active: nil, expand: nil, fixed_amount: nil, metadata: nil, tax_behavior: nil) + super + @active = active + @expand = expand + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior end - attr_reader :amount, :currency, :currency_options end # Whether the shipping rate can be used for new purchases. Defaults to `true`. attr_reader :active @@ -62,8 +291,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your shipping rates. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/shipping_rates", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/shipping_rates", params: params, opts: opts) end # Updates an existing shipping rate object. diff --git a/lib/stripe/resources/sigma/scheduled_query_run.rb b/lib/stripe/resources/sigma/scheduled_query_run.rb index 08cdacc6a..dd253952f 100644 --- a/lib/stripe/resources/sigma/scheduled_query_run.rb +++ b/lib/stripe/resources/sigma/scheduled_query_run.rb @@ -16,8 +16,38 @@ def self.object_name end class Error < Stripe::StripeObject + # Information about the run failure. attr_reader :message end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # When the query was run, Sigma contained a snapshot of your Stripe data at this time. @@ -42,11 +72,11 @@ class Error < Stripe::StripeObject attr_reader :title # Returns a list of scheduled query runs. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/sigma/scheduled_query_runs", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/source.rb b/lib/stripe/resources/source.rb index c52fb9fe1..cc7c8496a 100644 --- a/lib/stripe/resources/source.rb +++ b/lib/stripe/resources/source.rb @@ -25,120 +25,1182 @@ def self.object_name nested_resource_class_methods :source_transaction, operations: %i[retrieve list] class AchCreditTransfer < Stripe::StripeObject - attr_reader :account_number, :bank_name, :fingerprint, :refund_account_holder_name, :refund_account_holder_type, :refund_routing_number, :routing_number, :swift_code + # Attribute for field account_number + attr_reader :account_number + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field refund_account_holder_name + attr_reader :refund_account_holder_name + # Attribute for field refund_account_holder_type + attr_reader :refund_account_holder_type + # Attribute for field refund_routing_number + attr_reader :refund_routing_number + # Attribute for field routing_number + attr_reader :routing_number + # Attribute for field swift_code + attr_reader :swift_code end class AchDebit < Stripe::StripeObject - attr_reader :bank_name, :country, :fingerprint, :last4, :routing_number, :type + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field country + attr_reader :country + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 + # Attribute for field routing_number + attr_reader :routing_number + # Attribute for field type + attr_reader :type end class AcssDebit < Stripe::StripeObject - attr_reader :bank_address_city, :bank_address_line_1, :bank_address_line_2, :bank_address_postal_code, :bank_name, :category, :country, :fingerprint, :last4, :routing_number + # Attribute for field bank_address_city + attr_reader :bank_address_city + # Attribute for field bank_address_line_1 + attr_reader :bank_address_line_1 + # Attribute for field bank_address_line_2 + attr_reader :bank_address_line_2 + # Attribute for field bank_address_postal_code + attr_reader :bank_address_postal_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field category + attr_reader :category + # Attribute for field country + attr_reader :country + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 + # Attribute for field routing_number + attr_reader :routing_number end class Alipay < Stripe::StripeObject - attr_reader :data_string, :native_url, :statement_descriptor + # Attribute for field data_string + attr_reader :data_string + # Attribute for field native_url + attr_reader :native_url + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class AuBecsDebit < Stripe::StripeObject - attr_reader :bsb_number, :fingerprint, :last4 + # Attribute for field bsb_number + attr_reader :bsb_number + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 end class Bancontact < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :iban_last4, :preferred_language, :statement_descriptor + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field iban_last4 + attr_reader :iban_last4 + # Attribute for field preferred_language + attr_reader :preferred_language + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Card < Stripe::StripeObject - attr_reader :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 + # Attribute for field address_line1_check + attr_reader :address_line1_check + # Attribute for field address_zip_check + attr_reader :address_zip_check + # Attribute for field brand + attr_reader :brand + # Attribute for field country + attr_reader :country + # Attribute for field cvc_check + attr_reader :cvc_check + # Attribute for field description + attr_reader :description + # Attribute for field dynamic_last4 + attr_reader :dynamic_last4 + # Attribute for field exp_month + attr_reader :exp_month + # Attribute for field exp_year + attr_reader :exp_year + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field funding + attr_reader :funding + # Attribute for field iin + attr_reader :iin + # Attribute for field issuer + attr_reader :issuer + # Attribute for field last4 + attr_reader :last4 + # Attribute for field name + attr_reader :name + # Attribute for field three_d_secure + attr_reader :three_d_secure + # Attribute for field tokenization_method + attr_reader :tokenization_method end class CardPresent < Stripe::StripeObject - attr_reader :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 + # Attribute for field application_cryptogram + attr_reader :application_cryptogram + # Attribute for field application_preferred_name + attr_reader :application_preferred_name + # Attribute for field authorization_code + attr_reader :authorization_code + # Attribute for field authorization_response_code + attr_reader :authorization_response_code + # Attribute for field brand + attr_reader :brand + # Attribute for field country + attr_reader :country + # Attribute for field cvm_type + attr_reader :cvm_type + # Attribute for field data_type + attr_reader :data_type + # Attribute for field dedicated_file_name + attr_reader :dedicated_file_name + # Attribute for field description + attr_reader :description + # Attribute for field emv_auth_data + attr_reader :emv_auth_data + # Attribute for field evidence_customer_signature + attr_reader :evidence_customer_signature + # Attribute for field evidence_transaction_certificate + attr_reader :evidence_transaction_certificate + # Attribute for field exp_month + attr_reader :exp_month + # Attribute for field exp_year + attr_reader :exp_year + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field funding + attr_reader :funding + # Attribute for field iin + attr_reader :iin + # Attribute for field issuer + attr_reader :issuer + # Attribute for field last4 + attr_reader :last4 + # Attribute for field pos_device_id + attr_reader :pos_device_id + # Attribute for field pos_entry_mode + attr_reader :pos_entry_mode + # Attribute for field read_method + attr_reader :read_method + # Attribute for field reader + attr_reader :reader + # Attribute for field terminal_verification_results + attr_reader :terminal_verification_results + # Attribute for field transaction_status_information + attr_reader :transaction_status_information end class CodeVerification < Stripe::StripeObject - attr_reader :attempts_remaining, :status + # The number of attempts remaining to authenticate the source object with a verification code. + attr_reader :attempts_remaining + # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). + attr_reader :status end class Eps < Stripe::StripeObject - attr_reader :reference, :statement_descriptor + # Attribute for field reference + attr_reader :reference + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Giropay < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :statement_descriptor + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Ideal < Stripe::StripeObject - attr_reader :bank, :bic, :iban_last4, :statement_descriptor + # Attribute for field bank + attr_reader :bank + # Attribute for field bic + attr_reader :bic + # Attribute for field iban_last4 + attr_reader :iban_last4 + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class Klarna < Stripe::StripeObject - attr_reader :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 + # Attribute for field background_image_url + attr_reader :background_image_url + # Attribute for field client_token + attr_reader :client_token + # Attribute for field first_name + attr_reader :first_name + # Attribute for field last_name + attr_reader :last_name + # Attribute for field locale + attr_reader :locale + # Attribute for field logo_url + attr_reader :logo_url + # Attribute for field page_title + attr_reader :page_title + # Attribute for field pay_later_asset_urls_descriptive + attr_reader :pay_later_asset_urls_descriptive + # Attribute for field pay_later_asset_urls_standard + attr_reader :pay_later_asset_urls_standard + # Attribute for field pay_later_name + attr_reader :pay_later_name + # Attribute for field pay_later_redirect_url + attr_reader :pay_later_redirect_url + # Attribute for field pay_now_asset_urls_descriptive + attr_reader :pay_now_asset_urls_descriptive + # Attribute for field pay_now_asset_urls_standard + attr_reader :pay_now_asset_urls_standard + # Attribute for field pay_now_name + attr_reader :pay_now_name + # Attribute for field pay_now_redirect_url + attr_reader :pay_now_redirect_url + # Attribute for field pay_over_time_asset_urls_descriptive + attr_reader :pay_over_time_asset_urls_descriptive + # Attribute for field pay_over_time_asset_urls_standard + attr_reader :pay_over_time_asset_urls_standard + # Attribute for field pay_over_time_name + attr_reader :pay_over_time_name + # Attribute for field pay_over_time_redirect_url + attr_reader :pay_over_time_redirect_url + # Attribute for field payment_method_categories + attr_reader :payment_method_categories + # Attribute for field purchase_country + attr_reader :purchase_country + # Attribute for field purchase_type + attr_reader :purchase_type + # Attribute for field redirect_url + attr_reader :redirect_url + # Attribute for field shipping_delay + attr_reader :shipping_delay + # Attribute for field shipping_first_name + attr_reader :shipping_first_name + # Attribute for field shipping_last_name + attr_reader :shipping_last_name end class Multibanco < Stripe::StripeObject - attr_reader :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 + # Attribute for field entity + attr_reader :entity + # Attribute for field reference + attr_reader :reference + # Attribute for field refund_account_holder_address_city + attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country + attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 + attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 + attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code + attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state + attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name + attr_reader :refund_account_holder_name + # Attribute for field refund_iban + attr_reader :refund_iban end class Owner < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end class VerifiedAddress < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name, :phone, :verified_address, :verified_email, :verified_name, :verified_phone + # Owner's address. + attr_reader :address + # Owner's email address. + attr_reader :email + # Owner's full name. + attr_reader :name + # Owner's phone number (including extension). + attr_reader :phone + # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_address + # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_email + # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_name + # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. + attr_reader :verified_phone end class P24 < Stripe::StripeObject + # Attribute for field reference attr_reader :reference end class Paypal < Stripe::StripeObject - attr_reader :billing_agreement, :fingerprint, :payer_id, :reference_id, :reference_transaction_amount, :reference_transaction_charged, :statement_descriptor, :transaction_id, :verified_email + # Attribute for field billing_agreement + attr_reader :billing_agreement + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field payer_id + attr_reader :payer_id + # Attribute for field reference_id + attr_reader :reference_id + # Attribute for field reference_transaction_amount + attr_reader :reference_transaction_amount + # Attribute for field reference_transaction_charged + attr_reader :reference_transaction_charged + # Attribute for field statement_descriptor + attr_reader :statement_descriptor + # Attribute for field transaction_id + attr_reader :transaction_id + # Attribute for field verified_email + attr_reader :verified_email end class Receiver < Stripe::StripeObject - attr_reader :address, :amount_charged, :amount_received, :amount_returned, :refund_attributes_method, :refund_attributes_status + # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. + attr_reader :address + # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. + attr_reader :amount_charged + # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. + attr_reader :amount_received + # The total amount that was returned to the customer. The amount returned is expressed in the source's currency. + attr_reader :amount_returned + # Type of refund attribute method, one of `email`, `manual`, or `none`. + attr_reader :refund_attributes_method + # Type of refund attribute status, one of `missing`, `requested`, or `available`. + attr_reader :refund_attributes_status end class Redirect < Stripe::StripeObject - attr_reader :failure_reason, :return_url, :status, :url + # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. + attr_reader :failure_reason + # The URL you provide to redirect the customer to after they authenticated their payment. + attr_reader :return_url + # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). + attr_reader :status + # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. + attr_reader :url end class SepaCreditTransfer < Stripe::StripeObject - attr_reader :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 + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field iban + attr_reader :iban + # Attribute for field refund_account_holder_address_city + attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country + attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 + attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 + attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code + attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state + attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name + attr_reader :refund_account_holder_name + # Attribute for field refund_iban + attr_reader :refund_iban end class SepaDebit < Stripe::StripeObject - attr_reader :bank_code, :branch_code, :country, :fingerprint, :last4, :mandate_reference, :mandate_url + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field branch_code + attr_reader :branch_code + # Attribute for field country + attr_reader :country + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field last4 + attr_reader :last4 + # Attribute for field mandate_reference + attr_reader :mandate_reference + # Attribute for field mandate_url + attr_reader :mandate_url end class Sofort < Stripe::StripeObject - attr_reader :bank_code, :bank_name, :bic, :country, :iban_last4, :preferred_language, :statement_descriptor + # Attribute for field bank_code + attr_reader :bank_code + # Attribute for field bank_name + attr_reader :bank_name + # Attribute for field bic + attr_reader :bic + # Attribute for field country + attr_reader :country + # Attribute for field iban_last4 + attr_reader :iban_last4 + # Attribute for field preferred_language + attr_reader :preferred_language + # Attribute for field statement_descriptor + attr_reader :statement_descriptor end class SourceOrder < Stripe::StripeObject class Item < Stripe::StripeObject - attr_reader :amount, :currency, :description, :parent, :quantity, :type + # The amount (price) for this order item. + attr_reader :amount + # This currency of this order item. Required when `amount` is present. + attr_reader :currency + # Human-readable description for this order item. + attr_reader :description + # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). + attr_reader :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + attr_reader :quantity + # The type of this order item. Must be `sku`, `tax`, or `shipping`. + attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :carrier, :name, :phone, :tracking_number + # Attribute for field address + attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_reader :carrier + # Recipient name. + attr_reader :name + # Recipient phone (including extension). + attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_reader :tracking_number end - attr_reader :amount, :currency, :email, :items, :shipping + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. + attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # The email address of the customer placing the order. + attr_reader :email + # List of items constituting the order. + attr_reader :items + # Attribute for field shipping + attr_reader :shipping end class ThreeDSecure < Stripe::StripeObject - attr_reader :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 + # Attribute for field address_line1_check + attr_reader :address_line1_check + # Attribute for field address_zip_check + attr_reader :address_zip_check + # Attribute for field authenticated + attr_reader :authenticated + # Attribute for field brand + attr_reader :brand + # Attribute for field card + attr_reader :card + # Attribute for field country + attr_reader :country + # Attribute for field customer + attr_reader :customer + # Attribute for field cvc_check + attr_reader :cvc_check + # Attribute for field description + attr_reader :description + # Attribute for field dynamic_last4 + attr_reader :dynamic_last4 + # Attribute for field exp_month + attr_reader :exp_month + # Attribute for field exp_year + attr_reader :exp_year + # Attribute for field fingerprint + attr_reader :fingerprint + # Attribute for field funding + attr_reader :funding + # Attribute for field iin + attr_reader :iin + # Attribute for field issuer + attr_reader :issuer + # Attribute for field last4 + attr_reader :last4 + # Attribute for field name + attr_reader :name + # Attribute for field three_d_secure + attr_reader :three_d_secure + # Attribute for field tokenization_method + attr_reader :tokenization_method end class Wechat < Stripe::StripeObject - attr_reader :prepay_id, :qr_code_url, :statement_descriptor + # Attribute for field prepay_id + attr_reader :prepay_id + # Attribute for field qr_code_url + attr_reader :qr_code_url + # Attribute for field statement_descriptor + attr_reader :statement_descriptor + end + + class RetrieveParams < Stripe::RequestParams + # The client secret of the source. Required if a publishable key is used to retrieve the source. + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(client_secret: nil, expand: nil) + super + @client_secret = client_secret + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + attr_accessor :contact_email + + def initialize(contact_email: nil) + super + @contact_email = contact_email + end + end + + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ) + super + @date = date + @ip = ip + @offline = offline + @online = online + @status = status + @type = type + @user_agent = user_agent + end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + attr_accessor :notification_method + + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ) + super + @acceptance = acceptance + @amount = amount + @currency = currency + @interval = interval + @notification_method = notification_method + end + end + + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Owner's address. + attr_accessor :address + # Owner's email address. + attr_accessor :email + # Owner's full name. + attr_accessor :name + # Owner's phone number. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + attr_accessor :amount + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field description + attr_accessor :description + # The ID of the SKU being ordered. + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + attr_accessor :quantity + # Attribute for param field type + attr_accessor :type + + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ) + super + @amount = amount + @currency = currency + @description = description + @parent = parent + @quantity = quantity + @type = type + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # List of items constituting the order. + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + attr_accessor :shipping + + def initialize(items: nil, shipping: nil) + super + @items = items + @shipping = shipping + end + end + # Amount associated with the source. + attr_accessor :amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + attr_accessor :mandate + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Information about the owner of the payment instrument that may be used or required by particular source types. + attr_accessor :owner + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + attr_accessor :source_order + + def initialize( + amount: nil, + expand: nil, + mandate: nil, + metadata: nil, + owner: nil, + source_order: nil + ) + super + @amount = amount + @expand = expand + @mandate = mandate + @metadata = metadata + @owner = owner + @source_order = source_order + end + end + + class CreateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + attr_accessor :contact_email + + def initialize(contact_email: nil) + super + @contact_email = contact_email + end + end + + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ) + super + @date = date + @ip = ip + @offline = offline + @online = online + @status = status + @type = type + @user_agent = user_agent + end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + attr_accessor :notification_method + + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ) + super + @acceptance = acceptance + @amount = amount + @currency = currency + @interval = interval + @notification_method = notification_method + end + end + + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Owner's address. + attr_accessor :address + # Owner's email address. + attr_accessor :email + # Owner's full name. + attr_accessor :name + # Owner's phone number. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Receiver < Stripe::RequestParams + # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. + attr_accessor :refund_attributes_method + + def initialize(refund_attributes_method: nil) + super + @refund_attributes_method = refund_attributes_method + end + end + + class Redirect < Stripe::RequestParams + # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. + attr_accessor :return_url + + def initialize(return_url: nil) + super + @return_url = return_url + end + end + + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + attr_accessor :amount + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field description + attr_accessor :description + # The ID of the SKU being ordered. + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + attr_accessor :quantity + # Attribute for param field type + attr_accessor :type + + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ) + super + @amount = amount + @currency = currency + @description = description + @parent = parent + @quantity = quantity + @type = type + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # List of items constituting the order. + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + attr_accessor :shipping + + def initialize(items: nil, shipping: nil) + super + @items = items + @shipping = shipping + end + end + # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. + attr_accessor :amount + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. + attr_accessor :currency + # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + attr_accessor :flow + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + attr_accessor :mandate + # Attribute for param field metadata + attr_accessor :metadata + # The source to share. + attr_accessor :original_source + # Information about the owner of the payment instrument that may be used or required by particular source types. + attr_accessor :owner + # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + attr_accessor :receiver + # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + attr_accessor :redirect + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + attr_accessor :source_order + # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. + attr_accessor :statement_descriptor + # An optional token used to create the source. When passed, token properties will override source parameters. + attr_accessor :token + # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) + attr_accessor :type + # Attribute for param field usage + attr_accessor :usage + + def initialize( + amount: nil, + currency: nil, + customer: nil, + expand: nil, + flow: nil, + mandate: nil, + metadata: nil, + original_source: nil, + owner: nil, + receiver: nil, + redirect: nil, + source_order: nil, + statement_descriptor: nil, + token: nil, + type: nil, + usage: nil + ) + super + @amount = amount + @currency = currency + @customer = customer + @expand = expand + @flow = flow + @mandate = mandate + @metadata = metadata + @original_source = original_source + @owner = owner + @receiver = receiver + @redirect = redirect + @source_order = source_order + @statement_descriptor = statement_descriptor + @token = token + @type = type + @usage = usage + end + end + + class VerifyParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The values needed to verify the source. + attr_accessor :values + + def initialize(expand: nil, values: nil) + super + @expand = expand + @values = values + end end # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer diff --git a/lib/stripe/resources/source_mandate_notification.rb b/lib/stripe/resources/source_mandate_notification.rb index ae94aec0c..4cfd71fbf 100644 --- a/lib/stripe/resources/source_mandate_notification.rb +++ b/lib/stripe/resources/source_mandate_notification.rb @@ -12,15 +12,22 @@ def self.object_name end class AcssDebit < Stripe::StripeObject + # The statement descriptor associate with the debit. attr_reader :statement_descriptor end class BacsDebit < Stripe::StripeObject + # Last 4 digits of the account number associated with the debit. attr_reader :last4 end class SepaDebit < Stripe::StripeObject - attr_reader :creditor_identifier, :last4, :mandate_reference + # SEPA creditor ID. + attr_reader :creditor_identifier + # Last 4 digits of the account number associated with the debit. + attr_reader :last4 + # Mandate reference associated with the debit. + attr_reader :mandate_reference end # Attribute for field acss_debit attr_reader :acss_debit diff --git a/lib/stripe/resources/source_transaction.rb b/lib/stripe/resources/source_transaction.rb index 028cf0afc..39ad030e4 100644 --- a/lib/stripe/resources/source_transaction.rb +++ b/lib/stripe/resources/source_transaction.rb @@ -13,23 +13,60 @@ def self.object_name end class AchCreditTransfer < Stripe::StripeObject - attr_reader :customer_data, :fingerprint, :last4, :routing_number + # Customer data associated with the transfer. + attr_reader :customer_data + # Bank account fingerprint associated with the transfer. + attr_reader :fingerprint + # Last 4 digits of the account number associated with the transfer. + attr_reader :last4 + # Routing number associated with the transfer. + attr_reader :routing_number end class ChfCreditTransfer < Stripe::StripeObject - attr_reader :reference, :sender_address_country, :sender_address_line1, :sender_iban, :sender_name + # Reference associated with the transfer. + attr_reader :reference + # Sender's country address. + attr_reader :sender_address_country + # Sender's line 1 address. + attr_reader :sender_address_line1 + # Sender's bank account IBAN. + attr_reader :sender_iban + # Sender's name. + attr_reader :sender_name end class GbpCreditTransfer < Stripe::StripeObject - attr_reader :fingerprint, :funding_method, :last4, :reference, :sender_account_number, :sender_name, :sender_sort_code + # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. + attr_reader :fingerprint + # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. + attr_reader :funding_method + # Last 4 digits of sender account number associated with the transfer. + attr_reader :last4 + # Sender entered arbitrary information about the transfer. + attr_reader :reference + # Sender account number associated with the transfer. + attr_reader :sender_account_number + # Sender name associated with the transfer. + attr_reader :sender_name + # Sender sort code associated with the transfer. + attr_reader :sender_sort_code end class PaperCheck < Stripe::StripeObject - attr_reader :available_at, :invoices + # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. + attr_reader :available_at + # Comma-separated list of invoice IDs associated with the paper check. + attr_reader :invoices end class SepaCreditTransfer < Stripe::StripeObject - attr_reader :reference, :sender_iban, :sender_name + # Reference associated with the transfer. + attr_reader :reference + # Sender's bank account IBAN. + attr_reader :sender_iban + # Sender's name. + attr_reader :sender_name end # Attribute for field ach_credit_transfer attr_reader :ach_credit_transfer diff --git a/lib/stripe/resources/subscription.rb b/lib/stripe/resources/subscription.rb index c883c940e..7671d7d88 100644 --- a/lib/stripe/resources/subscription.rb +++ b/lib/stripe/resources/subscription.rb @@ -18,69 +18,133 @@ def self.object_name class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on this subscription. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingCycleAnchorConfig < Stripe::StripeObject - attr_reader :day_of_month, :hour, :minute, :month, :second + # The day of the month of the billing_cycle_anchor. + attr_reader :day_of_month + # The hour of the day of the billing_cycle_anchor. + attr_reader :hour + # The minute of the hour of the billing_cycle_anchor. + attr_reader :minute + # The month to start full cycle billing periods. + attr_reader :month + # The second of the minute of the billing_cycle_anchor. + attr_reader :second end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class CancellationDetails < Stripe::StripeObject - attr_reader :comment, :feedback, :reason + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + attr_reader :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + attr_reader :feedback + # Why this subscription was canceled. + attr_reader :reason end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :issuer + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + attr_reader :account_tax_ids + # Attribute for field issuer + attr_reader :issuer end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - attr_reader :source_price, :target_price + # The original price to be migrated. + attr_reader :source_price + # The intended resulting price of the migration. + attr_reader :target_price end - attr_reader :errored_at, :failed_transitions, :type + # The time at which the price migration encountered an error. + attr_reader :errored_at + # The involved price pairs in each failed transition. + attr_reader :failed_transitions + # The type of error encountered by the price migration. + attr_reader :type end class PauseCollection < Stripe::StripeObject - attr_reader :behavior, :resumes_at + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_reader :behavior + # The time after which the subscription will resume collecting payments. + attr_reader :resumes_at end class PaymentSettings < Stripe::StripeObject class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. attr_reader :transaction_type end - attr_reader :mandate_options, :verification_method + # Attribute for field mandate_options + attr_reader :mandate_options + # Bank account verification method. + attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. attr_reader :preferred_language end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject - attr_reader :amount, :amount_type, :description + # Amount to be charged for future payments. + attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_reader :description end - attr_reader :mandate_options, :network, :request_three_d_secure + # Attribute for field mandate_options + attr_reader :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. attr_reader :country end - attr_reader :eu_bank_transfer, :type + # Attribute for field eu_bank_transfer + attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_reader :type end - attr_reader :bank_transfer, :funding_type + # Attribute for field bank_transfer + attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_reader :funding_type end class IdBankTransfer < Stripe::StripeObject; end @@ -90,39 +154,1910 @@ class SepaDebit < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject - attr_reader :account_subcategories, :institution + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. + attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. + attr_reader :institution end - attr_reader :filters, :permissions, :prefetch + # Attribute for field filters + attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. + attr_reader :permissions + # Data features requested to be retrieved upon account creation. + attr_reader :prefetch end - attr_reader :financial_connections, :verification_method + # Attribute for field financial_connections + attr_reader :financial_connections + # Bank account verification method. + attr_reader :verification_method end - attr_reader :acss_debit, :bancontact, :card, :customer_balance, :id_bank_transfer, :konbini, :sepa_debit, :us_bank_account + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. + attr_reader :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. + attr_reader :bancontact + # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. + attr_reader :card + # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. + attr_reader :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. + attr_reader :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. + attr_reader :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. + attr_reader :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. + attr_reader :us_bank_account end - attr_reader :payment_method_options, :payment_method_types, :save_default_payment_method + # Payment-method-specific configuration to provide to invoices created by the subscription. + attr_reader :payment_method_options + # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). + attr_reader :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. + attr_reader :save_default_payment_method end class PendingInvoiceItemInterval < Stripe::StripeObject - attr_reader :interval, :interval_count + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + attr_reader :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + attr_reader :interval_count end class PendingUpdate < Stripe::StripeObject - attr_reader :billing_cycle_anchor, :expires_at, :prebilling_iterations, :subscription_items, :trial_end, :trial_from_plan + # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. + attr_reader :billing_cycle_anchor + # The point after which the changes reflected by this update will be discarded and no longer applied. + attr_reader :expires_at + # The number of iterations of prebilling to apply. + attr_reader :prebilling_iterations + # List of subscription items, each with an attached plan, that will be set if the update is applied. + attr_reader :subscription_items + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. + attr_reader :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_reader :trial_from_plan end class Prebilling < Stripe::StripeObject - attr_reader :invoice, :period_end, :period_start, :update_behavior + # ID of the prebilling invoice. + attr_reader :invoice + # The end of the last period for which the invoice pre-bills. + attr_reader :period_end + # The start of the first period for which the invoice pre-bills. + attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + attr_reader :update_behavior end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. attr_reader :end_behavior end + + class CancelParams < Stripe::RequestParams + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + attr_accessor :feedback + + def initialize(comment: nil, feedback: nil) + super + @comment = comment + @feedback = feedback + end + end + # Details about why this subscription was cancelled + attr_accessor :cancellation_details + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. + attr_accessor :invoice_now + # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. + attr_accessor :prorate + + def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil) + super + @cancellation_details = cancellation_details + @expand = expand + @invoice_now = invoice_now + @prorate = prorate + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + attr_accessor :feedback + + def initialize(comment: nil, feedback: nil) + super + @comment = comment + @feedback = feedback + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + # The time after which the subscription will resume collecting payments. + attr_accessor :resumes_at + + def initialize(behavior: nil, resumes_at: nil) + super + @behavior = behavior + @resumes_at = resumes_at + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + + def initialize(amount: nil, amount_type: nil, description: nil) + super + @amount = amount + @amount_type = amount_type + @description = description + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil) + super + @mandate_options = mandate_options + @network = network + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + attr_accessor :save_default_payment_method + + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ) + super + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @save_default_payment_method = save_default_payment_method + end + end + + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + attr_accessor :automatic_tax + # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # Details about why this subscription was cancelled + attr_accessor :cancellation_details + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + attr_accessor :proration_date + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_from_plan + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancellation_details: nil, + collection_method: nil, + coupon: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + pause_collection: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + proration_date: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancellation_details = cancellation_details + @collection_method = collection_method + @coupon = coupon + @days_until_due = days_until_due + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @invoice_settings = invoice_settings + @items = items + @metadata = metadata + @off_session = off_session + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @payment_behavior = payment_behavior + @payment_settings = payment_settings + @pending_invoice_item_interval = pending_invoice_item_interval + @prebilling = prebilling + @promotion_code = promotion_code + @proration_behavior = proration_behavior + @proration_date = proration_date + @transfer_data = transfer_data + @trial_end = trial_end + @trial_from_plan = trial_from_plan + @trial_settings = trial_settings + end + end + + class DeleteDiscountParams < Stripe::RequestParams + end + + class ListParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CurrentPeriodEnd < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CurrentPeriodStart < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Filter subscriptions by their automatic tax settings. + attr_accessor :automatic_tax + # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + attr_accessor :collection_method + # Only return subscriptions that were created during the given date interval. + attr_accessor :created + # Only return subscriptions whose current_period_end falls within the given date interval. + attr_accessor :current_period_end + # Only return subscriptions whose current_period_start falls within the given date interval. + attr_accessor :current_period_start + # The ID of the customer whose subscriptions will be retrieved. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The ID of the plan whose subscriptions will be retrieved. + attr_accessor :plan + # Filter for subscriptions that contain this recurring price ID. + attr_accessor :price + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. + attr_accessor :status + # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. + attr_accessor :test_clock + + def initialize( + automatic_tax: nil, + collection_method: nil, + created: nil, + current_period_end: nil, + current_period_start: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + plan: nil, + price: nil, + starting_after: nil, + status: nil, + test_clock: nil + ) + super + @automatic_tax = automatic_tax + @collection_method = collection_method + @created = created + @current_period_end = current_period_end + @current_period_start = current_period_start + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @plan = plan + @price = price + @starting_after = starting_after + @status = status + @test_clock = test_clock + end + end + + class CreateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingCycleAnchorConfig < Stripe::RequestParams + # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31. + attr_accessor :day_of_month + # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23. + attr_accessor :hour + # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59. + attr_accessor :minute + # The month to start full cycle billing periods. Ranges from 1 to 12. + attr_accessor :month + # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. + attr_accessor :second + + def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil) + super + @day_of_month = day_of_month + @hour = hour + @minute = minute + @month = month + @second = second + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Define options to configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + + def initialize(amount: nil, amount_type: nil, description: nil) + super + @amount = amount + @amount_type = amount_type + @description = description + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil) + super + @mandate_options = mandate_options + @network = network + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + attr_accessor :save_default_payment_method + + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ) + super + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @save_default_payment_method = save_default_payment_method + end + end + + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + attr_accessor :automatic_tax + # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + attr_accessor :backdate_start_date + # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. + attr_accessor :billing_cycle_anchor + # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. + attr_accessor :billing_cycle_anchor_config + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The identifier of the customer to subscribe. + attr_accessor :customer + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + attr_accessor :on_behalf_of + # Only applies to subscriptions with `collection_method=charge_automatically`. + # + # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + # + # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. + # + # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_from_plan + # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + backdate_start_date: nil, + billing_cycle_anchor: nil, + billing_cycle_anchor_config: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + collection_method: nil, + coupon: nil, + currency: nil, + customer: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @backdate_start_date = backdate_start_date + @billing_cycle_anchor = billing_cycle_anchor + @billing_cycle_anchor_config = billing_cycle_anchor_config + @billing_thresholds = billing_thresholds + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @collection_method = collection_method + @coupon = coupon + @currency = currency + @customer = customer + @days_until_due = days_until_due + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @invoice_settings = invoice_settings + @items = items + @metadata = metadata + @off_session = off_session + @on_behalf_of = on_behalf_of + @payment_behavior = payment_behavior + @payment_settings = payment_settings + @pending_invoice_item_interval = pending_invoice_item_interval + @prebilling = prebilling + @promotion_code = promotion_code + @proration_behavior = proration_behavior + @transfer_data = transfer_data + @trial_end = trial_end + @trial_from_plan = trial_from_plan + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class ResumeParams < Stripe::RequestParams + # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + + def initialize( + billing_cycle_anchor: nil, + expand: nil, + proration_behavior: nil, + proration_date: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @expand = expand + @proration_behavior = proration_behavior + @proration_date = proration_date + end + end # ID of the Connect Application that created the subscription. attr_reader :application # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. @@ -290,8 +2225,8 @@ def self.delete_discount(subscription_exposed_id, params = {}, opts = {}) end # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/subscriptions", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/subscriptions", params: params, opts: opts) end # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. diff --git a/lib/stripe/resources/subscription_item.rb b/lib/stripe/resources/subscription_item.rb index 053b0f159..9efd5a295 100644 --- a/lib/stripe/resources/subscription_item.rb +++ b/lib/stripe/resources/subscription_item.rb @@ -22,11 +22,416 @@ def self.object_name resource_plural: "usage_record_summaries" class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type + end + + class DeleteParams < Stripe::RequestParams + # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. + attr_accessor :clear_usage + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + + def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil) + super + @clear_usage = clear_usage + @proration_behavior = proration_behavior + @proration_date = proration_date + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + attr_accessor :off_session + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + attr_accessor :payment_behavior + # The identifier of the new plan for this subscription item. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + off_session: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @expand = expand + @metadata = metadata + @off_session = off_session + @payment_behavior = payment_behavior + @plan = plan + @price = price + @price_data = price_data + @proration_behavior = proration_behavior + @proration_date = proration_date + @quantity = quantity + @tax_rates = tax_rates + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The ID of the subscription whose items will be retrieved. + attr_accessor :subscription + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + subscription: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @subscription = subscription + end + end + + class CreateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + attr_accessor :payment_behavior + # The identifier of the plan to add to the subscription. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + attr_accessor :quantity + # The identifier of the subscription to modify. + attr_accessor :subscription + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + subscription: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @expand = expand + @metadata = metadata + @payment_behavior = payment_behavior + @plan = plan + @price = price + @price_data = price_data + @proration_behavior = proration_behavior + @proration_date = proration_date + @quantity = quantity + @subscription = subscription + @tax_rates = tax_rates + @trial = trial + end end # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period attr_reader :billing_thresholds @@ -98,11 +503,11 @@ def delete(params = {}, opts = {}) end # Returns a list of your subscription items for a given subscription. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/subscription_items", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/subscription_schedule.rb b/lib/stripe/resources/subscription_schedule.rb index 5139ed7ae..16d44df5f 100644 --- a/lib/stripe/resources/subscription_schedule.rb +++ b/lib/stripe/resources/subscription_schedule.rb @@ -16,114 +16,2458 @@ def self.object_name end class CurrentPhase < Stripe::StripeObject - attr_reader :end_date, :start_date + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The start of this phase of the subscription schedule. + attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # Attribute for field issuer + attr_reader :issuer end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end - attr_reader :application_fee_percent, :automatic_tax, :billing_cycle_anchor, :billing_thresholds, :collection_method, :default_payment_method, :description, :invoice_settings, :on_behalf_of, :transfer_data + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # Attribute for field invoice_settings + attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject - attr_reader :source_price, :target_price + # The original price to be migrated. + attr_reader :source_price + # The intended resulting price of the migration. + attr_reader :target_price end - attr_reader :errored_at, :failed_transitions, :type + # The time at which the price migration encountered an error. + attr_reader :errored_at + # The involved price pairs in each failed transition. + attr_reader :failed_transitions + # The type of error encountered by the price migration. + attr_reader :type end class Phase < Stripe::StripeObject class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end - attr_reader :discounts, :price, :quantity, :tax_rates + # The stackable discounts that will be applied to the item. + attr_reader :discounts + # ID of the price used to generate the invoice item. + attr_reader :price + # The quantity of the invoice item. + attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :disabled_reason, :enabled, :liability + # If Stripe disabled automatic tax, this enum describes why. + attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. + attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_reader :liability end class BillingThresholds < Stripe::StripeObject - attr_reader :amount_gte, :reset_billing_cycle_anchor + # Monetary threshold that triggers the subscription to create an invoice + attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. + attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject - attr_reader :account, :type + # The connected account being referenced when `type` is `account`. + attr_reader :account + # Type of the account referenced. + attr_reader :type end - attr_reader :account_tax_ids, :days_until_due, :issuer + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject - attr_reader :timestamp, :type + # The discount end timestamp. + attr_reader :timestamp + # The discount end type. + attr_reader :type end - attr_reader :coupon, :discount, :discount_end, :promotion_code + # ID of the coupon to create a new discount for. + attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_reader :discount + # Details to determine how long the discount should be applied for. + attr_reader :discount_end + # ID of the promotion code to create a new discount for. + attr_reader :promotion_code end class Trial < Stripe::StripeObject - attr_reader :converts_to, :type + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. + attr_reader :converts_to + # Determines the type of trial for this item. + attr_reader :type end - attr_reader :billing_thresholds, :discounts, :metadata, :plan, :price, :quantity, :tax_rates, :trial + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. + attr_reader :metadata + # ID of the plan to which the customer should be subscribed. + attr_reader :plan + # ID of the price to which the customer should be subscribed. + attr_reader :price + # Quantity of the plan to which the customer should be subscribed. + attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. + attr_reader :tax_rates + # Options that configure the trial on the subscription item. + attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. attr_reader :behavior end class TransferData < Stripe::StripeObject - attr_reader :amount_percent, :destination + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. + attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. attr_reader :end_behavior end - attr_reader :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, :pause_collection, :proration_behavior, :start_date, :transfer_data, :trial_continuation, :trial_end, :trial_settings + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. + attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. + attr_reader :application_fee_percent + # Attribute for field automatic_tax + attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. + attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. + attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. + attr_reader :discounts + # The end of this phase of the subscription schedule. + attr_reader :end_date + # The invoice settings applicable during this phase. + attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. + attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. + attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. + attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. + attr_reader :proration_behavior + # The start of this phase of the subscription schedule. + attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries + attr_reader :trial_continuation + # When the trial ends within the phase. + attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. + attr_reader :trial_settings end class Prebilling < Stripe::StripeObject - attr_reader :invoice, :period_end, :period_start, :update_behavior + # ID of the prebilling invoice. + attr_reader :invoice + # The end of the last period for which the invoice pre-bills. + attr_reader :period_end + # The start of the first period for which the invoice pre-bills. + attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. + attr_reader :update_behavior + end + + class ListParams < Stripe::RequestParams + class CanceledAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CompletedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class ReleasedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return subscription schedules that were created canceled the given date interval. + attr_accessor :canceled_at + # Only return subscription schedules that completed during the given date interval. + attr_accessor :completed_at + # Only return subscription schedules that were created during the given date interval. + attr_accessor :created + # Only return subscription schedules for the given customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return subscription schedules that were released during the given date interval. + attr_accessor :released_at + # Only return subscription schedules that have not started yet. + attr_accessor :scheduled + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + canceled_at: nil, + completed_at: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + released_at: nil, + scheduled: nil, + starting_after: nil + ) + super + @canceled_at = canceled_at + @completed_at = completed_at + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @released_at = released_at + @scheduled = scheduled + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ) + super + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @default_payment_method = default_payment_method + @description = description + @invoice_settings = invoice_settings + @on_behalf_of = on_behalf_of + @transfer_data = transfer_data + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # The identifier of the customer to create the subscription schedule for. + attr_accessor :customer + # Object representing the subscription schedule's default settings. + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. + attr_accessor :start_date + + def initialize( + billing_behavior: nil, + customer: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + from_subscription: nil, + metadata: nil, + phases: nil, + prebilling: nil, + start_date: nil + ) + super + @billing_behavior = billing_behavior + @customer = customer + @default_settings = default_settings + @end_behavior = end_behavior + @expand = expand + @from_subscription = from_subscription + @metadata = metadata + @phases = phases + @prebilling = prebilling + @start_date = start_date + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ) + super + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @default_payment_method = default_payment_method + @description = description + @invoice_settings = invoice_settings + @on_behalf_of = on_behalf_of + @transfer_data = transfer_data + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Object representing the subscription schedule's default settings. + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + attr_accessor :proration_behavior + + def initialize( + billing_behavior: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + metadata: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @billing_behavior = billing_behavior + @default_settings = default_settings + @end_behavior = end_behavior + @expand = expand + @metadata = metadata + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class AmendParams < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class AmendmentStart < Stripe::RequestParams + # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + # Start the prebilled period when a specified amendment begins. + attr_accessor :amendment_start + # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_from` value. + attr_accessor :type + + def initialize(amendment_start: nil, timestamp: nil, type: nil) + super + @amendment_start = amendment_start + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The beginning of the prebilled time period. The default value is `now`. + attr_accessor :bill_from + # The end of the prebilled time period. + attr_accessor :bill_until + # When the prebilling invoice should be created. The default value is `now`. + attr_accessor :invoice_at + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil) + super + @bill_from = bill_from + @bill_until = bill_until + @invoice_at = invoice_at + @update_behavior = update_behavior + end + end + + class ScheduleSettings < Stripe::RequestParams + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the amendment changes the currently active phase, + # specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + # Changes to apply to the subscription schedule. + attr_accessor :schedule_settings + + def initialize( + amendments: nil, + expand: nil, + prebilling: nil, + proration_behavior: nil, + schedule_settings: nil + ) + super + @amendments = amendments + @expand = expand + @prebilling = prebilling + @proration_behavior = proration_behavior + @schedule_settings = schedule_settings + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + attr_accessor :prorate + + def initialize(expand: nil, invoice_now: nil, prorate: nil) + super + @expand = expand + @invoice_now = invoice_now + @prorate = prorate + end + end + + class ReleaseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Keep any cancellation on the subscription that the schedule has set + attr_accessor :preserve_cancel_date + + def initialize(expand: nil, preserve_cancel_date: nil) + super + @expand = expand + @preserve_cancel_date = preserve_cancel_date + end end # ID of the Connect Application that created the schedule. attr_reader :application @@ -219,11 +2563,11 @@ def self.create(params = {}, opts = {}) end # Retrieves the list of your subscription schedules. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/subscription_schedules", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/tax/association.rb b/lib/stripe/resources/tax/association.rb index 7c2d100d1..d6be2f349 100644 --- a/lib/stripe/resources/tax/association.rb +++ b/lib/stripe/resources/tax/association.rb @@ -15,23 +15,53 @@ class Committed < Stripe::StripeObject class Reversal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject class Committed < Stripe::StripeObject + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) attr_reader :transaction end class Errored < Stripe::StripeObject - attr_reader :reason, :refund_id + # Details on why we could not commit the reversal Tax Transaction + attr_reader :reason + # The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal. + attr_reader :refund_id end - attr_reader :committed, :errored + # Attribute for field committed + attr_reader :committed + # Attribute for field errored + attr_reader :errored end - attr_reader :status, :status_details + # Status of the attempted Tax Transaction reversal. + attr_reader :status + # Attribute for field status_details + attr_reader :status_details end - attr_reader :reversals, :transaction + # Attempts to create Tax Transaction reversals + attr_reader :reversals + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) + attr_reader :transaction end class Errored < Stripe::StripeObject + # Details on why we could not commit the Tax Transaction attr_reader :reason end - attr_reader :committed, :errored + # Attribute for field committed + attr_reader :committed + # Attribute for field errored + attr_reader :errored + end + + class FindParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id + attr_accessor :payment_intent + + def initialize(expand: nil, payment_intent: nil) + super + @expand = expand + @payment_intent = payment_intent + end end # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. attr_reader :calculation diff --git a/lib/stripe/resources/tax/calculation.rb b/lib/stripe/resources/tax/calculation.rb index 78abe4454..1d5a92262 100644 --- a/lib/stripe/resources/tax/calculation.rb +++ b/lib/stripe/resources/tax/calculation.rb @@ -16,44 +16,369 @@ def self.object_name class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override + # The customer's postal address (for example, home or business location). + attr_reader :address + # The type of customer address provided. + attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). + attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). + attr_reader :tax_ids + # The taxability override used for taxation. + attr_reader :taxability_override end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end + # Attribute for field address attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :display_name, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. + attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. + attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state end class TaxRateDetails < Stripe::StripeObject - attr_reader :display_name, :percentage_decimal, :tax_type + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Attribute for field jurisdiction + attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount end - attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. + attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + attr_reader :tax_code end class TaxBreakdown < Stripe::StripeObject class TaxRateDetails < Stripe::StripeObject class FlatAmount < Stripe::StripeObject - attr_reader :amount, :currency + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # Three-letter ISO currency code, in lowercase. + attr_reader :currency + end + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + attr_reader :flat_amount + # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. + attr_reader :percentage_decimal + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. + attr_reader :rate_type + # State, county, province, or region. + attr_reader :state + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type + end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Specifies whether the tax amount is included in the line item amount. + attr_reader :inclusive + # Attribute for field tax_rate_details + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's postal address (for example, home or business location). + attr_accessor :address + # The type of customer address provided. + attr_accessor :address_source + # The customer's IP address (IPv4 or IPv6). + attr_accessor :ip_address + # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. + attr_accessor :tax_ids + # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. + attr_accessor :taxability_override + + def initialize( + address: nil, + address_source: nil, + ip_address: nil, + tax_ids: nil, + taxability_override: nil + ) + super + @address = address + @address_source = address_source + @ip_address = ip_address + @tax_ids = tax_ids + @taxability_override = taxability_override + end + end + + class LineItem < Stripe::RequestParams + # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + attr_accessor :amount + # If provided, the product's `tax_code` will be used as the line item's `tax_code`. + attr_accessor :product + # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. + attr_accessor :quantity + # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). + attr_accessor :reference + # Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. + attr_accessor :tax_code + + def initialize( + amount: nil, + product: nil, + quantity: nil, + reference: nil, + tax_behavior: nil, + tax_code: nil + ) + super + @amount = amount + @product = product + @quantity = quantity + @reference = reference + @tax_behavior = tax_behavior + @tax_code = tax_code + end + end + + class ShipFromDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end end - attr_reader :country, :flat_amount, :percentage_decimal, :rate_type, :state, :tax_type + # The address from which the goods are being shipped from. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + + class ShippingCost < Stripe::RequestParams + # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + attr_accessor :amount + # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. + attr_accessor :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + attr_accessor :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. + attr_accessor :tax_code + + def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil) + super + @amount = amount + @shipping_rate = shipping_rate + @tax_behavior = tax_behavior + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. + attr_accessor :customer + # Details about the customer, including address and tax IDs. + attr_accessor :customer_details + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A list of items the customer is purchasing. + attr_accessor :line_items + # Details about the address from which the goods are being shipped. + attr_accessor :ship_from_details + # Shipping cost details to be used for the calculation. + attr_accessor :shipping_cost + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + attr_accessor :tax_date + + def initialize( + currency: nil, + customer: nil, + customer_details: nil, + expand: nil, + line_items: nil, + ship_from_details: nil, + shipping_cost: nil, + tax_date: nil + ) + super + @currency = currency + @customer = customer + @customer_details = customer_details + @expand = expand + @line_items = line_items + @ship_from_details = ship_from_details + @shipping_cost = shipping_cost + @tax_date = tax_date end - attr_reader :amount, :inclusive, :tax_rate_details, :taxability_reason, :taxable_amount end # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). attr_reader :amount_total diff --git a/lib/stripe/resources/tax/calculation_line_item.rb b/lib/stripe/resources/tax/calculation_line_item.rb index ebaf3d4ff..09dea0778 100644 --- a/lib/stripe/resources/tax/calculation_line_item.rb +++ b/lib/stripe/resources/tax/calculation_line_item.rb @@ -11,13 +11,36 @@ def self.object_name class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :display_name, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. + attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. + attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state end class TaxRateDetails < Stripe::StripeObject - attr_reader :display_name, :percentage_decimal, :tax_type + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Attribute for field jurisdiction + attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount end # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. attr_reader :amount diff --git a/lib/stripe/resources/tax/form.rb b/lib/stripe/resources/tax/form.rb index e519aff9f..37032b977 100644 --- a/lib/stripe/resources/tax/form.rb +++ b/lib/stripe/resources/tax/form.rb @@ -15,47 +15,147 @@ def self.object_name end class AuSerr < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class CaMrdp < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class EuDac7 < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class FilingStatus < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`. + attr_reader :country + # Indicates the level of the jurisdiction where the form was filed. + attr_reader :level + # [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. + attr_reader :state end - attr_reader :effective_at, :jurisdiction, :value + # Time when the filing status was updated. + attr_reader :effective_at + # Attribute for field jurisdiction + attr_reader :jurisdiction + # The current status of the filed form. + attr_reader :value end class GbMrdp < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class NzMrdp < Stripe::StripeObject - attr_reader :reporting_period_end_date, :reporting_period_start_date + # End date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. + attr_reader :reporting_period_start_date end class Payee < Stripe::StripeObject - attr_reader :account, :external_reference, :type + # The ID of the payee's Stripe account. + attr_reader :account + # The external reference to this payee. + attr_reader :external_reference + # Either `account` or `external_reference`. + attr_reader :type end class Us1099K < Stripe::StripeObject + # Year represented by the information reported on the tax form. attr_reader :reporting_year end class Us1099Misc < Stripe::StripeObject + # Year represented by the information reported on the tax form. attr_reader :reporting_year end class Us1099Nec < Stripe::StripeObject + # Year represented by the information reported on the tax form. attr_reader :reporting_year end + + class ListParams < Stripe::RequestParams + class Payee < Stripe::RequestParams + # The ID of the Stripe account whose forms will be retrieved. + attr_accessor :account + # The external reference to the payee whose forms will be retrieved. + attr_accessor :external_reference + # Specifies the payee type. Either `account` or `external_reference`. + attr_accessor :type + + def initialize(account: nil, external_reference: nil, type: nil) + super + @account = account + @external_reference = external_reference + @type = type + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The payee whose volume is represented on the tax form. + attr_accessor :payee + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. + attr_accessor :type + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + payee: nil, + starting_after: nil, + type: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @payee = payee + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Attribute for field au_serr attr_reader :au_serr # Attribute for field ca_mrdp @@ -90,8 +190,8 @@ class Us1099Nec < Stripe::StripeObject attr_reader :us_1099_nec # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax/forms", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax/forms", params: params, opts: opts) end # Download the PDF for a tax form. diff --git a/lib/stripe/resources/tax/registration.rb b/lib/stripe/resources/tax/registration.rb index 08d2e9534..4b04f842f 100644 --- a/lib/stripe/resources/tax/registration.rb +++ b/lib/stripe/resources/tax/registration.rb @@ -20,363 +20,2048 @@ def self.object_name class CountryOptions < Stripe::StripeObject class Ae < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class At < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Au < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Be < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Bg < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Bh < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class By < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ca < Stripe::StripeObject class ProvinceStandard < Stripe::StripeObject + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). attr_reader :province end - attr_reader :province_standard, :type + # Attribute for field province_standard + attr_reader :province_standard + # Type of registration in Canada. + attr_reader :type end class Ch < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Cl < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Co < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Cr < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Cy < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Cz < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class De < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Dk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Ec < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ee < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Eg < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Es < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Fi < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Fr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Gb < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ge < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Gr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Hr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Hu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Id < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ie < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Is < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class It < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Jp < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ke < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Kr < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Kz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Lt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Lu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Lv < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Ma < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Md < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Mt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Mx < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class My < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ng < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Nl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class No < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Nz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Om < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Pl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Pt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Ro < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Rs < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Ru < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Sa < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Se < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Sg < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Si < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Sk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. attr_reader :place_of_supply_scheme end - attr_reader :standard, :type + # Attribute for field standard + attr_reader :standard + # Type of registration in an EU country. + attr_reader :type end class Th < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Tr < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Tz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Us < Stripe::StripeObject class LocalAmusementTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. attr_reader :jurisdiction end class LocalLeaseTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. attr_reader :jurisdiction end class StateSalesTax < Stripe::StripeObject class Election < Stripe::StripeObject - attr_reader :jurisdiction, :type + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. + attr_reader :jurisdiction + # The type of the election for the state sales tax registration. + attr_reader :type end + # Elections for the state sales tax registration. attr_reader :elections end - attr_reader :local_amusement_tax, :local_lease_tax, :state, :state_sales_tax, :type + # Attribute for field local_amusement_tax + attr_reader :local_amusement_tax + # Attribute for field local_lease_tax + attr_reader :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + attr_reader :state + # Attribute for field state_sales_tax + attr_reader :state_sales_tax + # Type of registration in the US. + attr_reader :type end class Uz < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Vn < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end class Za < Stripe::StripeObject + # Type of registration in `country`. attr_reader :type end - attr_reader :ae, :at, :au, :be, :bg, :bh, :by, :ca, :ch, :cl, :co, :cr, :cy, :cz, :de, :dk, :ec, :ee, :eg, :es, :fi, :fr, :gb, :ge, :gr, :hr, :hu, :id, :ie, :is, :it, :jp, :ke, :kr, :kz, :lt, :lu, :lv, :ma, :md, :mt, :mx, :my, :ng, :nl, :no, :nz, :om, :pl, :pt, :ro, :rs, :ru, :sa, :se, :sg, :si, :sk, :th, :tr, :tz, :us, :uz, :vn, :za + # Attribute for field ae + attr_reader :ae + # Attribute for field at + attr_reader :at + # Attribute for field au + attr_reader :au + # Attribute for field be + attr_reader :be + # Attribute for field bg + attr_reader :bg + # Attribute for field bh + attr_reader :bh + # Attribute for field by + attr_reader :by + # Attribute for field ca + attr_reader :ca + # Attribute for field ch + attr_reader :ch + # Attribute for field cl + attr_reader :cl + # Attribute for field co + attr_reader :co + # Attribute for field cr + attr_reader :cr + # Attribute for field cy + attr_reader :cy + # Attribute for field cz + attr_reader :cz + # Attribute for field de + attr_reader :de + # Attribute for field dk + attr_reader :dk + # Attribute for field ec + attr_reader :ec + # Attribute for field ee + attr_reader :ee + # Attribute for field eg + attr_reader :eg + # Attribute for field es + attr_reader :es + # Attribute for field fi + attr_reader :fi + # Attribute for field fr + attr_reader :fr + # Attribute for field gb + attr_reader :gb + # Attribute for field ge + attr_reader :ge + # Attribute for field gr + attr_reader :gr + # Attribute for field hr + attr_reader :hr + # Attribute for field hu + attr_reader :hu + # Attribute for field id + attr_reader :id + # Attribute for field ie + attr_reader :ie + # Attribute for field is + attr_reader :is + # Attribute for field it + attr_reader :it + # Attribute for field jp + attr_reader :jp + # Attribute for field ke + attr_reader :ke + # Attribute for field kr + attr_reader :kr + # Attribute for field kz + attr_reader :kz + # Attribute for field lt + attr_reader :lt + # Attribute for field lu + attr_reader :lu + # Attribute for field lv + attr_reader :lv + # Attribute for field ma + attr_reader :ma + # Attribute for field md + attr_reader :md + # Attribute for field mt + attr_reader :mt + # Attribute for field mx + attr_reader :mx + # Attribute for field my + attr_reader :my + # Attribute for field ng + attr_reader :ng + # Attribute for field nl + attr_reader :nl + # Attribute for field no + attr_reader :no + # Attribute for field nz + attr_reader :nz + # Attribute for field om + attr_reader :om + # Attribute for field pl + attr_reader :pl + # Attribute for field pt + attr_reader :pt + # Attribute for field ro + attr_reader :ro + # Attribute for field rs + attr_reader :rs + # Attribute for field ru + attr_reader :ru + # Attribute for field sa + attr_reader :sa + # Attribute for field se + attr_reader :se + # Attribute for field sg + attr_reader :sg + # Attribute for field si + attr_reader :si + # Attribute for field sk + attr_reader :sk + # Attribute for field th + attr_reader :th + # Attribute for field tr + attr_reader :tr + # Attribute for field tz + attr_reader :tz + # Attribute for field us + attr_reader :us + # Attribute for field uz + attr_reader :uz + # Attribute for field vn + attr_reader :vn + # Attribute for field za + attr_reader :za + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the Tax Registration. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class CountryOptions < Stripe::RequestParams + class Ae < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class At < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Au < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Be < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Bg < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Bh < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class By < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ca < Stripe::RequestParams + class ProvinceStandard < Stripe::RequestParams + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + attr_accessor :province + + def initialize(province: nil) + super + @province = province + end + end + # Options for the provincial tax registration. + attr_accessor :province_standard + # Type of registration to be created in Canada. + attr_accessor :type + + def initialize(province_standard: nil, type: nil) + super + @province_standard = province_standard + @type = type + end + end + + class Ch < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Cl < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Co < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Cr < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Cy < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Cz < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class De < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Dk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Ec < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ee < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Eg < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Es < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Fi < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Fr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Gb < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ge < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Gr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Hr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Hu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Id < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ie < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Is < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class It < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Jp < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ke < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Kr < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Kz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Lt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Lu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Lv < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Ma < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Md < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Mt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Mx < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class My < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ng < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Nl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class No < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Nz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Om < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Pl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Pt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Ro < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Rs < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ru < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Sa < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Se < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Sg < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Si < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Sk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Th < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Tr < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Tz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Us < Stripe::RequestParams + class LocalAmusementTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). + attr_accessor :jurisdiction + + def initialize(jurisdiction: nil) + super + @jurisdiction = jurisdiction + end + end + + class LocalLeaseTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). + attr_accessor :jurisdiction + + def initialize(jurisdiction: nil) + super + @jurisdiction = jurisdiction + end + end + + class StateSalesTax < Stripe::RequestParams + class Election < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + attr_accessor :jurisdiction + # The type of the election for the state sales tax registration. + attr_accessor :type + + def initialize(jurisdiction: nil, type: nil) + super + @jurisdiction = jurisdiction + @type = type + end + end + # Elections for the state sales tax registration. + attr_accessor :elections + + def initialize(elections: nil) + super + @elections = elections + end + end + # Options for the local amusement tax registration. + attr_accessor :local_amusement_tax + # Options for the local lease tax registration. + attr_accessor :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + attr_accessor :state + # Options for the state sales tax registration. + attr_accessor :state_sales_tax + # Type of registration to be created in the US. + attr_accessor :type + + def initialize( + local_amusement_tax: nil, + local_lease_tax: nil, + state: nil, + state_sales_tax: nil, + type: nil + ) + super + @local_amusement_tax = local_amusement_tax + @local_lease_tax = local_lease_tax + @state = state + @state_sales_tax = state_sales_tax + @type = type + end + end + + class Uz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Vn < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Za < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # Options for the registration in AE. + attr_accessor :ae + # Options for the registration in AT. + attr_accessor :at + # Options for the registration in AU. + attr_accessor :au + # Options for the registration in BE. + attr_accessor :be + # Options for the registration in BG. + attr_accessor :bg + # Options for the registration in BH. + attr_accessor :bh + # Options for the registration in BY. + attr_accessor :by + # Options for the registration in CA. + attr_accessor :ca + # Options for the registration in CH. + attr_accessor :ch + # Options for the registration in CL. + attr_accessor :cl + # Options for the registration in CO. + attr_accessor :co + # Options for the registration in CR. + attr_accessor :cr + # Options for the registration in CY. + attr_accessor :cy + # Options for the registration in CZ. + attr_accessor :cz + # Options for the registration in DE. + attr_accessor :de + # Options for the registration in DK. + attr_accessor :dk + # Options for the registration in EC. + attr_accessor :ec + # Options for the registration in EE. + attr_accessor :ee + # Options for the registration in EG. + attr_accessor :eg + # Options for the registration in ES. + attr_accessor :es + # Options for the registration in FI. + attr_accessor :fi + # Options for the registration in FR. + attr_accessor :fr + # Options for the registration in GB. + attr_accessor :gb + # Options for the registration in GE. + attr_accessor :ge + # Options for the registration in GR. + attr_accessor :gr + # Options for the registration in HR. + attr_accessor :hr + # Options for the registration in HU. + attr_accessor :hu + # Options for the registration in ID. + attr_accessor :id + # Options for the registration in IE. + attr_accessor :ie + # Options for the registration in IS. + attr_accessor :is + # Options for the registration in IT. + attr_accessor :it + # Options for the registration in JP. + attr_accessor :jp + # Options for the registration in KE. + attr_accessor :ke + # Options for the registration in KR. + attr_accessor :kr + # Options for the registration in KZ. + attr_accessor :kz + # Options for the registration in LT. + attr_accessor :lt + # Options for the registration in LU. + attr_accessor :lu + # Options for the registration in LV. + attr_accessor :lv + # Options for the registration in MA. + attr_accessor :ma + # Options for the registration in MD. + attr_accessor :md + # Options for the registration in MT. + attr_accessor :mt + # Options for the registration in MX. + attr_accessor :mx + # Options for the registration in MY. + attr_accessor :my + # Options for the registration in NG. + attr_accessor :ng + # Options for the registration in NL. + attr_accessor :nl + # Options for the registration in NO. + attr_accessor :no + # Options for the registration in NZ. + attr_accessor :nz + # Options for the registration in OM. + attr_accessor :om + # Options for the registration in PL. + attr_accessor :pl + # Options for the registration in PT. + attr_accessor :pt + # Options for the registration in RO. + attr_accessor :ro + # Options for the registration in RS. + attr_accessor :rs + # Options for the registration in RU. + attr_accessor :ru + # Options for the registration in SA. + attr_accessor :sa + # Options for the registration in SE. + attr_accessor :se + # Options for the registration in SG. + attr_accessor :sg + # Options for the registration in SI. + attr_accessor :si + # Options for the registration in SK. + attr_accessor :sk + # Options for the registration in TH. + attr_accessor :th + # Options for the registration in TR. + attr_accessor :tr + # Options for the registration in TZ. + attr_accessor :tz + # Options for the registration in US. + attr_accessor :us + # Options for the registration in UZ. + attr_accessor :uz + # Options for the registration in VN. + attr_accessor :vn + # Options for the registration in ZA. + attr_accessor :za + + def initialize( + ae: nil, + at: nil, + au: nil, + be: nil, + bg: nil, + bh: nil, + by: nil, + ca: nil, + ch: nil, + cl: nil, + co: nil, + cr: nil, + cy: nil, + cz: nil, + de: nil, + dk: nil, + ec: nil, + ee: nil, + eg: nil, + es: nil, + fi: nil, + fr: nil, + gb: nil, + ge: nil, + gr: nil, + hr: nil, + hu: nil, + id: nil, + ie: nil, + is: nil, + it: nil, + jp: nil, + ke: nil, + kr: nil, + kz: nil, + lt: nil, + lu: nil, + lv: nil, + ma: nil, + md: nil, + mt: nil, + mx: nil, + my: nil, + ng: nil, + nl: nil, + no: nil, + nz: nil, + om: nil, + pl: nil, + pt: nil, + ro: nil, + rs: nil, + ru: nil, + sa: nil, + se: nil, + sg: nil, + si: nil, + sk: nil, + th: nil, + tr: nil, + tz: nil, + us: nil, + uz: nil, + vn: nil, + za: nil + ) + super + @ae = ae + @at = at + @au = au + @be = be + @bg = bg + @bh = bh + @by = by + @ca = ca + @ch = ch + @cl = cl + @co = co + @cr = cr + @cy = cy + @cz = cz + @de = de + @dk = dk + @ec = ec + @ee = ee + @eg = eg + @es = es + @fi = fi + @fr = fr + @gb = gb + @ge = ge + @gr = gr + @hr = hr + @hu = hu + @id = id + @ie = ie + @is = is + @it = it + @jp = jp + @ke = ke + @kr = kr + @kz = kz + @lt = lt + @lu = lu + @lv = lv + @ma = ma + @md = md + @mt = mt + @mx = mx + @my = my + @ng = ng + @nl = nl + @no = no + @nz = nz + @om = om + @pl = pl + @pt = pt + @ro = ro + @rs = rs + @ru = ru + @sa = sa + @se = se + @sg = sg + @si = si + @sk = sk + @th = th + @tr = tr + @tz = tz + @us = us + @uz = uz + @vn = vn + @za = za + end + end + # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. + attr_accessor :active_from + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Specific options for a registration in the specified `country`. + attr_accessor :country_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. + attr_accessor :expires_at + + def initialize( + active_from: nil, + country: nil, + country_options: nil, + expand: nil, + expires_at: nil + ) + super + @active_from = active_from + @country = country + @country_options = country_options + @expand = expand + @expires_at = expires_at + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + attr_accessor :active_from + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + attr_accessor :expires_at + + def initialize(active_from: nil, expand: nil, expires_at: nil) + super + @active_from = active_from + @expand = expand + @expires_at = expires_at + end end # Time at which the registration becomes active. Measured in seconds since the Unix epoch. attr_reader :active_from @@ -408,11 +2093,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of Tax Registration objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/tax/registrations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/tax/settings.rb b/lib/stripe/resources/tax/settings.rb index d7e9cf3a3..5eaa3950d 100644 --- a/lib/stripe/resources/tax/settings.rb +++ b/lib/stripe/resources/tax/settings.rb @@ -15,13 +15,28 @@ def self.object_name end class Defaults < Stripe::StripeObject - attr_reader :tax_behavior, :tax_code + # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. + attr_reader :tax_behavior + # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. + attr_reader :tax_code end class HeadOffice < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end + # Attribute for field address attr_reader :address end @@ -29,9 +44,92 @@ class StatusDetails < Stripe::StripeObject class Active < Stripe::StripeObject; end class Pending < Stripe::StripeObject + # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. attr_reader :missing_fields end - attr_reader :active, :pending + # Attribute for field active + attr_reader :active + # Attribute for field pending + attr_reader :pending + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Defaults < Stripe::RequestParams + # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(tax_behavior: nil, tax_code: nil) + super + @tax_behavior = tax_behavior + @tax_code = tax_code + end + end + + class HeadOffice < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The location of the business for tax purposes. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + # Default configuration to be used on Stripe Tax calculations. + attr_accessor :defaults + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The place where your business is located. + attr_accessor :head_office + + def initialize(defaults: nil, expand: nil, head_office: nil) + super + @defaults = defaults + @expand = expand + @head_office = head_office + end end # Attribute for field defaults attr_reader :defaults diff --git a/lib/stripe/resources/tax/transaction.rb b/lib/stripe/resources/tax/transaction.rb index c9620bccd..03547a495 100644 --- a/lib/stripe/resources/tax/transaction.rb +++ b/lib/stripe/resources/tax/transaction.rb @@ -14,38 +14,243 @@ def self.object_name class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end class TaxId < Stripe::StripeObject - attr_reader :type, :value + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` + attr_reader :type + # The value of the tax ID. + attr_reader :value end - attr_reader :address, :address_source, :ip_address, :tax_ids, :taxability_override + # The customer's postal address (for example, home or business location). + attr_reader :address + # The type of customer address provided. + attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). + attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). + attr_reader :tax_ids + # The taxability override used for taxation. + attr_reader :taxability_override end class Reversal < Stripe::StripeObject + # The `id` of the reversed `Transaction` object. attr_reader :original_transaction end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_reader :state end + # Attribute for field address attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject - attr_reader :country, :display_name, :level, :state + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. + attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. + attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_reader :state end class TaxRateDetails < Stripe::StripeObject - attr_reader :display_name, :percentage_decimal, :tax_type + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". + attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". + attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. + attr_reader :tax_type end - attr_reader :amount, :jurisdiction, :sourcing, :tax_rate_details, :taxability_reason, :taxable_amount + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Attribute for field jurisdiction + attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). + attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. + attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. + attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :taxable_amount + end + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. + attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). + attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) + attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. + attr_reader :tax_code + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateFromCalculationParams < Stripe::RequestParams + # Tax Calculation ID to be used as input when creating the transaction. + attr_accessor :calculation + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. + attr_accessor :posted_at + # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. + attr_accessor :reference + + def initialize(calculation: nil, expand: nil, metadata: nil, posted_at: nil, reference: nil) + super + @calculation = calculation + @expand = expand + @metadata = metadata + @posted_at = posted_at + @reference = reference + end + end + + class CreateReversalParams < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount_tax + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The `id` of the line item to reverse in the original transaction. + attr_accessor :original_line_item + # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. + attr_accessor :quantity + # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. + attr_accessor :reference + + def initialize( + amount: nil, + amount_tax: nil, + metadata: nil, + original_line_item: nil, + quantity: nil, + reference: nil + ) + super + @amount = amount + @amount_tax = amount_tax + @metadata = metadata + @original_line_item = original_line_item + @quantity = quantity + @reference = reference + end + end + + class ShippingCost < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount_tax + + def initialize(amount: nil, amount_tax: nil) + super + @amount = amount + @amount_tax = amount_tax + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. + attr_accessor :flat_amount + # The line item amounts to reverse. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. + attr_accessor :mode + # The ID of the Transaction to partially or fully reverse. + attr_accessor :original_transaction + # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). + attr_accessor :reference + # The shipping cost to reverse. + attr_accessor :shipping_cost + + def initialize( + expand: nil, + flat_amount: nil, + line_items: nil, + metadata: nil, + mode: nil, + original_transaction: nil, + reference: nil, + shipping_cost: nil + ) + super + @expand = expand + @flat_amount = flat_amount + @line_items = line_items + @metadata = metadata + @mode = mode + @original_transaction = original_transaction + @reference = reference + @shipping_cost = shipping_cost end - attr_reader :amount, :amount_tax, :shipping_rate, :tax_behavior, :tax_breakdown, :tax_code end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created diff --git a/lib/stripe/resources/tax/transaction_line_item.rb b/lib/stripe/resources/tax/transaction_line_item.rb index 0ccae0f7d..10880f607 100644 --- a/lib/stripe/resources/tax/transaction_line_item.rb +++ b/lib/stripe/resources/tax/transaction_line_item.rb @@ -10,6 +10,7 @@ def self.object_name end class Reversal < Stripe::StripeObject + # The `id` of the line item to reverse in the original transaction. attr_reader :original_line_item end # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. diff --git a/lib/stripe/resources/tax_code.rb b/lib/stripe/resources/tax_code.rb index f8fcee6f6..b3b6f8099 100644 --- a/lib/stripe/resources/tax_code.rb +++ b/lib/stripe/resources/tax_code.rb @@ -11,6 +11,34 @@ def self.object_name "tax_code" end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # A detailed description of which types of products the tax code represents. attr_reader :description # Unique identifier for the object. @@ -21,8 +49,8 @@ def self.object_name attr_reader :object # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_codes", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_codes", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/tax_id.rb b/lib/stripe/resources/tax_id.rb index 9c03f2481..d259fbb0e 100644 --- a/lib/stripe/resources/tax_id.rb +++ b/lib/stripe/resources/tax_id.rb @@ -17,11 +17,107 @@ def self.object_name end class Owner < Stripe::StripeObject - attr_reader :account, :application, :customer, :type + # The account being referenced when `type` is `account`. + attr_reader :account + # The Connect Application being referenced when `type` is `application`. + attr_reader :application + # The customer being referenced when `type` is `customer`. + attr_reader :customer + # Type of owner referenced. + attr_reader :type end class Verification < Stripe::StripeObject - attr_reader :status, :verified_address, :verified_name + # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. + attr_reader :status + # Verified address. + attr_reader :verified_address + # Verified name. + attr_reader :verified_name + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + attr_accessor :customer + # Type of owner referenced. + attr_accessor :type + + def initialize(account: nil, customer: nil, type: nil) + super + @account = account + @customer = customer + @type = type + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + attr_accessor :owner + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, owner: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @owner = owner + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + attr_accessor :customer + # Type of owner referenced. + attr_accessor :type + + def initialize(account: nil, customer: nil, type: nil) + super + @account = account + @customer = customer + @type = type + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + attr_accessor :owner + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(expand: nil, owner: nil, type: nil, value: nil) + super + @expand = expand + @owner = owner + @type = type + @value = value + end end # Two-letter ISO code representing the country of the tax ID. attr_reader :country @@ -72,8 +168,8 @@ def delete(params = {}, opts = {}) end # Returns a list of tax IDs. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_ids", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_ids", params: params, opts: opts) end end end diff --git a/lib/stripe/resources/tax_rate.rb b/lib/stripe/resources/tax_rate.rb index 6fbcbe304..9eaa76340 100644 --- a/lib/stripe/resources/tax_rate.rb +++ b/lib/stripe/resources/tax_rate.rb @@ -16,7 +16,170 @@ def self.object_name end class FlatAmount < Stripe::StripeObject - attr_reader :amount, :currency + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_reader :amount + # Three-letter ISO currency code, in lowercase. + attr_reader :currency + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Optional flag to filter by tax rates that are either active or inactive (archived). + attr_accessor :active + # Optional range for filtering created date. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + attr_accessor :inclusive + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + inclusive: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @created = created + @ending_before = ending_before + @expand = expand + @inclusive = inclusive + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # This represents the tax rate percent out of 100. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + inclusive: nil, + jurisdiction: nil, + metadata: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @active = active + @country = country + @description = description + @display_name = display_name + @expand = expand + @inclusive = inclusive + @jurisdiction = jurisdiction + @metadata = metadata + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + jurisdiction: nil, + metadata: nil, + state: nil, + tax_type: nil + ) + super + @active = active + @country = country + @description = description + @display_name = display_name + @expand = expand + @jurisdiction = jurisdiction + @metadata = metadata + @state = state + @tax_type = tax_type + end end # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. attr_reader :active @@ -63,8 +226,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/tax_rates", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/tax_rates", params: params, opts: opts) end # Updates an existing tax rate. diff --git a/lib/stripe/resources/terminal/configuration.rb b/lib/stripe/resources/terminal/configuration.rb index 1788977a8..fdf63203f 100644 --- a/lib/stripe/resources/terminal/configuration.rb +++ b/lib/stripe/resources/terminal/configuration.rb @@ -16,87 +16,1037 @@ def self.object_name end class BbposWiseposE < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end class Offline < Stripe::StripeObject + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. attr_reader :enabled end class RebootWindow < Stripe::StripeObject - attr_reader :end_hour, :start_hour + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + attr_reader :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + attr_reader :start_hour end class StripeS700 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end class Tipping < Stripe::StripeObject class Aud < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Cad < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Chf < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Czk < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Dkk < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Eur < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Gbp < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Hkd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Myr < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Nok < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Nzd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Pln < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Sek < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Sgd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end class Usd < Stripe::StripeObject - attr_reader :fixed_amounts, :percentages, :smart_tip_threshold + # Fixed amounts displayed when collecting a tip + attr_reader :fixed_amounts + # Percentages displayed when collecting a tip + attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_reader :smart_tip_threshold end - attr_reader :aud, :cad, :chf, :czk, :dkk, :eur, :gbp, :hkd, :myr, :nok, :nzd, :pln, :sek, :sgd, :usd + # Attribute for field aud + attr_reader :aud + # Attribute for field cad + attr_reader :cad + # Attribute for field chf + attr_reader :chf + # Attribute for field czk + attr_reader :czk + # Attribute for field dkk + attr_reader :dkk + # Attribute for field eur + attr_reader :eur + # Attribute for field gbp + attr_reader :gbp + # Attribute for field hkd + attr_reader :hkd + # Attribute for field myr + attr_reader :myr + # Attribute for field nok + attr_reader :nok + # Attribute for field nzd + attr_reader :nzd + # Attribute for field pln + attr_reader :pln + # Attribute for field sek + attr_reader :sek + # Attribute for field sgd + attr_reader :sgd + # Attribute for field usd + attr_reader :usd end class VerifoneP400 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. attr_reader :splashscreen end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + attr_accessor :start_hour + + def initialize(end_hour: nil, start_hour: nil) + super + @end_hour = end_hour + @start_hour = start_hour + end + end + + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + # Tipping configuration for AUD + attr_accessor :aud + # Tipping configuration for CAD + attr_accessor :cad + # Tipping configuration for CHF + attr_accessor :chf + # Tipping configuration for CZK + attr_accessor :czk + # Tipping configuration for DKK + attr_accessor :dkk + # Tipping configuration for EUR + attr_accessor :eur + # Tipping configuration for GBP + attr_accessor :gbp + # Tipping configuration for HKD + attr_accessor :hkd + # Tipping configuration for MYR + attr_accessor :myr + # Tipping configuration for NOK + attr_accessor :nok + # Tipping configuration for NZD + attr_accessor :nzd + # Tipping configuration for PLN + attr_accessor :pln + # Tipping configuration for SEK + attr_accessor :sek + # Tipping configuration for SGD + attr_accessor :sgd + # Tipping configuration for USD + attr_accessor :usd + + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ) + super + @aud = aud + @cad = cad + @chf = chf + @czk = czk + @dkk = dkk + @eur = eur + @gbp = gbp + @hkd = hkd + @myr = myr + @nok = nok + @nzd = nzd + @pln = pln + @sek = sek + @sgd = sgd + @usd = usd + end + end + + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Name of the configuration + attr_accessor :name + # Configurations for collecting transactions offline. + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + attr_accessor :verifone_p400 + + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ) + super + @bbpos_wisepos_e = bbpos_wisepos_e + @expand = expand + @name = name + @offline = offline + @reboot_window = reboot_window + @stripe_s700 = stripe_s700 + @tipping = tipping + @verifone_p400 = verifone_p400 + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # if present, only return the account default or non-default configurations. + attr_accessor :is_account_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + is_account_default: nil, + limit: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @is_account_default = is_account_default + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + attr_accessor :start_hour + + def initialize(end_hour: nil, start_hour: nil) + super + @end_hour = end_hour + @start_hour = start_hour + end + end + + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + # Tipping configuration for AUD + attr_accessor :aud + # Tipping configuration for CAD + attr_accessor :cad + # Tipping configuration for CHF + attr_accessor :chf + # Tipping configuration for CZK + attr_accessor :czk + # Tipping configuration for DKK + attr_accessor :dkk + # Tipping configuration for EUR + attr_accessor :eur + # Tipping configuration for GBP + attr_accessor :gbp + # Tipping configuration for HKD + attr_accessor :hkd + # Tipping configuration for MYR + attr_accessor :myr + # Tipping configuration for NOK + attr_accessor :nok + # Tipping configuration for NZD + attr_accessor :nzd + # Tipping configuration for PLN + attr_accessor :pln + # Tipping configuration for SEK + attr_accessor :sek + # Tipping configuration for SGD + attr_accessor :sgd + # Tipping configuration for USD + attr_accessor :usd + + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ) + super + @aud = aud + @cad = cad + @chf = chf + @czk = czk + @dkk = dkk + @eur = eur + @gbp = gbp + @hkd = hkd + @myr = myr + @nok = nok + @nzd = nzd + @pln = pln + @sek = sek + @sgd = sgd + @usd = usd + end + end + + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Name of the configuration + attr_accessor :name + # Configurations for collecting transactions offline. + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + attr_accessor :verifone_p400 + + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ) + super + @bbpos_wisepos_e = bbpos_wisepos_e + @expand = expand + @name = name + @offline = offline + @reboot_window = reboot_window + @stripe_s700 = stripe_s700 + @tipping = tipping + @verifone_p400 = verifone_p400 + end + end # Attribute for field bbpos_wisepos_e attr_reader :bbpos_wisepos_e # Unique identifier for the object. @@ -153,11 +1103,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Configuration objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/configurations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/terminal/connection_token.rb b/lib/stripe/resources/terminal/connection_token.rb index 4ed31ccb2..5b3c7d8b9 100644 --- a/lib/stripe/resources/terminal/connection_token.rb +++ b/lib/stripe/resources/terminal/connection_token.rb @@ -14,6 +14,18 @@ def self.object_name "terminal.connection_token" end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + attr_accessor :location + + def initialize(expand: nil, location: nil) + super + @expand = expand + @location = location + end + end # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). attr_reader :location # String representing the object's type. Objects of the same type share the same value. diff --git a/lib/stripe/resources/terminal/location.rb b/lib/stripe/resources/terminal/location.rb index b6645ab85..63af82617 100644 --- a/lib/stripe/resources/terminal/location.rb +++ b/lib/stripe/resources/terminal/location.rb @@ -18,7 +18,168 @@ def self.object_name end class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + attr_accessor :configuration_overrides + # A name for the location. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ) + super + @address = address + @configuration_overrides = configuration_overrides + @display_name = display_name + @expand = expand + @metadata = metadata + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The full address of the location. + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + attr_accessor :configuration_overrides + # A name for the location. Maximum length is 1000 characters. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ) + super + @address = address + @configuration_overrides = configuration_overrides + @display_name = display_name + @expand = expand + @metadata = metadata + end end # Attribute for field address attr_reader :address @@ -69,11 +230,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Location objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/locations", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/terminal/reader.rb b/lib/stripe/resources/terminal/reader.rb index fc6d5e0e4..e00d6e0ce 100644 --- a/lib/stripe/resources/terminal/reader.rb +++ b/lib/stripe/resources/terminal/reader.rb @@ -21,92 +21,724 @@ class Action < Stripe::StripeObject class CollectInputs < Stripe::StripeObject class Input < Stripe::StripeObject class CustomText < Stripe::StripeObject - attr_reader :description, :skip_button, :submit_button, :title + # Customize the default description for this input + attr_reader :description + # Customize the default label for this input's skip button + attr_reader :skip_button + # Customize the default label for this input's submit button + attr_reader :submit_button + # Customize the default title for this input + attr_reader :title end class Email < Stripe::StripeObject + # The collected email address attr_reader :value end class Numeric < Stripe::StripeObject + # The collected number attr_reader :value end class Phone < Stripe::StripeObject + # The collected phone number attr_reader :value end class Selection < Stripe::StripeObject class Choice < Stripe::StripeObject - attr_reader :style, :value + # The button style for the choice + attr_reader :style + # A value to be selected + attr_reader :value end - attr_reader :choices, :value + # List of possible choices to be selected + attr_reader :choices + # The value of the selected choice + attr_reader :value end class Signature < Stripe::StripeObject + # The File ID of a collected signature image attr_reader :value end class Text < Stripe::StripeObject + # The collected text value attr_reader :value end class Toggle < Stripe::StripeObject - attr_reader :default_value, :description, :title, :value + # The toggle's default value + attr_reader :default_value + # The toggle's description text + attr_reader :description + # The toggle's title text + attr_reader :title + # The toggle's collected value + attr_reader :value end - attr_reader :custom_text, :email, :numeric, :phone, :required, :selection, :signature, :skipped, :text, :toggles, :type + # Default text of input being collected. + attr_reader :custom_text + # Information about a email being collected using a reader + attr_reader :email + # Information about a number being collected using a reader + attr_reader :numeric + # Information about a phone number being collected using a reader + attr_reader :phone + # Indicate that this input is required, disabling the skip button. + attr_reader :required + # Information about a selection being collected using a reader + attr_reader :selection + # Information about a signature being collected using a reader + attr_reader :signature + # Indicate that this input was skipped by the user. + attr_reader :skipped + # Information about text being collected using a reader + attr_reader :text + # List of toggles being collected. Values are present if collection is complete. + attr_reader :toggles + # Type of input being collected. + attr_reader :type end - attr_reader :inputs, :metadata + # List of inputs to be collected. + attr_reader :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata end class CollectPaymentMethod < Stripe::StripeObject class CollectConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - attr_reader :enable_customer_cancellation, :skip_tipping, :tipping + # Enable customer initiated cancellation when processing this payment. + attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_reader :skip_tipping + # Represents a per-transaction tipping configuration + attr_reader :tipping end - attr_reader :account, :collect_config, :payment_intent, :payment_method, :stripe_account + # Account the payment intent belongs to. + attr_reader :account + # Represents a per-transaction override of a reader configuration + attr_reader :collect_config + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). + attr_reader :payment_method + # This field will be deprecated. Please use `account` instead. + attr_reader :stripe_account end class ConfirmPaymentIntent < Stripe::StripeObject - attr_reader :account, :payment_intent, :stripe_account + # Account the payment intent belongs to. + attr_reader :account + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # This field will be deprecated. Please use `account` instead. + attr_reader :stripe_account end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). attr_reader :amount_eligible end - attr_reader :enable_customer_cancellation, :skip_tipping, :tipping + # Enable customer initiated cancellation when processing this payment. + attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_reader :skip_tipping + # Represents a per-transaction tipping configuration + attr_reader :tipping end - attr_reader :account, :payment_intent, :process_config, :stripe_account + # Account the payment intent belongs to. + attr_reader :account + # Most recent PaymentIntent processed by the reader. + attr_reader :payment_intent + # Represents a per-transaction override of a reader configuration + attr_reader :process_config + # This field will be deprecated. Please use `account` instead. + attr_reader :stripe_account end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject + # Enable customer initiated cancellation when processing this SetupIntent. attr_reader :enable_customer_cancellation end - attr_reader :generated_card, :process_config, :setup_intent + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. + attr_reader :generated_card + # Represents a per-setup override of a reader configuration + attr_reader :process_config + # Most recent SetupIntent processed by the reader. + attr_reader :setup_intent end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject + # Enable customer initiated cancellation when refunding this payment. attr_reader :enable_customer_cancellation end - attr_reader :account, :amount, :charge, :metadata, :payment_intent, :reason, :refund, :refund_application_fee, :refund_payment_config, :reverse_transfer, :stripe_account + # Account the payment intent belongs to. + attr_reader :account + # The amount being refunded. + attr_reader :amount + # Charge that is being refunded. + attr_reader :charge + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_reader :metadata + # Payment intent that is being refunded. + attr_reader :payment_intent + # The reason for the refund. + attr_reader :reason + # Unique identifier for the refund object. + attr_reader :refund + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + attr_reader :refund_application_fee + # Represents a per-transaction override of a reader configuration + attr_reader :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + attr_reader :reverse_transfer + # This field will be deprecated. Please use `account` instead. + attr_reader :stripe_account end class SetReaderDisplay < Stripe::StripeObject class Cart < Stripe::StripeObject class LineItem < Stripe::StripeObject - attr_reader :amount, :description, :quantity + # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :amount + # Description of the line item. + attr_reader :description + # The quantity of the line item. + attr_reader :quantity + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_reader :currency + # List of line items in the cart. + attr_reader :line_items + # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :tax + # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_reader :total + end + # Cart object to be displayed by the reader. + attr_reader :cart + # Type of information to be displayed by the reader. + attr_reader :type + end + # Represents a reader action to collect customer inputs + attr_reader :collect_inputs + # Represents a reader action to collect a payment method + attr_reader :collect_payment_method + # Represents a reader action to confirm a payment + attr_reader :confirm_payment_intent + # Failure code, only set if status is `failed`. + attr_reader :failure_code + # Detailed failure message, only set if status is `failed`. + attr_reader :failure_message + # Represents a reader action to process a payment intent + attr_reader :process_payment_intent + # Represents a reader action to process a setup intent + attr_reader :process_setup_intent + # Represents a reader action to refund a payment + attr_reader :refund_payment + # Represents a reader action to set the reader display + attr_reader :set_reader_display + # Status of the action performed by the reader. + attr_reader :status + # Type of action performed by the reader. + attr_reader :type + end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The new label of the reader. + attr_accessor :label + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, label: nil, metadata: nil) + super + @expand = expand + @label = label + @metadata = metadata + end + end + + class ListParams < Stripe::RequestParams + # Filters readers by device type + attr_accessor :device_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A location ID to filter the response list to only readers at the specific location + attr_accessor :location + # Filters readers by serial number + attr_accessor :serial_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A status filter to filter readers to only offline or online readers + attr_accessor :status + + def initialize( + device_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + location: nil, + serial_number: nil, + starting_after: nil, + status: nil + ) + super + @device_type = device_type + @ending_before = ending_before + @expand = expand + @limit = limit + @location = location + @serial_number = serial_number + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + attr_accessor :label + # The location to assign the reader to. + attr_accessor :location + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A code generated by the reader used for registering to an account. + attr_accessor :registration_code + + def initialize( + expand: nil, + label: nil, + location: nil, + metadata: nil, + registration_code: nil + ) + super + @expand = expand + @label = label + @location = location + @metadata = metadata + @registration_code = registration_code + end + end + + class CancelActionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CollectInputsParams < Stripe::RequestParams + class Input < Stripe::RequestParams + class CustomText < Stripe::RequestParams + # The description which will be displayed when collecting this input + attr_accessor :description + # The skip button text + attr_accessor :skip_button + # The submit button text + attr_accessor :submit_button + # The title which will be displayed when collecting this input + attr_accessor :title + + def initialize(description: nil, skip_button: nil, submit_button: nil, title: nil) + super + @description = description + @skip_button = skip_button + @submit_button = submit_button + @title = title + end + end + + class Selection < Stripe::RequestParams + class Choice < Stripe::RequestParams + # The style of the button which will be shown for this choice + attr_accessor :style + # The text which will be shown on the button for this choice + attr_accessor :value + + def initialize(style: nil, value: nil) + super + @style = style + @value = value + end + end + # List of choices for the `selection` input + attr_accessor :choices + + def initialize(choices: nil) + super + @choices = choices end - attr_reader :currency, :line_items, :tax, :total end - attr_reader :cart, :type + + class Toggle < Stripe::RequestParams + # The default value of the toggle + attr_accessor :default_value + # The description which will be displayed for the toggle + attr_accessor :description + # The title which will be displayed for the toggle + attr_accessor :title + + def initialize(default_value: nil, description: nil, title: nil) + super + @default_value = default_value + @description = description + @title = title + end + end + # Customize the text which will be displayed while collecting this input + attr_accessor :custom_text + # Indicate that this input is required, disabling the skip button + attr_accessor :required + # Options for the `selection` input + attr_accessor :selection + # List of toggles to be displayed and customization for the toggles + attr_accessor :toggles + # The type of input to collect + attr_accessor :type + + def initialize(custom_text: nil, required: nil, selection: nil, toggles: nil, type: nil) + super + @custom_text = custom_text + @required = required + @selection = selection + @toggles = toggles + @type = type + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of inputs to be collected using the Reader + attr_accessor :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, inputs: nil, metadata: nil) + super + @expand = expand + @inputs = inputs + @metadata = metadata + end + end + + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_accessor :amount_eligible + + def initialize(amount_eligible: nil) + super + @amount_eligible = amount_eligible + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + attr_accessor :tipping + + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ) + super + @allow_redisplay = allow_redisplay + @enable_customer_cancellation = enable_customer_cancellation + @skip_tipping = skip_tipping + @tipping = tipping + end + end + # Configuration overrides + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID + attr_accessor :payment_intent + + def initialize(collect_config: nil, expand: nil, payment_intent: nil) + super + @collect_config = collect_config + @expand = expand + @payment_intent = payment_intent + end + end + + class ConfirmPaymentIntentParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID + attr_accessor :payment_intent + + def initialize(expand: nil, payment_intent: nil) + super + @expand = expand + @payment_intent = payment_intent + end + end + + class ProcessPaymentIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_accessor :amount_eligible + + def initialize(amount_eligible: nil) + super + @amount_eligible = amount_eligible + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + attr_accessor :tipping + + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ) + super + @allow_redisplay = allow_redisplay + @enable_customer_cancellation = enable_customer_cancellation + @skip_tipping = skip_tipping + @tipping = tipping + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID + attr_accessor :payment_intent + # Configuration overrides + attr_accessor :process_config + + def initialize(expand: nil, payment_intent: nil, process_config: nil) + super + @expand = expand + @payment_intent = payment_intent + @process_config = process_config + end + end + + class ProcessSetupIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + + def initialize(enable_customer_cancellation: nil) + super + @enable_customer_cancellation = enable_customer_cancellation + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Configuration overrides + attr_accessor :process_config + # SetupIntent ID + attr_accessor :setup_intent + + def initialize(allow_redisplay: nil, expand: nil, process_config: nil, setup_intent: nil) + super + @allow_redisplay = allow_redisplay + @expand = expand + @process_config = process_config + @setup_intent = setup_intent + end + end + + class RefundPaymentParams < Stripe::RequestParams + class RefundPaymentConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + + def initialize(enable_customer_cancellation: nil) + super + @enable_customer_cancellation = enable_customer_cancellation + end + end + # A positive integer in __cents__ representing how much of this charge to refund. + attr_accessor :amount + # ID of the Charge to refund. + attr_accessor :charge + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # ID of the PaymentIntent to refund. + attr_accessor :payment_intent + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + attr_accessor :refund_application_fee + # Configuration overrides + attr_accessor :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + attr_accessor :reverse_transfer + + def initialize( + amount: nil, + charge: nil, + expand: nil, + metadata: nil, + payment_intent: nil, + refund_application_fee: nil, + refund_payment_config: nil, + reverse_transfer: nil + ) + super + @amount = amount + @charge = charge + @expand = expand + @metadata = metadata + @payment_intent = payment_intent + @refund_application_fee = refund_application_fee + @refund_payment_config = refund_payment_config + @reverse_transfer = reverse_transfer + end + end + + class SetReaderDisplayParams < Stripe::RequestParams + class Cart < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The price of the item in cents. + attr_accessor :amount + # The description or name of the item. + attr_accessor :description + # The quantity of the line item being purchased. + attr_accessor :quantity + + def initialize(amount: nil, description: nil, quantity: nil) + super + @amount = amount + @description = description + @quantity = quantity + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Array of line items that were purchased. + attr_accessor :line_items + # The amount of tax in cents. + attr_accessor :tax + # Total balance of cart due in cents. + attr_accessor :total + + def initialize(currency: nil, line_items: nil, tax: nil, total: nil) + super + @currency = currency + @line_items = line_items + @tax = tax + @total = total + end + end + # Cart + attr_accessor :cart + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Type + attr_accessor :type + + def initialize(cart: nil, expand: nil, type: nil) + super + @cart = cart + @expand = expand + @type = type + end + end + + class PresentPaymentMethodParams < Stripe::RequestParams + class CardPresent < Stripe::RequestParams + # The card number, as a string without any separators. + attr_accessor :number + + def initialize(number: nil) + super + @number = number + end + end + + class InteracPresent < Stripe::RequestParams + # Card Number + attr_accessor :number + + def initialize(number: nil) + super + @number = number + end + end + # Simulated on-reader tip amount. + attr_accessor :amount_tip + # Simulated data for the card_present payment method. + attr_accessor :card_present + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Simulated data for the interac_present payment method. + attr_accessor :interac_present + # Simulated payment type. + attr_accessor :type + + def initialize( + amount_tip: nil, + card_present: nil, + expand: nil, + interac_present: nil, + type: nil + ) + super + @amount_tip = amount_tip + @card_present = card_present + @expand = expand + @interac_present = interac_present + @type = type end - attr_reader :collect_inputs, :collect_payment_method, :confirm_payment_intent, :failure_code, :failure_message, :process_payment_intent, :process_setup_intent, :refund_payment, :set_reader_display, :status, :type end # The most recent action performed by the reader. attr_reader :action @@ -246,11 +878,11 @@ def delete(params = {}, opts = {}) end # Returns a list of Reader objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/terminal/readers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/terminal/reader_collected_data.rb b/lib/stripe/resources/terminal/reader_collected_data.rb index 4f9d1afaa..e9026628a 100644 --- a/lib/stripe/resources/terminal/reader_collected_data.rb +++ b/lib/stripe/resources/terminal/reader_collected_data.rb @@ -11,8 +11,19 @@ def self.object_name end class Magstripe < Stripe::StripeObject + # The raw magstripe data collected by the reader. attr_reader :data end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Unique identifier for the object. diff --git a/lib/stripe/resources/test_helpers/test_clock.rb b/lib/stripe/resources/test_helpers/test_clock.rb index 267261301..e8f91073e 100644 --- a/lib/stripe/resources/test_helpers/test_clock.rb +++ b/lib/stripe/resources/test_helpers/test_clock.rb @@ -18,10 +18,73 @@ def self.object_name class StatusDetails < Stripe::StripeObject class Advancing < Stripe::StripeObject + # The `frozen_time` that the Test Clock is advancing towards. attr_reader :target_frozen_time end + # Attribute for field advancing attr_reader :advancing end + + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The initial frozen time for this test clock. + attr_accessor :frozen_time + # The name for this test clock. + attr_accessor :name + + def initialize(expand: nil, frozen_time: nil, name: nil) + super + @expand = expand + @frozen_time = frozen_time + @name = name + end + end + + class AdvanceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + attr_accessor :frozen_time + + def initialize(expand: nil, frozen_time: nil) + super + @expand = expand + @frozen_time = frozen_time + end + end # Time at which the object was created. Measured in seconds since the Unix epoch. attr_reader :created # Time at which this clock is scheduled to auto delete. @@ -94,11 +157,11 @@ def delete(params = {}, opts = {}) end # Returns a list of your test clocks. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/test_helpers/test_clocks", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/token.rb b/lib/stripe/resources/token.rb index afa3ab24e..0e715e0a1 100644 --- a/lib/stripe/resources/token.rb +++ b/lib/stripe/resources/token.rb @@ -30,6 +30,1163 @@ def self.object_name "token" end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class Account < Stripe::RequestParams + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document verifying the business. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # The company's primary address. + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + attr_accessor :export_purpose_code + # The company's legal name. + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_accessor :ownership_declaration + # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. + attr_accessor :ownership_declaration_shown_and_signed + # The company's phone number (used for verification). + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_accessor :tax_id_registrar + # The VAT number of the company. + attr_accessor :vat_id + # Information on the verification state of the company. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + ownership_declaration_shown_and_signed: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @directors_provided = directors_provided + @executives_provided = executives_provided + @export_license_id = export_license_id + @export_purpose_code = export_purpose_code + @name = name + @name_kana = name_kana + @name_kanji = name_kanji + @owners_provided = owners_provided + @ownership_declaration = ownership_declaration + @ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed + @phone = phone + @registration_number = registration_number + @structure = structure + @tax_id = tax_id + @tax_id_registrar = tax_id_registrar + @vat_id = vat_id + @verification = verification + end + end + + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ) + super + @director = director + @executive = executive + @owner = owner + @percent_ownership = percent_ownership + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # The individual's primary address. + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + attr_accessor :address_kanji + # The individual's date of birth. + attr_accessor :dob + # The individual's email address. + attr_accessor :email + # The individual's first name. + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + attr_accessor :full_name_aliases + # The individual's gender + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The individual's last name. + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + attr_accessor :last_name_kanji + # The individual's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The individual's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The individual's registered address. + attr_accessor :registered_address + # Describes the person’s relationship to the account. + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + attr_accessor :ssn_last_4 + # The individual's verification document information. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + # The business type. + attr_accessor :business_type + # Information about the company or business. + attr_accessor :company + # Information about the person represented by the account. + attr_accessor :individual + # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + attr_accessor :tos_shown_and_accepted + + def initialize( + business_type: nil, + company: nil, + individual: nil, + tos_shown_and_accepted: nil + ) + super + @business_type = business_type + @company = company + @individual = individual + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class BankAccount < Stripe::RequestParams + # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + attr_accessor :account_type + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) + attr_accessor :currency + # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. + attr_accessor :payment_method + # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + account_type: nil, + country: nil, + currency: nil, + payment_method: nil, + routing_number: nil + ) + super + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @country = country + @currency = currency + @payment_method = payment_method + @routing_number = routing_number + end + end + + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + attr_accessor :preferred + + def initialize(preferred: nil) + super + @preferred = preferred + end + end + # City / District / Suburb / Town / Village. + attr_accessor :address_city + # Billing address country, if provided. + attr_accessor :address_country + # Address line 1 (Street address / PO Box / Company name). + attr_accessor :address_line1 + # Address line 2 (Apartment / Suite / Unit / Building). + attr_accessor :address_line2 + # State / County / Province / Region. + attr_accessor :address_state + # ZIP or postal code. + attr_accessor :address_zip + # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. + attr_accessor :currency + # Card security code. Highly recommended to always include this value. + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + attr_accessor :exp_month + # Two- or four-digit number representing the card's expiration year. + attr_accessor :exp_year + # Cardholder's full name. + attr_accessor :name + # Contains information about card networks used to process the payment. + attr_accessor :networks + # The card number, as a string without any separators. + attr_accessor :number + + def initialize( + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + networks: nil, + number: nil + ) + super + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @networks = networks + @number = number + end + end + + class CvcUpdate < Stripe::RequestParams + # The CVC value, in string form. + attr_accessor :cvc + + def initialize(cvc: nil) + super + @cvc = cvc + end + end + + class Person < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + attr_accessor :account + + def initialize(account: nil) + super + @account = account + end + end + + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + attr_accessor :visa + + def initialize(company_authorization: nil, passport: nil, visa: nil) + super + @company_authorization = company_authorization + @passport = passport + @visa = visa + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ) + super + @authorizer = authorizer + @director = director + @executive = executive + @legal_guardian = legal_guardian + @owner = owner + @percent_ownership = percent_ownership + @representative = representative + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + attr_accessor :additional_tos_acceptances + # The person's address. + attr_accessor :address + # The Kana variation of the person's address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + attr_accessor :address_kanji + # The person's date of birth. + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The person's email address. + attr_accessor :email + # The person's first name. + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The person's last name. + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + attr_accessor :last_name_kanji + # The person's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + attr_accessor :nationality + # The person's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The person's registered address. + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + attr_accessor :ssn_last_4 + # The person's verification status. + attr_accessor :verification + + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @additional_tos_acceptances = additional_tos_acceptances + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @documents = documents + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @nationality = nationality + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class Pii < Stripe::RequestParams + # The `id_number` for the PII, in string form. + attr_accessor :id_number + + def initialize(id_number: nil) + super + @id_number = id_number + end + end + # Information for the account this token represents. + attr_accessor :account + # The bank account this token will represent. + attr_accessor :bank_account + # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. + attr_accessor :card + # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + attr_accessor :customer + # The updated CVC value this token represents. + attr_accessor :cvc_update + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information for the person this token represents. + attr_accessor :person + # The PII this token represents. + attr_accessor :pii + + def initialize( + account: nil, + bank_account: nil, + card: nil, + customer: nil, + cvc_update: nil, + expand: nil, + person: nil, + pii: nil + ) + super + @account = account + @bank_account = bank_account + @card = card + @customer = customer + @cvc_update = cvc_update + @expand = expand + @person = person + @pii = pii + end + end # These bank accounts are payment methods on `Customer` objects. # # On the other hand [External Accounts](/api#external_accounts) are transfer diff --git a/lib/stripe/resources/topup.rb b/lib/stripe/resources/topup.rb index b3366fb3a..d3f1d7f7b 100644 --- a/lib/stripe/resources/topup.rb +++ b/lib/stripe/resources/topup.rb @@ -17,6 +17,154 @@ def self.object_name "topup" end + class ListParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A positive integer representing how much to transfer. + attr_accessor :amount + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + attr_accessor :status + + def initialize( + amount: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @amount = amount + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer representing how much to transfer. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + attr_accessor :source + # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + attr_accessor :statement_descriptor + # A string that identifies this top-up as part of a group. + attr_accessor :transfer_group + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + metadata: nil, + source: nil, + statement_descriptor: nil, + transfer_group: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @metadata = metadata + @source = source + @statement_descriptor = statement_descriptor + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Amount transferred. attr_reader :amount # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. @@ -76,8 +224,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of top-ups. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/topups", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/topups", params: params, opts: opts) end # Updates the metadata of a top-up. Other top-up details are not editable by design. diff --git a/lib/stripe/resources/transfer.rb b/lib/stripe/resources/transfer.rb index 2473544fa..656a97634 100644 --- a/lib/stripe/resources/transfer.rb +++ b/lib/stripe/resources/transfer.rb @@ -25,6 +25,129 @@ def self.object_name nested_resource_class_methods :reversal, operations: %i[create retrieve update list] + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return transfers that were created during the given date interval. + attr_accessor :created + # Only return transfers for the destination specified by this account ID. + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return transfers with the specified transfer group. + attr_accessor :transfer_group + + def initialize( + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ) + super + @created = created + @destination = destination + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @transfer_group = transfer_group + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer in cents (or local equivalent) representing how much to transfer. + attr_accessor :amount + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The ID of a connected Stripe account. See the Connect documentation for details. + attr_accessor :destination + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. + attr_accessor :source_transaction + # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + attr_accessor :source_type + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_accessor :transfer_group + + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + source_transaction: nil, + source_type: nil, + transfer_group: nil + ) + super + @amount = amount + @currency = currency + @description = description + @destination = destination + @expand = expand + @metadata = metadata + @source_transaction = source_transaction + @source_type = source_type + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end # Amount in cents (or local equivalent) to be transferred. attr_reader :amount # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). @@ -66,8 +189,8 @@ def self.create(params = {}, opts = {}) end # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. - def self.list(filters = {}, opts = {}) - request_stripe_object(method: :get, path: "/v1/transfers", params: filters, opts: opts) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/transfers", params: params, opts: opts) end # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. diff --git a/lib/stripe/resources/treasury/credit_reversal.rb b/lib/stripe/resources/treasury/credit_reversal.rb index c16a48a7b..d27a8ea38 100644 --- a/lib/stripe/resources/treasury/credit_reversal.rb +++ b/lib/stripe/resources/treasury/credit_reversal.rb @@ -14,8 +14,71 @@ def self.object_name end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the CreditReversal changed status to `posted` attr_reader :posted_at end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return CreditReversals for the ReceivedCredit ID. + attr_accessor :received_credit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return CreditReversals for a given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_credit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @received_credit = received_credit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ReceivedCredit to reverse. + attr_accessor :received_credit + + def initialize(expand: nil, metadata: nil, received_credit: nil) + super + @expand = expand + @metadata = metadata + @received_credit = received_credit + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Amount (in cents) transferred. attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. @@ -56,11 +119,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of CreditReversals. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/credit_reversals", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/debit_reversal.rb b/lib/stripe/resources/treasury/debit_reversal.rb index 394f649e1..cccd51227 100644 --- a/lib/stripe/resources/treasury/debit_reversal.rb +++ b/lib/stripe/resources/treasury/debit_reversal.rb @@ -14,12 +14,80 @@ def self.object_name end class LinkedFlows < Stripe::StripeObject + # Set if there is an Issuing dispute associated with the DebitReversal. attr_reader :issuing_dispute end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the DebitReversal changed status to `completed`. attr_reader :completed_at end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return DebitReversals for the ReceivedDebit ID. + attr_accessor :received_debit + # Only return DebitReversals for a given resolution. + attr_accessor :resolution + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return DebitReversals for a given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_debit: nil, + resolution: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @received_debit = received_debit + @resolution = resolution + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ReceivedDebit to reverse. + attr_accessor :received_debit + + def initialize(expand: nil, metadata: nil, received_debit: nil) + super + @expand = expand + @metadata = metadata + @received_debit = received_debit + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end # Amount (in cents) transferred. attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. @@ -62,11 +130,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of DebitReversals. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/debit_reversals", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/financial_account.rb b/lib/stripe/resources/treasury/financial_account.rb index 9e1ba838a..7a2d0a116 100644 --- a/lib/stripe/resources/treasury/financial_account.rb +++ b/lib/stripe/resources/treasury/financial_account.rb @@ -16,26 +16,714 @@ def self.object_name end class Balance < Stripe::StripeObject - attr_reader :cash, :inbound_pending, :outbound_pending + # Funds the user can spend right now. + attr_reader :cash + # Funds not spendable yet, but will become available at a later time. + attr_reader :inbound_pending + # Funds in the account, but not spendable because they are being held for pending outbound flows. + attr_reader :outbound_pending end class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject - attr_reader :account_holder_name, :account_number, :account_number_last4, :bank_name, :routing_number + # The name of the person or business that owns the bank account. + attr_reader :account_holder_name + # The account number. + attr_reader :account_number + # The last four characters of the account number. + attr_reader :account_number_last4 + # Name of the bank. + attr_reader :bank_name + # Routing number for the account. + attr_reader :routing_number end - attr_reader :aba, :supported_networks, :type + # ABA Records contain U.S. bank account details per the ABA format. + attr_reader :aba + # The list of networks that the address supports + attr_reader :supported_networks + # The type of financial address + attr_reader :type end class PlatformRestrictions < Stripe::StripeObject - attr_reader :inbound_flows, :outbound_flows + # Restricts all inbound money movement. + attr_reader :inbound_flows + # Restricts all outbound money movement. + attr_reader :outbound_flows end class StatusDetails < Stripe::StripeObject class Closed < Stripe::StripeObject + # The array that contains reasons for a FinancialAccount closure. attr_reader :reasons end + # Details related to the closure of this FinancialAccount attr_reader :closed end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return FinancialAccounts that were created during the given date interval. + attr_accessor :created + # An object ID cursor for use in pagination. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit ranging from 1 to 100 (defaults to 10). + attr_accessor :limit + # An object ID cursor for use in pagination. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(bank: nil, requested: nil) + super + @bank = bank + @requested = requested + end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + attr_accessor :aba + + def initialize(aba: nil) + super + @aba = aba + end + end + + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH Debits via the InboundTransfers API. + attr_accessor :ach + + def initialize(ach: nil) + super + @ach = ach + end + end + + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundPayments API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundTransfers API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + attr_accessor :outbound_transfers + + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ) + super + @card_issuing = card_issuing + @deposit_insurance = deposit_insurance + @financial_addresses = financial_addresses + @inbound_transfers = inbound_transfers + @intra_stripe_flows = intra_stripe_flows + @outbound_payments = outbound_payments + @outbound_transfers = outbound_transfers + end + end + + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + attr_accessor :inbound_flows + # Restricts all outbound money movement. + attr_accessor :outbound_flows + + def initialize(inbound_flows: nil, outbound_flows: nil) + super + @inbound_flows = inbound_flows + @outbound_flows = outbound_flows + end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + attr_accessor :platform_restrictions + # The currencies the FinancialAccount can hold a balance in. + attr_accessor :supported_currencies + + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil, + supported_currencies: nil + ) + super + @display_name = display_name + @expand = expand + @features = features + @metadata = metadata + @platform_restrictions = platform_restrictions + @supported_currencies = supported_currencies + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(bank: nil, requested: nil) + super + @bank = bank + @requested = requested + end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + attr_accessor :aba + + def initialize(aba: nil) + super + @aba = aba + end + end + + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH Debits via the InboundTransfers API. + attr_accessor :ach + + def initialize(ach: nil) + super + @ach = ach + end + end + + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundPayments API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundTransfers API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + attr_accessor :outbound_transfers + + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ) + super + @card_issuing = card_issuing + @deposit_insurance = deposit_insurance + @financial_addresses = financial_addresses + @inbound_transfers = inbound_transfers + @intra_stripe_flows = intra_stripe_flows + @outbound_payments = outbound_payments + @outbound_transfers = outbound_transfers + end + end + + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + attr_accessor :inbound_flows + # Restricts all outbound money movement. + attr_accessor :outbound_flows + + def initialize(inbound_flows: nil, outbound_flows: nil) + super + @inbound_flows = inbound_flows + @outbound_flows = outbound_flows + end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + attr_accessor :platform_restrictions + + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil + ) + super + @display_name = display_name + @expand = expand + @features = features + @metadata = metadata + @platform_restrictions = platform_restrictions + end + end + + class RetrieveFeaturesParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateFeaturesParams < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(bank: nil, requested: nil) + super + @bank = bank + @requested = requested + end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + attr_accessor :aba + + def initialize(aba: nil) + super + @aba = aba + end + end + + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH Debits via the InboundTransfers API. + attr_accessor :ach + + def initialize(ach: nil) + super + @ach = ach + end + end + + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundPayments API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundTransfers API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + attr_accessor :deposit_insurance + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Contains Features that add FinancialAddresses to the FinancialAccount. + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + attr_accessor :outbound_transfers + + def initialize( + card_issuing: nil, + deposit_insurance: nil, + expand: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ) + super + @card_issuing = card_issuing + @deposit_insurance = deposit_insurance + @expand = expand + @financial_addresses = financial_addresses + @inbound_transfers = inbound_transfers + @intra_stripe_flows = intra_stripe_flows + @outbound_payments = outbound_payments + @outbound_transfers = outbound_transfers + end + end # The array of paths to active Features in the Features hash. attr_reader :active_features # Balance information for the FinancialAccount @@ -83,11 +771,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of FinancialAccounts. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/financial_accounts", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/financial_account_features.rb b/lib/stripe/resources/treasury/financial_account_features.rb index 716dab225..888590d44 100644 --- a/lib/stripe/resources/treasury/financial_account_features.rb +++ b/lib/stripe/resources/treasury/financial_account_features.rb @@ -13,77 +13,177 @@ def self.object_name class CardIssuing < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class DepositInsurance < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class FinancialAddresses < Stripe::StripeObject class Aba < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :bank, :requested, :status, :status_details + # Requested bank partner for this Financial Account + attr_reader :bank + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end + # Toggle settings for enabling/disabling the ABA address feature attr_reader :aba end class InboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end + # Toggle settings for enabling/disabling an inbound ACH specific feature attr_reader :ach end class IntraStripeFlows < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class OutboundPayments < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end - attr_reader :ach, :us_domestic_wire + # Toggle settings for enabling/disabling an outbound ACH specific feature + attr_reader :ach + # Toggle settings for enabling/disabling a feature + attr_reader :us_domestic_wire end class OutboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject - attr_reader :code, :resolution, :restriction + # Represents the reason why the status is `pending` or `restricted`. + attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. + attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. + attr_reader :restriction end - attr_reader :requested, :status, :status_details + # Whether the FinancialAccount should have the Feature. + attr_reader :requested + # Whether the Feature is operational. + attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. + attr_reader :status_details end - attr_reader :ach, :us_domestic_wire + # Toggle settings for enabling/disabling an outbound ACH specific feature + attr_reader :ach + # Toggle settings for enabling/disabling a feature + attr_reader :us_domestic_wire end # Toggle settings for enabling/disabling a feature attr_reader :card_issuing diff --git a/lib/stripe/resources/treasury/inbound_transfer.rb b/lib/stripe/resources/treasury/inbound_transfer.rb index 8053b926c..57b0a7034 100644 --- a/lib/stripe/resources/treasury/inbound_transfer.rb +++ b/lib/stripe/resources/treasury/inbound_transfer.rb @@ -16,29 +16,206 @@ def self.object_name end class FailureDetails < Stripe::StripeObject + # Reason for the failure. attr_reader :code end class LinkedFlows < Stripe::StripeObject + # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. attr_reader :received_debit end class OriginPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_reader :network + # Routing number of the bank account. + attr_reader :routing_number end - attr_reader :billing_details, :type, :us_bank_account + # Attribute for field billing_details + attr_reader :billing_details + # The type of the payment method used in the InboundTransfer. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :failed_at, :succeeded_at + # Timestamp describing when an InboundTransfer changed status to `canceled`. + attr_reader :canceled_at + # Timestamp describing when an InboundTransfer changed status to `failed`. + attr_reader :failed_at + # Timestamp describing when an InboundTransfer changed status to `succeeded`. + attr_reader :succeeded_at + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to send funds to. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The origin payment method to be debited for the InboundTransfer. + attr_accessor :origin_payment_method + # The complete description that appears on your customers' statements. Maximum 10 characters. + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + metadata: nil, + origin_payment_method: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @financial_account = financial_account + @metadata = metadata + @origin_payment_method = origin_payment_method + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FailParams < Stripe::RequestParams + class FailureDetails < Stripe::RequestParams + # Reason for the failure. + attr_accessor :code + + def initialize(code: nil) + super + @code = code + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about a failed InboundTransfer. + attr_accessor :failure_details + + def initialize(expand: nil, failure_details: nil) + super + @expand = expand + @failure_details = failure_details + end + end + + class ReturnInboundTransferParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SucceedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Amount (in cents) transferred. attr_reader :amount @@ -112,11 +289,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of InboundTransfers sent from the specified FinancialAccount. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/inbound_transfers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/outbound_payment.rb b/lib/stripe/resources/treasury/outbound_payment.rb index 9e62d2575..a3fc6d3c2 100644 --- a/lib/stripe/resources/treasury/outbound_payment.rb +++ b/lib/stripe/resources/treasury/outbound_payment.rb @@ -20,42 +20,472 @@ def self.object_name class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class FinancialAccount < Stripe::StripeObject - attr_reader :id, :network + # Token of the FinancialAccount. + attr_reader :id + # The rails used to send funds. + attr_reader :network end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_reader :network + # Routing number of the bank account. + attr_reader :routing_number end - attr_reader :billing_details, :financial_account, :type, :us_bank_account + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field financial_account + attr_reader :financial_account + # The type of the payment method used in the OutboundPayment. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class EndUserDetails < Stripe::StripeObject - attr_reader :ip_address, :present + # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. + attr_reader :ip_address + # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + attr_reader :present end class ReturnedDetails < Stripe::StripeObject - attr_reader :code, :transaction + # Reason for the return. + attr_reader :code + # The Transaction associated with this object. + attr_reader :transaction end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :failed_at, :posted_at, :returned_at + # Timestamp describing when an OutboundPayment changed status to `canceled`. + attr_reader :canceled_at + # Timestamp describing when an OutboundPayment changed status to `failed`. + attr_reader :failed_at + # Timestamp describing when an OutboundPayment changed status to `posted`. + attr_reader :posted_at + # Timestamp describing when an OutboundPayment changed status to `returned`. + attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundPayment for payments sent over the `ach` network. attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - attr_reader :chips, :imad, :omad + # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. + attr_reader :chips + # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + attr_reader :imad + # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. + attr_reader :omad + end + # Attribute for field ach + attr_reader :ach + # The US bank account network used to send funds. + attr_reader :type + # Attribute for field us_domestic_wire + attr_reader :us_domestic_wire + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return OutboundPayments that were created during the given date interval. + attr_accessor :created + # Only return OutboundPayments sent to this customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + attr_accessor :status + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodData < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # Required hash if type is set to `us_bank_account`. + attr_accessor :us_bank_account + + def initialize( + billing_details: nil, + financial_account: nil, + metadata: nil, + type: nil, + us_bank_account: nil + ) + super + @billing_details = billing_details + @financial_account = financial_account + @metadata = metadata + @type = type + @us_bank_account = us_bank_account + end + end + + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + + def initialize(network: nil) + super + @network = network + end + end + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(us_bank_account: nil) + super + @us_bank_account = us_bank_account + end + end + + class EndUserDetails < Stripe::RequestParams + # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. + attr_accessor :ip_address + # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + attr_accessor :present + + def initialize(ip_address: nil, present: nil) + super + @ip_address = ip_address + @present = present + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + attr_accessor :destination_payment_method + # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + attr_accessor :destination_payment_method_data + # Payment method-specific configuration for this OutboundPayment. + attr_accessor :destination_payment_method_options + # End user details. + attr_accessor :end_user_details + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to pull funds from. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_data: nil, + destination_payment_method_options: nil, + end_user_details: nil, + expand: nil, + financial_account: nil, + metadata: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @customer = customer + @description = description + @destination_payment_method = destination_payment_method + @destination_payment_method_data = destination_payment_method_data + @destination_payment_method_options = destination_payment_method_options + @end_user_details = end_user_details + @expand = expand + @financial_account = financial_account + @metadata = metadata + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + attr_accessor :trace_id + + def initialize(trace_id: nil) + super + @trace_id = trace_id + end + end + + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :omad + + def initialize(chips: nil, imad: nil, omad: nil) + super + @chips = chips + @imad = imad + @omad = omad + end + end + # ACH network tracking details. + attr_accessor :ach + # The US bank account network used to send funds. + attr_accessor :type + # US domestic wire network tracking details. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, type: nil, us_domestic_wire: nil) + super + @ach = ach + @type = type + @us_domestic_wire = us_domestic_wire + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about network-specific tracking information. + attr_accessor :tracking_details + + def initialize(expand: nil, tracking_details: nil) + super + @expand = expand + @tracking_details = tracking_details + end + end + + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReturnOutboundPaymentParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # The return code to be set on the OutboundPayment object. + attr_accessor :code + + def initialize(code: nil) + super + @code = code + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Optional hash to set the return code. + attr_accessor :returned_details + + def initialize(expand: nil, returned_details: nil) + super + @expand = expand + @returned_details = returned_details end - attr_reader :ach, :type, :us_domestic_wire end # Amount (in cents) transferred. attr_reader :amount @@ -133,11 +563,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of OutboundPayments sent from the specified FinancialAccount. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_payments", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/outbound_transfer.rb b/lib/stripe/resources/treasury/outbound_transfer.rb index 96bbc7d31..8bcc1db48 100644 --- a/lib/stripe/resources/treasury/outbound_transfer.rb +++ b/lib/stripe/resources/treasury/outbound_transfer.rb @@ -20,41 +20,337 @@ def self.object_name class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class UsBankAccount < Stripe::StripeObject - attr_reader :account_holder_type, :account_type, :bank_name, :fingerprint, :last4, :mandate, :network, :routing_number + # Account holder type: individual or company. + attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. + attr_reader :account_type + # Name of the bank associated with the bank account. + attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + attr_reader :fingerprint + # Last four digits of the bank account number. + attr_reader :last4 + # ID of the mandate used to make this payment. + attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_reader :network + # Routing number of the bank account. + attr_reader :routing_number end - attr_reader :billing_details, :type, :us_bank_account + # Attribute for field billing_details + attr_reader :billing_details + # The type of the payment method used in the OutboundTransfer. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record attr_reader :addenda end - attr_reader :ach, :type + # Details about an ACH transaction. + attr_reader :ach + # The type of flow that originated the OutboundTransfer. + attr_reader :type end class ReturnedDetails < Stripe::StripeObject - attr_reader :code, :transaction + # Reason for the return. + attr_reader :code + # The Transaction associated with this object. + attr_reader :transaction end class StatusTransitions < Stripe::StripeObject - attr_reader :canceled_at, :failed_at, :posted_at, :returned_at + # Timestamp describing when an OutboundTransfer changed status to `canceled` + attr_reader :canceled_at + # Timestamp describing when an OutboundTransfer changed status to `failed` + attr_reader :failed_at + # Timestamp describing when an OutboundTransfer changed status to `posted` + attr_reader :posted_at + # Timestamp describing when an OutboundTransfer changed status to `returned` + attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject - attr_reader :chips, :imad, :omad + # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + attr_reader :chips + # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + attr_reader :imad + # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. + attr_reader :omad + end + # Attribute for field ach + attr_reader :ach + # The US bank account network used to send funds. + attr_reader :type + # Attribute for field us_domestic_wire + attr_reader :us_domestic_wire + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + + def initialize(network: nil) + super + @network = network + end + end + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(us_bank_account: nil) + super + @us_bank_account = us_bank_account + end + end + + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this OutboundTransfer. + attr_accessor :addenda + + def initialize(addenda: nil) + super + @addenda = addenda + end + end + # Optional fields for `ach`. + attr_accessor :ach + # The type of flow that originated the OutboundTransfer. + attr_accessor :type + + def initialize(ach: nil, type: nil) + super + @ach = ach + @type = type + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundTransfer. + attr_accessor :destination_payment_method + # Hash describing payment method configuration details. + attr_accessor :destination_payment_method_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to pull funds from. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Details about the network used for the OutboundTransfer. + attr_accessor :network_details + # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_options: nil, + expand: nil, + financial_account: nil, + metadata: nil, + network_details: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @description = description + @destination_payment_method = destination_payment_method + @destination_payment_method_options = destination_payment_method_options + @expand = expand + @financial_account = financial_account + @metadata = metadata + @network_details = network_details + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + attr_accessor :trace_id + + def initialize(trace_id: nil) + super + @trace_id = trace_id + end + end + + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :omad + + def initialize(chips: nil, imad: nil, omad: nil) + super + @chips = chips + @imad = imad + @omad = omad + end + end + # ACH network tracking details. + attr_accessor :ach + # The US bank account network used to send funds. + attr_accessor :type + # US domestic wire network tracking details. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, type: nil, us_domestic_wire: nil) + super + @ach = ach + @type = type + @us_domestic_wire = us_domestic_wire + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about network-specific tracking information. + attr_accessor :tracking_details + + def initialize(expand: nil, tracking_details: nil) + super + @expand = expand + @tracking_details = tracking_details + end + end + + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReturnOutboundTransferParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # Reason for the return. + attr_accessor :code + + def initialize(code: nil) + super + @code = code + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about a returned OutboundTransfer. + attr_accessor :returned_details + + def initialize(expand: nil, returned_details: nil) + super + @expand = expand + @returned_details = returned_details end - attr_reader :ach, :type, :us_domestic_wire end # Amount (in cents) transferred. attr_reader :amount @@ -130,11 +426,11 @@ def self.create(params = {}, opts = {}) end # Returns a list of OutboundTransfers sent from the specified FinancialAccount. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/outbound_transfers", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/received_credit.rb b/lib/stripe/resources/treasury/received_credit.rb index fe157d2c6..adc656902 100644 --- a/lib/stripe/resources/treasury/received_credit.rb +++ b/lib/stripe/resources/treasury/received_credit.rb @@ -15,37 +15,252 @@ def self.object_name class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class FinancialAccount < Stripe::StripeObject - attr_reader :id, :network + # The FinancialAccount ID. + attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + attr_reader :network end class UsBankAccount < Stripe::StripeObject - attr_reader :bank_name, :last4, :routing_number + # Bank name. + attr_reader :bank_name + # The last four digits of the bank account number. + attr_reader :last4 + # The routing number for the bank account. + attr_reader :routing_number end - attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account + # Set when `type` is `balance`. + attr_reader :balance + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field financial_account + attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject class SourceFlowDetails < Stripe::StripeObject - attr_reader :credit_reversal, :outbound_payment, :payout, :type + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + attr_reader :credit_reversal + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + attr_reader :outbound_payment + # A `Payout` object is created when you receive funds from Stripe, or when you + # initiate a payout to either a bank account or debit card of a [connected + # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + # and list all payouts. Payouts are made on [varying + # schedules](/docs/connect/manage-payout-schedule), depending on your country and + # industry. + # + # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) + attr_reader :payout + # The type of the source flow that originated the ReceivedCredit. + attr_reader :type end - attr_reader :credit_reversal, :issuing_authorization, :issuing_transaction, :source_flow, :source_flow_details, :source_flow_type + # The CreditReversal created as a result of this ReceivedCredit being reversed. + attr_reader :credit_reversal + # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + attr_reader :issuing_authorization + # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. + attr_reader :issuing_transaction + # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. + attr_reader :source_flow + # The expandable object of the source flow. + attr_reader :source_flow_details + # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). + attr_reader :source_flow_type end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record attr_reader :addenda end - attr_reader :ach, :type + # Details about an ACH transaction. + attr_reader :ach + # The type of flow that originated the ReceivedCredit. + attr_reader :type end class ReversalDetails < Stripe::StripeObject - attr_reader :deadline, :restricted_reason + # Time before which a ReceivedCredit can be reversed. + attr_reader :deadline + # Set if a ReceivedCredit cannot be reversed. + attr_reader :restricted_reason + end + + class ListParams < Stripe::RequestParams + class LinkedFlows < Stripe::RequestParams + # The source flow type. + attr_accessor :source_flow_type + + def initialize(source_flow_type: nil) + super + @source_flow_type = source_flow_type + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount that received the funds. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return ReceivedCredits described by the flow. + attr_accessor :linked_flows + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return ReceivedCredits that have the given status: `succeeded` or `failed`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + linked_flows: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @linked_flows = linked_flows + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + attr_accessor :account_holder_name + # The bank account number. + attr_accessor :account_number + # The bank account's routing number. + attr_accessor :routing_number + + def initialize(account_holder_name: nil, account_number: nil, routing_number: nil) + super + @account_holder_name = account_holder_name + @account_number = account_number + @routing_number = routing_number + end + end + # The source type. + attr_accessor :type + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(type: nil, us_bank_account: nil) + super + @type = type + @us_bank_account = us_bank_account + end + end + + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH Addenda record + attr_accessor :addenda + + def initialize(addenda: nil) + super + @addenda = addenda + end + end + # Optional fields for `ach`. + attr_accessor :ach + # The type of flow that originated the ReceivedCredit. + attr_accessor :type + + def initialize(ach: nil, type: nil) + super + @ach = ach + @type = type + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to send funds to. + attr_accessor :financial_account + # Initiating payment method details for the object. + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + # Details about the network used for the ReceivedCredit. + attr_accessor :network_details + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @financial_account = financial_account + @initiating_payment_method_details = initiating_payment_method_details + @network = network + @network_details = network_details + end end # Amount (in cents) transferred. attr_reader :amount @@ -83,11 +298,11 @@ class ReversalDetails < Stripe::StripeObject attr_reader :transaction # Returns a list of ReceivedCredits. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/received_credits", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/received_debit.rb b/lib/stripe/resources/treasury/received_debit.rb index 7fb18fa1a..ae6ed4ead 100644 --- a/lib/stripe/resources/treasury/received_debit.rb +++ b/lib/stripe/resources/treasury/received_debit.rb @@ -15,34 +15,218 @@ def self.object_name class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject - attr_reader :city, :country, :line1, :line2, :postal_code, :state + # City, district, suburb, town, or village. + attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_reader :line2 + # ZIP or postal code. + attr_reader :postal_code + # State, county, province, or region. + attr_reader :state end - attr_reader :address, :email, :name + # Attribute for field address + attr_reader :address + # Email address. + attr_reader :email + # Full name. + attr_reader :name end class FinancialAccount < Stripe::StripeObject - attr_reader :id, :network + # The FinancialAccount ID. + attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. + attr_reader :network end class UsBankAccount < Stripe::StripeObject - attr_reader :bank_name, :last4, :routing_number + # Bank name. + attr_reader :bank_name + # The last four digits of the bank account number. + attr_reader :last4 + # The routing number for the bank account. + attr_reader :routing_number end - attr_reader :balance, :billing_details, :financial_account, :issuing_card, :type, :us_bank_account + # Set when `type` is `balance`. + attr_reader :balance + # Attribute for field billing_details + attr_reader :billing_details + # Attribute for field financial_account + attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. + attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. + attr_reader :type + # Attribute for field us_bank_account + attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject - attr_reader :debit_reversal, :inbound_transfer, :issuing_authorization, :issuing_transaction, :payout, :received_credit_capital_withholding + # The DebitReversal created as a result of this ReceivedDebit being reversed. + attr_reader :debit_reversal + # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. + attr_reader :inbound_transfer + # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. + attr_reader :issuing_authorization + # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. + attr_reader :issuing_transaction + # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. + attr_reader :payout + # The ReceivedCredit that Capital withheld from + attr_reader :received_credit_capital_withholding end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record attr_reader :addenda end - attr_reader :ach, :type + # Details about an ACH transaction. + attr_reader :ach + # The type of flow that originated the ReceivedDebit. + attr_reader :type end class ReversalDetails < Stripe::StripeObject - attr_reader :deadline, :restricted_reason + # Time before which a ReceivedDebit can be reversed. + attr_reader :deadline + # Set if a ReceivedDebit can't be reversed. + attr_reader :restricted_reason + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount that funds were pulled from. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + attr_accessor :account_holder_name + # The bank account number. + attr_accessor :account_number + # The bank account's routing number. + attr_accessor :routing_number + + def initialize(account_holder_name: nil, account_number: nil, routing_number: nil) + super + @account_holder_name = account_holder_name + @account_number = account_number + @routing_number = routing_number + end + end + # The source type. + attr_accessor :type + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(type: nil, us_bank_account: nil) + super + @type = type + @us_bank_account = us_bank_account + end + end + + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this ReceivedDebit. + attr_accessor :addenda + + def initialize(addenda: nil) + super + @addenda = addenda + end + end + # Optional fields for `ach`. + attr_accessor :ach + # The type of flow that originated the ReceivedDebit. + attr_accessor :type + + def initialize(ach: nil, type: nil) + super + @ach = ach + @type = type + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to pull funds from. + attr_accessor :financial_account + # Initiating payment method details for the object. + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + # Details about the network used for the ReceivedDebit. + attr_accessor :network_details + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @financial_account = financial_account + @initiating_payment_method_details = initiating_payment_method_details + @network = network + @network_details = network_details + end end # Amount (in cents) transferred. attr_reader :amount @@ -80,11 +264,11 @@ class ReversalDetails < Stripe::StripeObject attr_reader :transaction # Returns a list of ReceivedDebits. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/received_debits", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/transaction.rb b/lib/stripe/resources/treasury/transaction.rb index 5ec9f7c4d..4420b5201 100644 --- a/lib/stripe/resources/treasury/transaction.rb +++ b/lib/stripe/resources/treasury/transaction.rb @@ -13,15 +13,154 @@ def self.object_name end class BalanceImpact < Stripe::StripeObject - attr_reader :cash, :inbound_pending, :outbound_pending + # The change made to funds the user can spend right now. + attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. + attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject - attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. + attr_reader :type end class StatusTransitions < Stripe::StripeObject - attr_reader :posted_at, :void_at + # Timestamp describing when the Transaction changed status to `posted`. + attr_reader :posted_at + # Timestamp describing when the Transaction changed status to `void`. + attr_reader :void_at + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class StatusTransitions < Stripe::RequestParams + class PostedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Returns Transactions with `posted_at` within the specified range. + attr_accessor :posted_at + + def initialize(posted_at: nil) + super + @posted_at = posted_at + end + end + # Only return Transactions that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return Transactions that have the given status: `open`, `posted`, or `void`. + attr_accessor :status + # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. + attr_accessor :status_transitions + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + status: nil, + status_transitions: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @order_by = order_by + @starting_after = starting_after + @status = status + @status_transitions = status_transitions + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Amount (in cents) transferred. attr_reader :amount @@ -55,11 +194,11 @@ class StatusTransitions < Stripe::StripeObject attr_reader :status_transitions # Retrieves a list of Transaction objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/transactions", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/treasury/transaction_entry.rb b/lib/stripe/resources/treasury/transaction_entry.rb index a5d49a33c..0ed0e96a7 100644 --- a/lib/stripe/resources/treasury/transaction_entry.rb +++ b/lib/stripe/resources/treasury/transaction_entry.rb @@ -13,11 +13,138 @@ def self.object_name end class BalanceImpact < Stripe::StripeObject - attr_reader :cash, :inbound_pending, :outbound_pending + # The change made to funds the user can spend right now. + attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. + attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. + attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject - attr_reader :credit_reversal, :debit_reversal, :inbound_transfer, :issuing_authorization, :outbound_payment, :outbound_transfer, :received_credit, :received_debit, :type + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. + attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. + attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) + attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) + attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) + attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) + attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. + attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. + attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. + attr_reader :type + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class EffectiveAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return TransactionEntries that were created during the given date interval. + attr_accessor :created + # Attribute for param field effective_at + attr_accessor :effective_at + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return TransactionEntries associated with this Transaction. + attr_accessor :transaction + + def initialize( + created: nil, + effective_at: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + transaction: nil + ) + super + @created = created + @effective_at = effective_at + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @order_by = order_by + @starting_after = starting_after + @transaction = transaction + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end end # Change to a FinancialAccount's balance attr_reader :balance_impact @@ -47,11 +174,11 @@ class FlowDetails < Stripe::StripeObject attr_reader :type # Retrieves a list of TransactionEntry objects. - def self.list(filters = {}, opts = {}) + def self.list(params = {}, opts = {}) request_stripe_object( method: :get, path: "/v1/treasury/transaction_entries", - params: filters, + params: params, opts: opts ) end diff --git a/lib/stripe/resources/usage_record_summary.rb b/lib/stripe/resources/usage_record_summary.rb index 78e1fb4af..37563d3e2 100644 --- a/lib/stripe/resources/usage_record_summary.rb +++ b/lib/stripe/resources/usage_record_summary.rb @@ -10,7 +10,10 @@ def self.object_name end class Period < Stripe::StripeObject - attr_reader :end, :start + # The end date of this usage period. All usage up to and including this point in time is included. + attr_reader :end + # The start date of this usage period. All usage after this point in time is included. + attr_reader :start end # Unique identifier for the object. attr_reader :id diff --git a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb index 6a2ce37f8..a8d099ead 100644 --- a/lib/stripe/resources/v2/billing/meter_event_adjustment.rb +++ b/lib/stripe/resources/v2/billing/meter_event_adjustment.rb @@ -11,6 +11,7 @@ def self.object_name end class Cancel < Stripe::StripeObject + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. attr_reader :identifier end # Specifies which event to cancel. diff --git a/lib/stripe/resources/v2/event.rb b/lib/stripe/resources/v2/event.rb index 2746c4bf4..7c3e21820 100644 --- a/lib/stripe/resources/v2/event.rb +++ b/lib/stripe/resources/v2/event.rb @@ -11,9 +11,15 @@ def self.object_name class Reason < Stripe::StripeObject class Request < Stripe::StripeObject - attr_reader :id, :idempotency_key + # ID of the API request that caused the event. + attr_reader :id + # The idempotency key transmitted during the request. + attr_reader :idempotency_key end - attr_reader :type, :request + # Event reason type. + attr_reader :type + # Information on the API request that instigated the event. + attr_reader :request end # Authentication context needed to fetch the event or related object. attr_reader :context diff --git a/lib/stripe/resources/v2/event_destination.rb b/lib/stripe/resources/v2/event_destination.rb index a32bff467..ff2d42b9f 100644 --- a/lib/stripe/resources/v2/event_destination.rb +++ b/lib/stripe/resources/v2/event_destination.rb @@ -11,17 +11,27 @@ def self.object_name class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject + # Reason event destination has been disabled. attr_reader :reason end + # Details about why the event destination has been disabled. attr_reader :disabled end class AmazonEventbridge < Stripe::StripeObject - attr_reader :aws_account_id, :aws_event_source_arn, :aws_event_source_status + # The AWS account ID. + attr_reader :aws_account_id + # The ARN of the AWS event source. + attr_reader :aws_event_source_arn + # The state of the AWS event source. + attr_reader :aws_event_source_status end class WebhookEndpoint < Stripe::StripeObject - attr_reader :signing_secret, :url + # The signing secret of the webhook endpoint, only includable on creation. + attr_reader :signing_secret + # The URL of the webhook endpoint, includable. + attr_reader :url end # Time at which the object was created. attr_reader :created diff --git a/lib/stripe/resources/webhook_endpoint.rb b/lib/stripe/resources/webhook_endpoint.rb index ae594fb04..11122e640 100644 --- a/lib/stripe/resources/webhook_endpoint.rb +++ b/lib/stripe/resources/webhook_endpoint.rb @@ -20,6 +20,105 @@ def self.object_name "webhook_endpoint" end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An optional description of what the webhook is used for. + attr_accessor :description + # Disable the webhook endpoint if set to true. + attr_accessor :disabled + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The URL of the webhook endpoint. + attr_accessor :url + + def initialize( + description: nil, + disabled: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ) + super + @description = description + @disabled = disabled + @enabled_events = enabled_events + @expand = expand + @metadata = metadata + @url = url + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + attr_accessor :api_version + # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + attr_accessor :connect + # An optional description of what the webhook is used for. + attr_accessor :description + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The URL of the webhook endpoint. + attr_accessor :url + + def initialize( + api_version: nil, + connect: nil, + description: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ) + super + @api_version = api_version + @connect = connect + @description = description + @enabled_events = enabled_events + @expand = expand + @metadata = metadata + @url = url + end + end # The API version events are rendered as for this webhook endpoint. attr_reader :api_version # The ID of the associated Connect application. @@ -78,13 +177,8 @@ def delete(params = {}, opts = {}) end # Returns a list of your webhook endpoints. - def self.list(filters = {}, opts = {}) - request_stripe_object( - method: :get, - path: "/v1/webhook_endpoints", - params: filters, - opts: opts - ) + def self.list(params = {}, opts = {}) + request_stripe_object(method: :get, path: "/v1/webhook_endpoints", params: params, opts: opts) end # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. diff --git a/lib/stripe/services/account_capability_service.rb b/lib/stripe/services/account_capability_service.rb index 61b958699..ee043c2da 100644 --- a/lib/stripe/services/account_capability_service.rb +++ b/lib/stripe/services/account_capability_service.rb @@ -3,6 +3,41 @@ module Stripe class AccountCapabilityService < StripeService + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. + # + # If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + attr_accessor :requested + + def initialize(expand: nil, requested: nil) + super + @expand = expand + @requested = requested + end + end + # Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. def list(account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/account_external_account_service.rb b/lib/stripe/services/account_external_account_service.rb index 98ceee1e4..92c010e58 100644 --- a/lib/stripe/services/account_external_account_service.rb +++ b/lib/stripe/services/account_external_account_service.rb @@ -3,6 +3,265 @@ module Stripe class AccountExternalAccountService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. + attr_accessor :bank_account_ownership_verification + + def initialize(bank_account_ownership_verification: nil) + super + @bank_account_ownership_verification = bank_account_ownership_verification + end + end + # The name of the person or business that owns the bank account. + attr_accessor :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. + attr_accessor :account_holder_type + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + attr_accessor :account_type + # City/District/Suburb/Town/Village. + attr_accessor :address_city + # Billing address country, if provided when creating card. + attr_accessor :address_country + # Address line 1 (Street address/PO Box/Company name). + attr_accessor :address_line1 + # Address line 2 (Apartment/Suite/Unit/Building). + attr_accessor :address_line2 + # State/County/Province/Region. + attr_accessor :address_state + # ZIP or postal code. + attr_accessor :address_zip + # When set to true, this becomes the default external account for its currency. + attr_accessor :default_for_currency + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # Two digit number representing the card’s expiration month. + attr_accessor :exp_month + # Four digit number representing the card’s expiration year. + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Cardholder name. + attr_accessor :name + + def initialize( + account_holder_name: nil, + account_holder_type: nil, + account_type: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + default_for_currency: nil, + documents: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + metadata: nil, + name: nil + ) + super + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_type = account_type + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @default_for_currency = default_for_currency + @documents = documents + @exp_month = exp_month + @exp_year = exp_year + @expand = expand + @metadata = metadata + @name = name + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filter external accounts according to a particular object type. + attr_accessor :object + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, object: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @object = object + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ) + super + @object = object + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @country = country + @currency = currency + @routing_number = routing_number + end + end + + class Card < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field address_city + attr_accessor :address_city + # Attribute for param field address_country + attr_accessor :address_country + # Attribute for param field address_line1 + attr_accessor :address_line1 + # Attribute for param field address_line2 + attr_accessor :address_line2 + # Attribute for param field address_state + attr_accessor :address_state + # Attribute for param field address_zip + attr_accessor :address_zip + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field cvc + attr_accessor :cvc + # Attribute for param field exp_month + attr_accessor :exp_month + # Attribute for param field exp_year + attr_accessor :exp_year + # Attribute for param field name + attr_accessor :name + # Attribute for param field number + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil + ) + super + @object = object + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @number = number + @metadata = metadata + end + end + + class CardToken < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field token + attr_accessor :token + + def initialize(object: nil, currency: nil, token: nil) + super + @object = object + @currency = currency + @token = token + end + end + # When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. + attr_accessor :default_for_currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Please refer to full [documentation](https://stripe.com/docs/api) instead. + attr_accessor :external_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(default_for_currency: nil, expand: nil, external_account: nil, metadata: nil) + super + @default_for_currency = default_for_currency + @expand = expand + @external_account = external_account + @metadata = metadata + end + end + # Create an external account for a given account. def create(account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/account_link_service.rb b/lib/stripe/services/account_link_service.rb index f5318f1a8..f588eacb3 100644 --- a/lib/stripe/services/account_link_service.rb +++ b/lib/stripe/services/account_link_service.rb @@ -3,6 +3,54 @@ module Stripe class AccountLinkService < StripeService + class CreateParams < Stripe::RequestParams + class CollectionOptions < Stripe::RequestParams + # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. + attr_accessor :fields + # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + attr_accessor :future_requirements + + def initialize(fields: nil, future_requirements: nil) + super + @fields = fields + @future_requirements = future_requirements + end + end + # The identifier of the account to create an account link for. + attr_accessor :account + # The collect parameter is deprecated. Use `collection_options` instead. + attr_accessor :collect + # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. + attr_accessor :collection_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. + attr_accessor :refresh_url + # The URL that the user will be redirected to upon leaving or completing the linked flow. + attr_accessor :return_url + # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + attr_accessor :type + + def initialize( + account: nil, + collect: nil, + collection_options: nil, + expand: nil, + refresh_url: nil, + return_url: nil, + type: nil + ) + super + @account = account + @collect = collect + @collection_options = collection_options + @expand = expand + @refresh_url = refresh_url + @return_url = return_url + @type = type + end + end + # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/account_login_link_service.rb b/lib/stripe/services/account_login_link_service.rb index c02e7c24e..6f65296ba 100644 --- a/lib/stripe/services/account_login_link_service.rb +++ b/lib/stripe/services/account_login_link_service.rb @@ -3,6 +3,16 @@ module Stripe class AccountLoginLinkService < StripeService + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a login link for a connected account to access the Express Dashboard. # # You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. diff --git a/lib/stripe/services/account_notice_service.rb b/lib/stripe/services/account_notice_service.rb index d67d766bc..72b0da669 100644 --- a/lib/stripe/services/account_notice_service.rb +++ b/lib/stripe/services/account_notice_service.rb @@ -3,6 +3,72 @@ module Stripe class AccountNoticeService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Set to false to only return unsent AccountNotices. + attr_accessor :sent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, sent: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @sent = sent + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Email < Stripe::RequestParams + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + attr_accessor :plain_text + # Email address of the recipient. + attr_accessor :recipient + # Subject of the email. + attr_accessor :subject + + def initialize(plain_text: nil, recipient: nil, subject: nil) + super + @plain_text = plain_text + @recipient = recipient + @subject = subject + end + end + # Information about the email you sent. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Date when you sent the notice. + attr_accessor :sent_at + + def initialize(email: nil, expand: nil, metadata: nil, sent_at: nil) + super + @email = email + @expand = expand + @metadata = metadata + @sent_at = sent_at + end + end + # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/account_person_service.rb b/lib/stripe/services/account_person_service.rb index cdee2fed3..253836602 100644 --- a/lib/stripe/services/account_person_service.rb +++ b/lib/stripe/services/account_person_service.rb @@ -3,6 +3,916 @@ module Stripe class AccountPersonService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + attr_accessor :account + + def initialize(account: nil) + super + @account = account + end + end + + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + attr_accessor :visa + + def initialize(company_authorization: nil, passport: nil, visa: nil) + super + @company_authorization = company_authorization + @passport = passport + @visa = visa + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ) + super + @authorizer = authorizer + @director = director + @executive = executive + @legal_guardian = legal_guardian + @owner = owner + @percent_ownership = percent_ownership + @representative = representative + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + attr_accessor :additional_tos_acceptances + # The person's address. + attr_accessor :address + # The Kana variation of the person's address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + attr_accessor :address_kanji + # The person's date of birth. + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The person's email address. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The person's first name. + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The person's last name. + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + attr_accessor :last_name_kanji + # The person's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + attr_accessor :nationality + # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + attr_accessor :person_token + # The person's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The person's registered address. + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + attr_accessor :ssn_last_4 + # The person's verification status. + attr_accessor :verification + + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + expand: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + person_token: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @additional_tos_acceptances = additional_tos_acceptances + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @documents = documents + @email = email + @expand = expand + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @nationality = nationality + @person_token = person_token + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class ListParams < Stripe::RequestParams + class Relationship < Stripe::RequestParams + # A filter on the list of people returned based on whether these people are authorizers of the account's representative. + attr_accessor :authorizer + # A filter on the list of people returned based on whether these people are directors of the account's company. + attr_accessor :director + # A filter on the list of people returned based on whether these people are executives of the account's company. + attr_accessor :executive + # A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + attr_accessor :legal_guardian + # A filter on the list of people returned based on whether these people are owners of the account's company. + attr_accessor :owner + # A filter on the list of people returned based on whether these people are the representative of the account's company. + attr_accessor :representative + + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + representative: nil + ) + super + @authorizer = authorizer + @director = director + @executive = executive + @legal_guardian = legal_guardian + @owner = owner + @representative = representative + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filters on the list of people returned based on the person's relationship to the account's company. + attr_accessor :relationship + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + relationship: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @relationship = relationship + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + attr_accessor :account + + def initialize(account: nil) + super + @account = account + end + end + + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + attr_accessor :visa + + def initialize(company_authorization: nil, passport: nil, visa: nil) + super + @company_authorization = company_authorization + @passport = passport + @visa = visa + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ) + super + @authorizer = authorizer + @director = director + @executive = executive + @legal_guardian = legal_guardian + @owner = owner + @percent_ownership = percent_ownership + @representative = representative + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + attr_accessor :additional_tos_acceptances + # The person's address. + attr_accessor :address + # The Kana variation of the person's address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + attr_accessor :address_kanji + # The person's date of birth. + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The person's email address. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The person's first name. + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The person's last name. + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + attr_accessor :last_name_kanji + # The person's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + attr_accessor :nationality + # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + attr_accessor :person_token + # The person's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The person's registered address. + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + attr_accessor :ssn_last_4 + # The person's verification status. + attr_accessor :verification + + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + expand: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + person_token: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @additional_tos_acceptances = additional_tos_acceptances + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @documents = documents + @email = email + @expand = expand + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @nationality = nationality + @person_token = person_token + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + # Creates a new person. def create(account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/account_service.rb b/lib/stripe/services/account_service.rb index 8b546c369..be695180a 100644 --- a/lib/stripe/services/account_service.rb +++ b/lib/stripe/services/account_service.rb @@ -13,6 +13,4601 @@ def initialize(requestor) @persons = Stripe::AccountPersonService.new(@requestor) end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ) + super + @object = object + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @country = country + @currency = currency + @routing_number = routing_number + end + end + + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + attr_accessor :fiscal_year_end + + def initialize(amount: nil, currency: nil, fiscal_year_end: nil) + super + @amount = amount + @currency = currency + @fiscal_year_end = fiscal_year_end + end + end + + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The applicant's gross annual revenue for its preceding fiscal year. + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + attr_accessor :support_address + # A publicly available email address for sending support issues to. + attr_accessor :support_email + # A publicly available phone number to call with support issues. + attr_accessor :support_phone + # A publicly available website for handling support issues. + attr_accessor :support_url + # The business's publicly available website. + attr_accessor :url + + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ) + super + @annual_revenue = annual_revenue + @estimated_worker_count = estimated_worker_count + @mcc = mcc + @monthly_estimated_revenue = monthly_estimated_revenue + @name = name + @product_description = product_description + @support_address = support_address + @support_email = support_email + @support_phone = support_phone + @support_url = support_url + @url = url + end + end + + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # The acss_debit_payments capability. + attr_accessor :acss_debit_payments + # The affirm_payments capability. + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + attr_accessor :alma_payments + # The amazon_pay_payments capability. + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + attr_accessor :bank_transfer_payments + # The blik_payments capability. + attr_accessor :blik_payments + # The boleto_payments capability. + attr_accessor :boleto_payments + # The card_issuing capability. + attr_accessor :card_issuing + # The card_payments capability. + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + attr_accessor :cashapp_payments + # The eps_payments capability. + attr_accessor :eps_payments + # The fpx_payments capability. + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + attr_accessor :giropay_payments + # The gopay_payments capability. + attr_accessor :gopay_payments + # The grabpay_payments capability. + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + attr_accessor :ideal_payments + # The india_international_payments capability. + attr_accessor :india_international_payments + # The jcb_payments capability. + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + attr_accessor :klarna_payments + # The konbini_payments capability. + attr_accessor :konbini_payments + # The kr_card_payments capability. + attr_accessor :kr_card_payments + # The legacy_payments capability. + attr_accessor :legacy_payments + # The link_payments capability. + attr_accessor :link_payments + # The mb_way_payments capability. + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + attr_accessor :oxxo_payments + # The p24_payments capability. + attr_accessor :p24_payments + # The payco_payments capability. + attr_accessor :payco_payments + # The paynow_payments capability. + attr_accessor :paynow_payments + # The paypal_payments capability. + attr_accessor :paypal_payments + # The payto_payments capability. + attr_accessor :payto_payments + # The promptpay_payments capability. + attr_accessor :promptpay_payments + # The qris_payments capability. + attr_accessor :qris_payments + # The rechnung_payments capability. + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + attr_accessor :shopeepay_payments + # The sofort_payments capability. + attr_accessor :sofort_payments + # The swish_payments capability. + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + attr_accessor :transfers + # The treasury capability. + attr_accessor :treasury + # The treasury_evolve capability. + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + attr_accessor :zip_payments + + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ) + super + @acss_debit_payments = acss_debit_payments + @affirm_payments = affirm_payments + @afterpay_clearpay_payments = afterpay_clearpay_payments + @alma_payments = alma_payments + @amazon_pay_payments = amazon_pay_payments + @au_becs_debit_payments = au_becs_debit_payments + @automatic_indirect_tax = automatic_indirect_tax + @bacs_debit_payments = bacs_debit_payments + @bancontact_payments = bancontact_payments + @bank_transfer_payments = bank_transfer_payments + @blik_payments = blik_payments + @boleto_payments = boleto_payments + @card_issuing = card_issuing + @card_payments = card_payments + @cartes_bancaires_payments = cartes_bancaires_payments + @cashapp_payments = cashapp_payments + @eps_payments = eps_payments + @fpx_payments = fpx_payments + @gb_bank_transfer_payments = gb_bank_transfer_payments + @giropay_payments = giropay_payments + @gopay_payments = gopay_payments + @grabpay_payments = grabpay_payments + @id_bank_transfer_payments = id_bank_transfer_payments + @id_bank_transfer_payments_bca = id_bank_transfer_payments_bca + @ideal_payments = ideal_payments + @india_international_payments = india_international_payments + @jcb_payments = jcb_payments + @jp_bank_transfer_payments = jp_bank_transfer_payments + @kakao_pay_payments = kakao_pay_payments + @klarna_payments = klarna_payments + @konbini_payments = konbini_payments + @kr_card_payments = kr_card_payments + @legacy_payments = legacy_payments + @link_payments = link_payments + @mb_way_payments = mb_way_payments + @mobilepay_payments = mobilepay_payments + @multibanco_payments = multibanco_payments + @mx_bank_transfer_payments = mx_bank_transfer_payments + @naver_pay_payments = naver_pay_payments + @oxxo_payments = oxxo_payments + @p24_payments = p24_payments + @payco_payments = payco_payments + @paynow_payments = paynow_payments + @paypal_payments = paypal_payments + @payto_payments = payto_payments + @promptpay_payments = promptpay_payments + @qris_payments = qris_payments + @rechnung_payments = rechnung_payments + @revolut_pay_payments = revolut_pay_payments + @samsung_pay_payments = samsung_pay_payments + @sepa_bank_transfer_payments = sepa_bank_transfer_payments + @sepa_debit_payments = sepa_debit_payments + @shopeepay_payments = shopeepay_payments + @sofort_payments = sofort_payments + @swish_payments = swish_payments + @tax_reporting_us_1099_k = tax_reporting_us_1099_k + @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc + @transfers = transfers + @treasury = treasury + @treasury_evolve = treasury_evolve + @treasury_fifth_third = treasury_fifth_third + @treasury_goldman_sachs = treasury_goldman_sachs + @twint_payments = twint_payments + @us_bank_account_ach_payments = us_bank_account_ach_payments + @us_bank_transfer_payments = us_bank_transfer_payments + @zip_payments = zip_payments + end + end + + class Card < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field address_city + attr_accessor :address_city + # Attribute for param field address_country + attr_accessor :address_country + # Attribute for param field address_line1 + attr_accessor :address_line1 + # Attribute for param field address_line2 + attr_accessor :address_line2 + # Attribute for param field address_state + attr_accessor :address_state + # Attribute for param field address_zip + attr_accessor :address_zip + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field cvc + attr_accessor :cvc + # Attribute for param field exp_month + attr_accessor :exp_month + # Attribute for param field exp_year + attr_accessor :exp_year + # Attribute for param field name + attr_accessor :name + # Attribute for param field number + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # Attribute for param field default_for_currency + attr_accessor :default_for_currency + + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ) + super + @object = object + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @number = number + @metadata = metadata + @default_for_currency = default_for_currency + end + end + + class CardToken < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field token + attr_accessor :token + + def initialize(object: nil, currency: nil, token: nil) + super + @object = object + @currency = currency + @token = token + end + end + + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document verifying the business. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # The company's primary address. + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + attr_accessor :export_purpose_code + # The company's legal name. + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_accessor :tax_id_registrar + # The VAT number of the company. + attr_accessor :vat_id + # Information on the verification state of the company. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @directors_provided = directors_provided + @executives_provided = executives_provided + @export_license_id = export_license_id + @export_purpose_code = export_purpose_code + @name = name + @name_kana = name_kana + @name_kanji = name_kanji + @owners_provided = owners_provided + @ownership_declaration = ownership_declaration + @phone = phone + @registration_number = registration_number + @structure = structure + @tax_id = tax_id + @tax_id_registrar = tax_id_registrar + @vat_id = vat_id + @verification = verification + end + end + + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + attr_accessor :proof_of_registration + + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ) + super + @bank_account_ownership_verification = bank_account_ownership_verification + @company_license = company_license + @company_memorandum_of_association = company_memorandum_of_association + @company_ministerial_decree = company_ministerial_decree + @company_registration_verification = company_registration_verification + @company_tax_id_verification = company_tax_id_verification + @proof_of_registration = proof_of_registration + end + end + + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + attr_accessor :payments_pricing + + def initialize(payments_pricing: nil) + super + @payments_pricing = payments_pricing + end + end + + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ) + super + @director = director + @executive = executive + @owner = owner + @percent_ownership = percent_ownership + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # The individual's primary address. + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + attr_accessor :address_kanji + # The individual's date of birth. + attr_accessor :dob + # The individual's email address. + attr_accessor :email + # The individual's first name. + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + attr_accessor :full_name_aliases + # The individual's gender + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The individual's last name. + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + attr_accessor :last_name_kanji + # The individual's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The individual's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The individual's registered address. + attr_accessor :registered_address + # Describes the person’s relationship to the account. + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + attr_accessor :ssn_last_4 + # The individual's verification document information. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :payouts + + def initialize(charges: nil, payouts: nil) + super + @charges = charges + @payouts = payouts + end + end + + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + attr_accessor :display_name + + def initialize(display_name: nil) + super + @display_name = display_name + end + end + + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + attr_accessor :account_holder_name + # Bank BCA business account number + attr_accessor :business_account_number + + def initialize(account_holder_name: nil, business_account_number: nil) + super + @account_holder_name = account_holder_name + @business_account_number = business_account_number + end + end + + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + attr_accessor :secondary_color + + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil) + super + @icon = icon + @logo = logo + @primary_color = primary_color + @secondary_color = secondary_color + end + end + + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + attr_accessor :payout_destination_selector + + def initialize(payout_destination: nil, payout_destination_selector: nil) + super + @payout_destination = payout_destination + @payout_destination_selector = payout_destination_selector + end + end + + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + attr_accessor :cvc_failure + + def initialize(avs_failure: nil, cvc_failure: nil) + super + @avs_failure = avs_failure + @cvc_failure = cvc_failure + end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kanji + + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ) + super + @decline_on = decline_on + @statement_descriptor_prefix = statement_descriptor_prefix + @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana + @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji + end + end + + class Invoices < Stripe::RequestParams + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + attr_accessor :default_account_tax_ids + + def initialize(default_account_tax_ids: nil) + super + @default_account_tax_ids = default_account_tax_ids + end + end + + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kanji + + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ) + super + @statement_descriptor = statement_descriptor + @statement_descriptor_kana = statement_descriptor_kana + @statement_descriptor_kanji = statement_descriptor_kanji + end + end + + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + attr_accessor :weekly_anchor + + def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + super + @delay_days = delay_days + @interval = interval + @monthly_anchor = monthly_anchor + @weekly_anchor = weekly_anchor + end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + attr_accessor :statement_descriptor + + def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil) + super + @debit_negative_balances = debit_negative_balances + @schedule = schedule + @statement_descriptor = statement_descriptor + end + end + + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + attr_accessor :consented_to_paperless_delivery + + def initialize(consented_to_paperless_delivery: nil) + super + @consented_to_paperless_delivery = consented_to_paperless_delivery + end + end + + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + # Settings specific to Bacs Direct Debit payments. + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + attr_accessor :card_issuing + # Settings specific to card charging on the account. + attr_accessor :card_payments + # Settings specific to the account's use of Invoices. + attr_accessor :invoices + # Settings that apply across payment methods for charging on the account. + attr_accessor :payments + # Settings specific to the account's payouts. + attr_accessor :payouts + # Settings specific to the account's tax forms. + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + attr_accessor :treasury + + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + invoices: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ) + super + @bacs_debit_payments = bacs_debit_payments + @bank_bca_onboarding = bank_bca_onboarding + @branding = branding + @capital = capital + @card_issuing = card_issuing + @card_payments = card_payments + @invoices = invoices + @payments = payments + @payouts = payouts + @tax_forms = tax_forms + @treasury = treasury + end + end + + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + attr_accessor :ip + # The user's service agreement type. + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil) + super + @date = date + @ip = ip + @service_agreement = service_agreement + @user_agent = user_agent + end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + attr_accessor :account_token + # Business information about the account. + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :company + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + attr_accessor :tos_acceptance + + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil + ) + super + @account_token = account_token + @business_profile = business_profile + @business_type = business_type + @capabilities = capabilities + @company = company + @default_currency = default_currency + @documents = documents + @email = email + @expand = expand + @external_account = external_account + @groups = groups + @individual = individual + @metadata = metadata + @risk_controls = risk_controls + @settings = settings + @tos_acceptance = tos_acceptance + end + end + + class RetrieveCurrentParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return connected accounts that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ) + super + @object = object + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @country = country + @currency = currency + @routing_number = routing_number + end + end + + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + attr_accessor :fiscal_year_end + + def initialize(amount: nil, currency: nil, fiscal_year_end: nil) + super + @amount = amount + @currency = currency + @fiscal_year_end = fiscal_year_end + end + end + + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The applicant's gross annual revenue for its preceding fiscal year. + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + attr_accessor :support_address + # A publicly available email address for sending support issues to. + attr_accessor :support_email + # A publicly available phone number to call with support issues. + attr_accessor :support_phone + # A publicly available website for handling support issues. + attr_accessor :support_url + # The business's publicly available website. + attr_accessor :url + + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ) + super + @annual_revenue = annual_revenue + @estimated_worker_count = estimated_worker_count + @mcc = mcc + @monthly_estimated_revenue = monthly_estimated_revenue + @name = name + @product_description = product_description + @support_address = support_address + @support_email = support_email + @support_phone = support_phone + @support_url = support_url + @url = url + end + end + + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # The acss_debit_payments capability. + attr_accessor :acss_debit_payments + # The affirm_payments capability. + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + attr_accessor :alma_payments + # The amazon_pay_payments capability. + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + attr_accessor :bank_transfer_payments + # The blik_payments capability. + attr_accessor :blik_payments + # The boleto_payments capability. + attr_accessor :boleto_payments + # The card_issuing capability. + attr_accessor :card_issuing + # The card_payments capability. + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + attr_accessor :cashapp_payments + # The eps_payments capability. + attr_accessor :eps_payments + # The fpx_payments capability. + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + attr_accessor :giropay_payments + # The gopay_payments capability. + attr_accessor :gopay_payments + # The grabpay_payments capability. + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + attr_accessor :ideal_payments + # The india_international_payments capability. + attr_accessor :india_international_payments + # The jcb_payments capability. + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + attr_accessor :klarna_payments + # The konbini_payments capability. + attr_accessor :konbini_payments + # The kr_card_payments capability. + attr_accessor :kr_card_payments + # The legacy_payments capability. + attr_accessor :legacy_payments + # The link_payments capability. + attr_accessor :link_payments + # The mb_way_payments capability. + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + attr_accessor :oxxo_payments + # The p24_payments capability. + attr_accessor :p24_payments + # The payco_payments capability. + attr_accessor :payco_payments + # The paynow_payments capability. + attr_accessor :paynow_payments + # The paypal_payments capability. + attr_accessor :paypal_payments + # The payto_payments capability. + attr_accessor :payto_payments + # The promptpay_payments capability. + attr_accessor :promptpay_payments + # The qris_payments capability. + attr_accessor :qris_payments + # The rechnung_payments capability. + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + attr_accessor :shopeepay_payments + # The sofort_payments capability. + attr_accessor :sofort_payments + # The swish_payments capability. + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + attr_accessor :transfers + # The treasury capability. + attr_accessor :treasury + # The treasury_evolve capability. + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + attr_accessor :zip_payments + + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ) + super + @acss_debit_payments = acss_debit_payments + @affirm_payments = affirm_payments + @afterpay_clearpay_payments = afterpay_clearpay_payments + @alma_payments = alma_payments + @amazon_pay_payments = amazon_pay_payments + @au_becs_debit_payments = au_becs_debit_payments + @automatic_indirect_tax = automatic_indirect_tax + @bacs_debit_payments = bacs_debit_payments + @bancontact_payments = bancontact_payments + @bank_transfer_payments = bank_transfer_payments + @blik_payments = blik_payments + @boleto_payments = boleto_payments + @card_issuing = card_issuing + @card_payments = card_payments + @cartes_bancaires_payments = cartes_bancaires_payments + @cashapp_payments = cashapp_payments + @eps_payments = eps_payments + @fpx_payments = fpx_payments + @gb_bank_transfer_payments = gb_bank_transfer_payments + @giropay_payments = giropay_payments + @gopay_payments = gopay_payments + @grabpay_payments = grabpay_payments + @id_bank_transfer_payments = id_bank_transfer_payments + @id_bank_transfer_payments_bca = id_bank_transfer_payments_bca + @ideal_payments = ideal_payments + @india_international_payments = india_international_payments + @jcb_payments = jcb_payments + @jp_bank_transfer_payments = jp_bank_transfer_payments + @kakao_pay_payments = kakao_pay_payments + @klarna_payments = klarna_payments + @konbini_payments = konbini_payments + @kr_card_payments = kr_card_payments + @legacy_payments = legacy_payments + @link_payments = link_payments + @mb_way_payments = mb_way_payments + @mobilepay_payments = mobilepay_payments + @multibanco_payments = multibanco_payments + @mx_bank_transfer_payments = mx_bank_transfer_payments + @naver_pay_payments = naver_pay_payments + @oxxo_payments = oxxo_payments + @p24_payments = p24_payments + @payco_payments = payco_payments + @paynow_payments = paynow_payments + @paypal_payments = paypal_payments + @payto_payments = payto_payments + @promptpay_payments = promptpay_payments + @qris_payments = qris_payments + @rechnung_payments = rechnung_payments + @revolut_pay_payments = revolut_pay_payments + @samsung_pay_payments = samsung_pay_payments + @sepa_bank_transfer_payments = sepa_bank_transfer_payments + @sepa_debit_payments = sepa_debit_payments + @shopeepay_payments = shopeepay_payments + @sofort_payments = sofort_payments + @swish_payments = swish_payments + @tax_reporting_us_1099_k = tax_reporting_us_1099_k + @tax_reporting_us_1099_misc = tax_reporting_us_1099_misc + @transfers = transfers + @treasury = treasury + @treasury_evolve = treasury_evolve + @treasury_fifth_third = treasury_fifth_third + @treasury_goldman_sachs = treasury_goldman_sachs + @twint_payments = twint_payments + @us_bank_account_ach_payments = us_bank_account_ach_payments + @us_bank_transfer_payments = us_bank_transfer_payments + @zip_payments = zip_payments + end + end + + class Card < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field address_city + attr_accessor :address_city + # Attribute for param field address_country + attr_accessor :address_country + # Attribute for param field address_line1 + attr_accessor :address_line1 + # Attribute for param field address_line2 + attr_accessor :address_line2 + # Attribute for param field address_state + attr_accessor :address_state + # Attribute for param field address_zip + attr_accessor :address_zip + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field cvc + attr_accessor :cvc + # Attribute for param field exp_month + attr_accessor :exp_month + # Attribute for param field exp_year + attr_accessor :exp_year + # Attribute for param field name + attr_accessor :name + # Attribute for param field number + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # Attribute for param field default_for_currency + attr_accessor :default_for_currency + + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ) + super + @object = object + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @number = number + @metadata = metadata + @default_for_currency = default_for_currency + end + end + + class CardToken < Stripe::RequestParams + # Attribute for param field object + attr_accessor :object + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field token + attr_accessor :token + + def initialize(object: nil, currency: nil, token: nil) + super + @object = object + @currency = currency + @token = token + end + end + + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document verifying the business. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # The company's primary address. + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + attr_accessor :export_purpose_code + # The company's legal name. + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_accessor :tax_id_registrar + # The VAT number of the company. + attr_accessor :vat_id + # Information on the verification state of the company. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @directors_provided = directors_provided + @executives_provided = executives_provided + @export_license_id = export_license_id + @export_purpose_code = export_purpose_code + @name = name + @name_kana = name_kana + @name_kanji = name_kanji + @owners_provided = owners_provided + @ownership_declaration = ownership_declaration + @phone = phone + @registration_number = registration_number + @structure = structure + @tax_id = tax_id + @tax_id_registrar = tax_id_registrar + @vat_id = vat_id + @verification = verification + end + end + + class Controller < Stripe::RequestParams + class Application < Stripe::RequestParams + # Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + attr_accessor :loss_liable + # Whether the controller owns onboarding for this account. + attr_accessor :onboarding_owner + # Whether the controller has pricing controls for this account. + attr_accessor :pricing_controls + + def initialize(loss_liable: nil, onboarding_owner: nil, pricing_controls: nil) + super + @loss_liable = loss_liable + @onboarding_owner = onboarding_owner + @pricing_controls = pricing_controls + end + end + + class Dashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Fees < Stripe::RequestParams + # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + attr_accessor :payer + + def initialize(payer: nil) + super + @payer = payer + end + end + + class Losses < Stripe::RequestParams + # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + attr_accessor :payments + + def initialize(payments: nil) + super + @payments = payments + end + end + + class StripeDashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # A hash of configuration describing the Connect application that controls the account. + attr_accessor :application + # Properties of the account's dashboard. + attr_accessor :dashboard + # A hash of configuration for who pays Stripe fees for product usage on this account. + attr_accessor :fees + # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + attr_accessor :losses + # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. + attr_accessor :requirement_collection + # A hash of configuration for Stripe-hosted dashboards. + attr_accessor :stripe_dashboard + + def initialize( + application: nil, + dashboard: nil, + fees: nil, + losses: nil, + requirement_collection: nil, + stripe_dashboard: nil + ) + super + @application = application + @dashboard = dashboard + @fees = fees + @losses = losses + @requirement_collection = requirement_collection + @stripe_dashboard = stripe_dashboard + end + end + + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + attr_accessor :proof_of_registration + + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ) + super + @bank_account_ownership_verification = bank_account_ownership_verification + @company_license = company_license + @company_memorandum_of_association = company_memorandum_of_association + @company_ministerial_decree = company_ministerial_decree + @company_registration_verification = company_registration_verification + @company_tax_id_verification = company_tax_id_verification + @proof_of_registration = proof_of_registration + end + end + + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + attr_accessor :payments_pricing + + def initialize(payments_pricing: nil) + super + @payments_pricing = payments_pricing + end + end + + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ) + super + @director = director + @executive = executive + @owner = owner + @percent_ownership = percent_ownership + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # The individual's primary address. + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + attr_accessor :address_kanji + # The individual's date of birth. + attr_accessor :dob + # The individual's email address. + attr_accessor :email + # The individual's first name. + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + attr_accessor :full_name_aliases + # The individual's gender + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The individual's last name. + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + attr_accessor :last_name_kanji + # The individual's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The individual's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The individual's registered address. + attr_accessor :registered_address + # Describes the person’s relationship to the account. + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + attr_accessor :ssn_last_4 + # The individual's verification document information. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + attr_accessor :pause_requested + + def initialize(pause_requested: nil) + super + @pause_requested = pause_requested + end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :payouts + + def initialize(charges: nil, payouts: nil) + super + @charges = charges + @payouts = payouts + end + end + + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + attr_accessor :display_name + + def initialize(display_name: nil) + super + @display_name = display_name + end + end + + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + attr_accessor :account_holder_name + # Bank BCA business account number + attr_accessor :business_account_number + + def initialize(account_holder_name: nil, business_account_number: nil) + super + @account_holder_name = account_holder_name + @business_account_number = business_account_number + end + end + + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + attr_accessor :secondary_color + + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil) + super + @icon = icon + @logo = logo + @primary_color = primary_color + @secondary_color = secondary_color + end + end + + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + attr_accessor :payout_destination_selector + + def initialize(payout_destination: nil, payout_destination_selector: nil) + super + @payout_destination = payout_destination + @payout_destination_selector = payout_destination_selector + end + end + + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + attr_accessor :cvc_failure + + def initialize(avs_failure: nil, cvc_failure: nil) + super + @avs_failure = avs_failure + @cvc_failure = cvc_failure + end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + attr_accessor :statement_descriptor_prefix_kanji + + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ) + super + @decline_on = decline_on + @statement_descriptor_prefix = statement_descriptor_prefix + @statement_descriptor_prefix_kana = statement_descriptor_prefix_kana + @statement_descriptor_prefix_kanji = statement_descriptor_prefix_kanji + end + end + + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + attr_accessor :statement_descriptor_kanji + + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ) + super + @statement_descriptor = statement_descriptor + @statement_descriptor_kana = statement_descriptor_kana + @statement_descriptor_kanji = statement_descriptor_kanji + end + end + + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + attr_accessor :weekly_anchor + + def initialize(delay_days: nil, interval: nil, monthly_anchor: nil, weekly_anchor: nil) + super + @delay_days = delay_days + @interval = interval + @monthly_anchor = monthly_anchor + @weekly_anchor = weekly_anchor + end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + attr_accessor :statement_descriptor + + def initialize(debit_negative_balances: nil, schedule: nil, statement_descriptor: nil) + super + @debit_negative_balances = debit_negative_balances + @schedule = schedule + @statement_descriptor = statement_descriptor + end + end + + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + attr_accessor :consented_to_paperless_delivery + + def initialize(consented_to_paperless_delivery: nil) + super + @consented_to_paperless_delivery = consented_to_paperless_delivery + end + end + + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + attr_accessor :tos_acceptance + + def initialize(tos_acceptance: nil) + super + @tos_acceptance = tos_acceptance + end + end + # Settings specific to Bacs Direct Debit. + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + attr_accessor :card_issuing + # Settings specific to card charging on the account. + attr_accessor :card_payments + # Settings that apply across payment methods for charging on the account. + attr_accessor :payments + # Settings specific to the account's payouts. + attr_accessor :payouts + # Settings specific to the account's tax forms. + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + attr_accessor :treasury + + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ) + super + @bacs_debit_payments = bacs_debit_payments + @bank_bca_onboarding = bank_bca_onboarding + @branding = branding + @capital = capital + @card_issuing = card_issuing + @card_payments = card_payments + @payments = payments + @payouts = payouts + @tax_forms = tax_forms + @treasury = treasury + end + end + + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + attr_accessor :ip + # The user's service agreement type. + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil) + super + @date = date + @ip = ip + @service_agreement = service_agreement + @user_agent = user_agent + end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + attr_accessor :account_token + # Business information about the account. + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :company + # A hash of configuration describing the account controller's attributes. + attr_accessor :controller + # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. + attr_accessor :country + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + attr_accessor :tos_acceptance + # The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + attr_accessor :type + + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + controller: nil, + country: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil, + type: nil + ) + super + @account_token = account_token + @business_profile = business_profile + @business_type = business_type + @capabilities = capabilities + @company = company + @controller = controller + @country = country + @default_currency = default_currency + @documents = documents + @email = email + @expand = expand + @external_account = external_account + @groups = groups + @individual = individual + @metadata = metadata + @risk_controls = risk_controls + @settings = settings + @tos_acceptance = tos_acceptance + @type = type + end + end + + class RejectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + attr_accessor :reason + + def initialize(expand: nil, reason: nil) + super + @expand = expand + @reason = reason + end + end + # With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. # To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). # diff --git a/lib/stripe/services/account_session_service.rb b/lib/stripe/services/account_session_service.rb index 2947d1f00..824811f15 100644 --- a/lib/stripe/services/account_session_service.rb +++ b/lib/stripe/services/account_session_service.rb @@ -3,6 +3,710 @@ module Stripe class AccountSessionService < StripeService + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class AccountManagement < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class AccountOnboarding < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class AppInstall < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + attr_accessor :allowed_apps + + def initialize(allowed_apps: nil) + super + @allowed_apps = allowed_apps + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class AppViewport < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + attr_accessor :allowed_apps + + def initialize(allowed_apps: nil) + super + @allowed_apps = allowed_apps + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Balances < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :standard_payouts + + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @edit_payout_schedule = edit_payout_schedule + @external_account_collection = external_account_collection + @instant_payouts = instant_payouts + @standard_payouts = standard_payouts + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalFinancing < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalFinancingApplication < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalFinancingPromotion < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class CapitalOverview < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Documents < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class FinancialAccount < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow external accounts to be linked for money transfer. + attr_accessor :external_account_collection + # Whether to allow sending money. + attr_accessor :send_money + # Whether to allow transferring balance. + attr_accessor :transfer_balance + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil, + send_money: nil, + transfer_balance: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + @send_money = send_money + @transfer_balance = transfer_balance + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class FinancialAccountTransactions < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card spend dispute management features. + attr_accessor :card_spend_dispute_management + + def initialize(card_spend_dispute_management: nil) + super + @card_spend_dispute_management = card_spend_dispute_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class IssuingCard < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + attr_accessor :card_management + # Whether to allow card spend dispute management features. + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + attr_accessor :cardholder_management + # Whether to allow spend control management features. + attr_accessor :spend_control_management + + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + spend_control_management: nil + ) + super + @card_management = card_management + @card_spend_dispute_management = card_spend_dispute_management + @cardholder_management = cardholder_management + @spend_control_management = spend_control_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class IssuingCardsList < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + attr_accessor :card_management + # Whether to allow card spend dispute management features. + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + attr_accessor :cardholder_management + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + attr_accessor :disable_stripe_user_authentication + # Whether to allow spend control management features. + attr_accessor :spend_control_management + + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + disable_stripe_user_authentication: nil, + spend_control_management: nil + ) + super + @card_management = card_management + @card_spend_dispute_management = card_spend_dispute_management + @cardholder_management = cardholder_management + @disable_stripe_user_authentication = disable_stripe_user_authentication + @spend_control_management = spend_control_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class NotificationBanner < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @external_account_collection = external_account_collection + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PaymentDetails < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_accessor :refund_management + + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ) + super + @capture_payments = capture_payments + @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management + @dispute_management = dispute_management + @refund_management = refund_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PaymentMethodSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Payments < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + attr_accessor :refund_management + + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ) + super + @capture_payments = capture_payments + @destination_on_behalf_of_charge_management = destination_on_behalf_of_charge_management + @dispute_management = dispute_management + @refund_management = refund_management + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Payouts < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + attr_accessor :standard_payouts + + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ) + super + @disable_stripe_user_authentication = disable_stripe_user_authentication + @edit_payout_schedule = edit_payout_schedule + @external_account_collection = external_account_collection + @instant_payouts = instant_payouts + @standard_payouts = standard_payouts + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PayoutsList < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class Recipients < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow sending money. + attr_accessor :send_money + + def initialize(send_money: nil) + super + @send_money = send_money + end + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # Attribute for param field features + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class ReportingChart < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class TaxRegistrations < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class TaxSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + end + # Whether the embedded component is enabled. + attr_accessor :enabled + # The list of features enabled in the embedded component. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + # Configuration for the account management embedded component. + attr_accessor :account_management + # Configuration for the account onboarding embedded component. + attr_accessor :account_onboarding + # Configuration for the app install component. + attr_accessor :app_install + # Configuration for the app viewport component. + attr_accessor :app_viewport + # Configuration for the balances embedded component. + attr_accessor :balances + # Configuration for the capital financing embedded component. + attr_accessor :capital_financing + # Configuration for the capital financing application embedded component. + attr_accessor :capital_financing_application + # Configuration for the capital financing promotion embedded component. + attr_accessor :capital_financing_promotion + # Configuration for the capital overview embedded component. + attr_accessor :capital_overview + # Configuration for the documents embedded component. + attr_accessor :documents + # Configuration for the financial account component. + attr_accessor :financial_account + # Configuration for the financial account transactions component. + attr_accessor :financial_account_transactions + # Configuration for the issuing card component. + attr_accessor :issuing_card + # Configuration for the issuing cards list component. + attr_accessor :issuing_cards_list + # Configuration for the notification banner embedded component. + attr_accessor :notification_banner + # Configuration for the payment details embedded component. + attr_accessor :payment_details + # Configuration for the payment method settings embedded component. + attr_accessor :payment_method_settings + # Configuration for the payments embedded component. + attr_accessor :payments + # Configuration for the payouts embedded component. + attr_accessor :payouts + # Configuration for the payouts list embedded component. + attr_accessor :payouts_list + # Configuration for the recipients component. + attr_accessor :recipients + # Configuration for the reporting chart embedded component. + attr_accessor :reporting_chart + # Configuration for the tax registrations embedded component. + attr_accessor :tax_registrations + # Configuration for the tax settings embedded component. + attr_accessor :tax_settings + + def initialize( + account_management: nil, + account_onboarding: nil, + app_install: nil, + app_viewport: nil, + balances: nil, + capital_financing: nil, + capital_financing_application: nil, + capital_financing_promotion: nil, + capital_overview: nil, + documents: nil, + financial_account: nil, + financial_account_transactions: nil, + issuing_card: nil, + issuing_cards_list: nil, + notification_banner: nil, + payment_details: nil, + payment_method_settings: nil, + payments: nil, + payouts: nil, + payouts_list: nil, + recipients: nil, + reporting_chart: nil, + tax_registrations: nil, + tax_settings: nil + ) + super + @account_management = account_management + @account_onboarding = account_onboarding + @app_install = app_install + @app_viewport = app_viewport + @balances = balances + @capital_financing = capital_financing + @capital_financing_application = capital_financing_application + @capital_financing_promotion = capital_financing_promotion + @capital_overview = capital_overview + @documents = documents + @financial_account = financial_account + @financial_account_transactions = financial_account_transactions + @issuing_card = issuing_card + @issuing_cards_list = issuing_cards_list + @notification_banner = notification_banner + @payment_details = payment_details + @payment_method_settings = payment_method_settings + @payments = payments + @payouts = payouts + @payouts_list = payouts_list + @recipients = recipients + @reporting_chart = reporting_chart + @tax_registrations = tax_registrations + @tax_settings = tax_settings + end + end + # The identifier of the account to create an Account Session for. + attr_accessor :account + # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). + attr_accessor :components + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(account: nil, components: nil, expand: nil) + super + @account = account + @components = components + @expand = expand + end + end + # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/apple_pay_domain_service.rb b/lib/stripe/services/apple_pay_domain_service.rb index 8adbb1e96..16e308a71 100644 --- a/lib/stripe/services/apple_pay_domain_service.rb +++ b/lib/stripe/services/apple_pay_domain_service.rb @@ -3,6 +3,60 @@ module Stripe class ApplePayDomainService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + # Attribute for param field domain_name + attr_accessor :domain_name + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + domain_name: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @domain_name = domain_name + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Attribute for param field domain_name + attr_accessor :domain_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(domain_name: nil, expand: nil) + super + @domain_name = domain_name + @expand = expand + end + end + # Create an apple pay domain. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/application_fee_refund_service.rb b/lib/stripe/services/application_fee_refund_service.rb index 962ea39b9..d2b03bb69 100644 --- a/lib/stripe/services/application_fee_refund_service.rb +++ b/lib/stripe/services/application_fee_refund_service.rb @@ -3,6 +3,64 @@ module Stripe class ApplicationFeeRefundService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + attr_accessor :amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(amount: nil, expand: nil, metadata: nil) + super + @amount = amount + @expand = expand + @metadata = metadata + end + end + # Refunds an application fee that has previously been collected but not yet refunded. # Funds will be refunded to the Stripe account from which the fee was originally collected. # diff --git a/lib/stripe/services/application_fee_service.rb b/lib/stripe/services/application_fee_service.rb index 75e842564..db2ac9a7b 100644 --- a/lib/stripe/services/application_fee_service.rb +++ b/lib/stripe/services/application_fee_service.rb @@ -10,6 +10,66 @@ def initialize(requestor) @refunds = Stripe::ApplicationFeeRefundService.new(@requestor) end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return application fees for the charge specified by this charge ID. + attr_accessor :charge + # Only return applications fees that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/apps/secret_service.rb b/lib/stripe/services/apps/secret_service.rb index c08d5657c..c83198271 100644 --- a/lib/stripe/services/apps/secret_service.rb +++ b/lib/stripe/services/apps/secret_service.rb @@ -4,6 +4,130 @@ module Stripe module Apps class SecretService < StripeService + class ListParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, scope: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @scope = scope + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + attr_accessor :expires_at + # A name for the secret that's unique within the scope. + attr_accessor :name + # The plaintext secret value to be stored. + attr_accessor :payload + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + + def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil) + super + @expand = expand + @expires_at = expires_at + @name = name + @payload = payload + @scope = scope + end + end + + class FindParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A name for the secret that's unique within the scope. + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + + def initialize(expand: nil, name: nil, scope: nil) + super + @expand = expand + @name = name + @scope = scope + end + end + + class DeleteWhereParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + attr_accessor :user + + def initialize(type: nil, user: nil) + super + @type = type + @user = user + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A name for the secret that's unique within the scope. + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + attr_accessor :scope + + def initialize(expand: nil, name: nil, scope: nil) + super + @expand = expand + @name = name + @scope = scope + end + end + # Create or replace a secret in the secret store. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/balance_service.rb b/lib/stripe/services/balance_service.rb index 787b4c38b..012130fbd 100644 --- a/lib/stripe/services/balance_service.rb +++ b/lib/stripe/services/balance_service.rb @@ -3,6 +3,16 @@ module Stripe class BalanceService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves the current account balance, based on the authentication that was used to make the request. # For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances). def retrieve(params = {}, opts = {}) diff --git a/lib/stripe/services/balance_transaction_service.rb b/lib/stripe/services/balance_transaction_service.rb index 7f856eb8b..92c1aa532 100644 --- a/lib/stripe/services/balance_transaction_service.rb +++ b/lib/stripe/services/balance_transaction_service.rb @@ -3,6 +3,78 @@ module Stripe class BalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return transactions that were created during the given date interval. + attr_accessor :created + # Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + attr_accessor :payout + # Only returns the original transaction. + attr_accessor :source + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + attr_accessor :type + + def initialize( + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + payout: nil, + source: nil, + starting_after: nil, + type: nil + ) + super + @created = created + @currency = currency + @ending_before = ending_before + @expand = expand + @limit = limit + @payout = payout + @source = source + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. # # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. diff --git a/lib/stripe/services/billing/alert_service.rb b/lib/stripe/services/billing/alert_service.rb index e076a8037..fa8395a53 100644 --- a/lib/stripe/services/billing/alert_service.rb +++ b/lib/stripe/services/billing/alert_service.rb @@ -4,6 +4,127 @@ module Stripe module Billing class AlertService < StripeService + class ListParams < Stripe::RequestParams + # Filter results to only include this type of alert. + attr_accessor :alert_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filter results to only include alerts with the given meter. + attr_accessor :meter + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + alert_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + meter: nil, + starting_after: nil + ) + super + @alert_type = alert_type + @ending_before = ending_before + @expand = expand + @limit = limit + @meter = meter + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class UsageThreshold < Stripe::RequestParams + class Filter < Stripe::RequestParams + # Limit the scope to this usage alert only to this customer. + attr_accessor :customer + # What type of filter is being applied to this usage alert. + attr_accessor :type + + def initialize(customer: nil, type: nil) + super + @customer = customer + @type = type + end + end + # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. + attr_accessor :filters + # Defines at which value the alert will fire. + attr_accessor :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + attr_accessor :meter + # Whether the alert should only fire only once, or once per billing cycle. + attr_accessor :recurrence + + def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil) + super + @filters = filters + @gte = gte + @meter = meter + @recurrence = recurrence + end + end + # The type of alert to create. + attr_accessor :alert_type + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The title of the alert. + attr_accessor :title + # The configuration of the usage threshold. + attr_accessor :usage_threshold + + def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil) + super + @alert_type = alert_type + @expand = expand + @title = title + @usage_threshold = usage_threshold + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Reactivates this alert, allowing it to trigger again. def activate(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/credit_balance_summary_service.rb b/lib/stripe/services/billing/credit_balance_summary_service.rb index 8ddc26271..6fef905db 100644 --- a/lib/stripe/services/billing/credit_balance_summary_service.rb +++ b/lib/stripe/services/billing/credit_balance_summary_service.rb @@ -4,6 +4,46 @@ module Stripe module Billing class CreditBalanceSummaryService < StripeService + class RetrieveParams < Stripe::RequestParams + class Filter < Stripe::RequestParams + class ApplicabilityScope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + attr_accessor :price_type + + def initialize(price_type: nil) + super + @price_type = price_type + end + end + # The billing credit applicability scope for which to fetch credit balance summary. + attr_accessor :applicability_scope + # The credit grant for which to fetch credit balance summary. + attr_accessor :credit_grant + # Specify the type of this filter. + attr_accessor :type + + def initialize(applicability_scope: nil, credit_grant: nil, type: nil) + super + @applicability_scope = applicability_scope + @credit_grant = credit_grant + @type = type + end + end + # The customer for which to fetch credit balance summary. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The filter criteria for the credit balance summary. + attr_accessor :filter + + def initialize(customer: nil, expand: nil, filter: nil) + super + @customer = customer + @expand = expand + @filter = filter + end + end + # Retrieves the credit balance summary for a customer. def retrieve(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/credit_balance_transaction_service.rb b/lib/stripe/services/billing/credit_balance_transaction_service.rb index 7bba1bf45..823c61975 100644 --- a/lib/stripe/services/billing/credit_balance_transaction_service.rb +++ b/lib/stripe/services/billing/credit_balance_transaction_service.rb @@ -4,6 +4,48 @@ module Stripe module Billing class CreditBalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # The credit grant for which to fetch credit balance transactions. + attr_accessor :credit_grant + # The customer for which to fetch credit balance transactions. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + credit_grant: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @credit_grant = credit_grant + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieve a list of credit balance transactions. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/credit_grant_service.rb b/lib/stripe/services/billing/credit_grant_service.rb index ccb7414b0..463537093 100644 --- a/lib/stripe/services/billing/credit_grant_service.rb +++ b/lib/stripe/services/billing/credit_grant_service.rb @@ -4,6 +4,167 @@ module Stripe module Billing class CreditGrantService < StripeService + class ListParams < Stripe::RequestParams + # Only return credit grants for this customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + class Monetary < Stripe::RequestParams + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + attr_accessor :currency + # A positive integer representing the amount of the credit grant. + attr_accessor :value + + def initialize(currency: nil, value: nil) + super + @currency = currency + @value = value + end + end + # The monetary amount. + attr_accessor :monetary + # Specify the type of this amount. We currently only support `monetary` billing credits. + attr_accessor :type + + def initialize(monetary: nil, type: nil) + super + @monetary = monetary + @type = type + end + end + + class ApplicabilityConfig < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + attr_accessor :price_type + + def initialize(price_type: nil) + super + @price_type = price_type + end + end + # Specify the scope of this applicability config. + attr_accessor :scope + + def initialize(scope: nil) + super + @scope = scope + end + end + # Amount of this credit grant. + attr_accessor :amount + # Configuration specifying what this credit grant applies to. + attr_accessor :applicability_config + # The category of this credit grant. + attr_accessor :category + # ID of the customer to receive the billing credits. + attr_accessor :customer + # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The time when the billing credits expire. If not specified, the billing credits don't expire. + attr_accessor :expires_at + # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + attr_accessor :metadata + # A descriptive name shown in the Dashboard. + attr_accessor :name + + def initialize( + amount: nil, + applicability_config: nil, + category: nil, + customer: nil, + effective_at: nil, + expand: nil, + expires_at: nil, + metadata: nil, + name: nil + ) + super + @amount = amount + @applicability_config = applicability_config + @category = category + @customer = customer + @effective_at = effective_at + @expand = expand + @expires_at = expires_at + @metadata = metadata + @name = name + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. + attr_accessor :expires_at + # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + attr_accessor :metadata + + def initialize(expand: nil, expires_at: nil, metadata: nil) + super + @expand = expand + @expires_at = expires_at + @metadata = metadata + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class VoidGrantParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a credit grant. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/meter_event_adjustment_service.rb b/lib/stripe/services/billing/meter_event_adjustment_service.rb index f38e0d9ac..807d21a7a 100644 --- a/lib/stripe/services/billing/meter_event_adjustment_service.rb +++ b/lib/stripe/services/billing/meter_event_adjustment_service.rb @@ -4,6 +4,34 @@ module Stripe module Billing class MeterEventAdjustmentService < StripeService + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + attr_accessor :identifier + + def initialize(identifier: nil) + super + @identifier = identifier + end + end + # Specifies which event to cancel. + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_accessor :type + + def initialize(cancel: nil, event_name: nil, expand: nil, type: nil) + super + @cancel = cancel + @event_name = event_name + @expand = expand + @type = type + end + end + # Creates a billing meter event adjustment. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/meter_event_service.rb b/lib/stripe/services/billing/meter_event_service.rb index bf67a6529..6d35ac741 100644 --- a/lib/stripe/services/billing/meter_event_service.rb +++ b/lib/stripe/services/billing/meter_event_service.rb @@ -4,6 +4,28 @@ module Stripe module Billing class MeterEventService < StripeService + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + attr_accessor :payload + # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. + attr_accessor :timestamp + + def initialize(event_name: nil, expand: nil, identifier: nil, payload: nil, timestamp: nil) + super + @event_name = event_name + @expand = expand + @identifier = identifier + @payload = payload + @timestamp = timestamp + end + end + # Creates a billing meter event. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/meter_event_summary_service.rb b/lib/stripe/services/billing/meter_event_summary_service.rb index 0bdcfb378..6e9c2189c 100644 --- a/lib/stripe/services/billing/meter_event_summary_service.rb +++ b/lib/stripe/services/billing/meter_event_summary_service.rb @@ -4,6 +4,46 @@ module Stripe module Billing class MeterEventSummaryService < StripeService + class ListParams < Stripe::RequestParams + # The customer for which to fetch event summaries. + attr_accessor :customer + # The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. + attr_accessor :end_time + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. + attr_accessor :start_time + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). + attr_accessor :value_grouping_window + + def initialize( + customer: nil, + end_time: nil, + ending_before: nil, + expand: nil, + limit: nil, + start_time: nil, + starting_after: nil, + value_grouping_window: nil + ) + super + @customer = customer + @end_time = end_time + @ending_before = ending_before + @expand = expand + @limit = limit + @start_time = start_time + @starting_after = starting_after + @value_grouping_window = value_grouping_window + end + end + # Retrieve a list of billing meter event summaries. def list(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing/meter_service.rb b/lib/stripe/services/billing/meter_service.rb index 6d9001393..ddf682db7 100644 --- a/lib/stripe/services/billing/meter_service.rb +++ b/lib/stripe/services/billing/meter_service.rb @@ -11,6 +11,145 @@ def initialize(requestor) @event_summaries = Stripe::Billing::MeterEventSummaryService.new(@requestor) end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Filter results to only include meters with the given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class CustomerMapping < Stripe::RequestParams + # The key in the meter event payload to use for mapping the event to a customer. + attr_accessor :event_payload_key + # The method for mapping a meter event to a customer. Must be `by_id`. + attr_accessor :type + + def initialize(event_payload_key: nil, type: nil) + super + @event_payload_key = event_payload_key + @type = type + end + end + + class DefaultAggregation < Stripe::RequestParams + # Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value. + attr_accessor :formula + + def initialize(formula: nil) + super + @formula = formula + end + end + + class ValueSettings < Stripe::RequestParams + # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". + attr_accessor :event_payload_key + + def initialize(event_payload_key: nil) + super + @event_payload_key = event_payload_key + end + end + # Fields that specify how to map a meter event to a customer. + attr_accessor :customer_mapping + # The default settings to aggregate a meter's events with. + attr_accessor :default_aggregation + # The meter’s name. Not visible to the customer. + attr_accessor :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + attr_accessor :event_name + # The time window to pre-aggregate meter events for, if any. + attr_accessor :event_time_window + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Fields that specify how to calculate a meter event's value. + attr_accessor :value_settings + + def initialize( + customer_mapping: nil, + default_aggregation: nil, + display_name: nil, + event_name: nil, + event_time_window: nil, + expand: nil, + value_settings: nil + ) + super + @customer_mapping = customer_mapping + @default_aggregation = default_aggregation + @display_name = display_name + @event_name = event_name + @event_time_window = event_time_window + @expand = expand + @value_settings = value_settings + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # The meter’s name. Not visible to the customer. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(display_name: nil, expand: nil) + super + @display_name = display_name + @expand = expand + end + end + + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a billing meter. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing_portal/configuration_service.rb b/lib/stripe/services/billing_portal/configuration_service.rb index eeca9e991..428e66384 100644 --- a/lib/stripe/services/billing_portal/configuration_service.rb +++ b/lib/stripe/services/billing_portal/configuration_service.rb @@ -4,6 +4,478 @@ module Stripe module BillingPortal class ConfigurationService < StripeService + class ListParams < Stripe::RequestParams + # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + attr_accessor :is_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + ending_before: nil, + expand: nil, + is_default: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @ending_before = ending_before + @expand = expand + @is_default = is_default + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + attr_accessor :terms_of_service_url + + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil) + super + @headline = headline + @privacy_policy_url = privacy_policy_url + @terms_of_service_url = terms_of_service_url + end + end + + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + attr_accessor :allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(allowed_updates: nil, enabled: nil) + super + @allowed_updates = allowed_updates + @enabled = enabled + end + end + + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + attr_accessor :options + + def initialize(enabled: nil, options: nil) + super + @enabled = enabled + @options = options + end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + attr_accessor :cancellation_reason + # Whether the feature is enabled. + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + attr_accessor :proration_behavior + + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ) + super + @cancellation_reason = cancellation_reason + @enabled = enabled + @mode = mode + @proration_behavior = proration_behavior + end + end + + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + attr_accessor :prices + # The product id. + attr_accessor :product + + def initialize(prices: nil, product: nil) + super + @prices = prices + @product = product + end + end + + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + attr_accessor :conditions + + def initialize(conditions: nil) + super + @conditions = conditions + end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + attr_accessor :schedule_at_period_end + + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ) + super + @default_allowed_updates = default_allowed_updates + @enabled = enabled + @products = products + @proration_behavior = proration_behavior + @schedule_at_period_end = schedule_at_period_end + end + end + # Information about updating the customer details in the portal. + attr_accessor :customer_update + # Information about showing the billing history in the portal. + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + attr_accessor :subscription_update + + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ) + super + @customer_update = customer_update + @invoice_history = invoice_history + @payment_method_update = payment_method_update + @subscription_cancel = subscription_cancel + @subscription_update = subscription_update + end + end + + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # The business information shown to customers in the portal. + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the features available in the portal. + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ) + super + @business_profile = business_profile + @default_return_url = default_return_url + @expand = expand + @features = features + @login_page = login_page + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + attr_accessor :terms_of_service_url + + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil) + super + @headline = headline + @privacy_policy_url = privacy_policy_url + @terms_of_service_url = terms_of_service_url + end + end + + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + attr_accessor :allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(allowed_updates: nil, enabled: nil) + super + @allowed_updates = allowed_updates + @enabled = enabled + end + end + + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + attr_accessor :options + + def initialize(enabled: nil, options: nil) + super + @enabled = enabled + @options = options + end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + attr_accessor :cancellation_reason + # Whether the feature is enabled. + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + attr_accessor :proration_behavior + + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ) + super + @cancellation_reason = cancellation_reason + @enabled = enabled + @mode = mode + @proration_behavior = proration_behavior + end + end + + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + attr_accessor :prices + # The product id. + attr_accessor :product + + def initialize(prices: nil, product: nil) + super + @prices = prices + @product = product + end + end + + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + attr_accessor :conditions + + def initialize(conditions: nil) + super + @conditions = conditions + end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + attr_accessor :schedule_at_period_end + + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ) + super + @default_allowed_updates = default_allowed_updates + @enabled = enabled + @products = products + @proration_behavior = proration_behavior + @schedule_at_period_end = schedule_at_period_end + end + end + # Information about updating the customer details in the portal. + attr_accessor :customer_update + # Information about showing the billing history in the portal. + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + attr_accessor :subscription_update + + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ) + super + @customer_update = customer_update + @invoice_history = invoice_history + @payment_method_update = payment_method_update + @subscription_cancel = subscription_cancel + @subscription_update = subscription_update + end + end + + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + # + # Set to `false` to deactivate the `login_page.url`. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # Whether the configuration is active and can be used to create portal sessions. + attr_accessor :active + # The business information shown to customers in the portal. + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the features available in the portal. + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + active: nil, + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ) + super + @active = active + @business_profile = business_profile + @default_return_url = default_return_url + @expand = expand + @features = features + @login_page = login_page + @metadata = metadata + end + end + # Creates a configuration that describes the functionality and behavior of a PortalSession def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/billing_portal/session_service.rb b/lib/stripe/services/billing_portal/session_service.rb index 7bb21bfd5..24cb66d4b 100644 --- a/lib/stripe/services/billing_portal/session_service.rb +++ b/lib/stripe/services/billing_portal/session_service.rb @@ -4,6 +4,191 @@ module Stripe module BillingPortal class SessionService < StripeService + class CreateParams < Stripe::RequestParams + class FlowData < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the flow is completed. + attr_accessor :custom_message + + def initialize(custom_message: nil) + super + @custom_message = custom_message + end + end + + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the flow is completed. + attr_accessor :return_url + + def initialize(return_url: nil) + super + @return_url = return_url + end + end + # Configuration when `after_completion.type=hosted_confirmation`. + attr_accessor :hosted_confirmation + # Configuration when `after_completion.type=redirect`. + attr_accessor :redirect + # The specified behavior after the flow is completed. + attr_accessor :type + + def initialize(hosted_confirmation: nil, redirect: nil, type: nil) + super + @hosted_confirmation = hosted_confirmation + @redirect = redirect + @type = type + end + end + + class SubscriptionCancel < Stripe::RequestParams + class Retention < Stripe::RequestParams + class CouponOffer < Stripe::RequestParams + # The ID of the coupon to be offered. + attr_accessor :coupon + + def initialize(coupon: nil) + super + @coupon = coupon + end + end + # Configuration when `retention.type=coupon_offer`. + attr_accessor :coupon_offer + # Type of retention strategy to use with the customer. + attr_accessor :type + + def initialize(coupon_offer: nil, type: nil) + super + @coupon_offer = coupon_offer + @type = type + end + end + # Specify a retention strategy to be used in the cancellation flow. + attr_accessor :retention + # The ID of the subscription to be canceled. + attr_accessor :subscription + + def initialize(retention: nil, subscription: nil) + super + @retention = retention + @subscription = subscription + end + end + + class SubscriptionUpdate < Stripe::RequestParams + # The ID of the subscription to be updated. + attr_accessor :subscription + + def initialize(subscription: nil) + super + @subscription = subscription + end + end + + class SubscriptionUpdateConfirm < Stripe::RequestParams + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this subscription update. + attr_accessor :coupon + # The ID of a promotion code to apply to this subscription update. + attr_accessor :promotion_code + + def initialize(coupon: nil, promotion_code: nil) + super + @coupon = coupon + @promotion_code = promotion_code + end + end + + class Item < Stripe::RequestParams + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + attr_accessor :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + attr_accessor :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + attr_accessor :quantity + + def initialize(id: nil, price: nil, quantity: nil) + super + @id = id + @price = price + @quantity = quantity + end + end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + attr_accessor :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + attr_accessor :items + # The ID of the subscription to be updated. + attr_accessor :subscription + + def initialize(discounts: nil, items: nil, subscription: nil) + super + @discounts = discounts + @items = items + @subscription = subscription + end + end + # Behavior after the flow is completed. + attr_accessor :after_completion + # Configuration when `flow_data.type=subscription_cancel`. + attr_accessor :subscription_cancel + # Configuration when `flow_data.type=subscription_update`. + attr_accessor :subscription_update + # Configuration when `flow_data.type=subscription_update_confirm`. + attr_accessor :subscription_update_confirm + # Type of flow that the customer will go through. + attr_accessor :type + + def initialize( + after_completion: nil, + subscription_cancel: nil, + subscription_update: nil, + subscription_update_confirm: nil, + type: nil + ) + super + @after_completion = after_completion + @subscription_cancel = subscription_cancel + @subscription_update = subscription_update + @subscription_update_confirm = subscription_update_confirm + @type = type + end + end + # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. + attr_accessor :configuration + # The ID of an existing customer. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + attr_accessor :flow_data + # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + attr_accessor :locale + # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + attr_accessor :on_behalf_of + # The default URL to redirect customers to when they click on the portal's link to return to your website. + attr_accessor :return_url + + def initialize( + configuration: nil, + customer: nil, + expand: nil, + flow_data: nil, + locale: nil, + on_behalf_of: nil, + return_url: nil + ) + super + @configuration = configuration + @customer = customer + @expand = expand + @flow_data = flow_data + @locale = locale + @on_behalf_of = on_behalf_of + @return_url = return_url + end + end + # Creates a session of the customer portal. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/capital/financing_offer_service.rb b/lib/stripe/services/capital/financing_offer_service.rb index ca9aaecfb..df4a6f930 100644 --- a/lib/stripe/services/capital/financing_offer_service.rb +++ b/lib/stripe/services/capital/financing_offer_service.rb @@ -4,6 +4,80 @@ module Stripe module Capital class FinancingOfferService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # limit list to offers belonging to given connected account + attr_accessor :connected_account + # Only return offers that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # limit list to offers with given status + attr_accessor :status + + def initialize( + connected_account: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @connected_account = connected_account + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class MarkDeliveredParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves the financing offers available for Connected accounts that belong to your platform. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/capital/financing_summary_service.rb b/lib/stripe/services/capital/financing_summary_service.rb index e291c21b9..67eb2e1b3 100644 --- a/lib/stripe/services/capital/financing_summary_service.rb +++ b/lib/stripe/services/capital/financing_summary_service.rb @@ -4,6 +4,16 @@ module Stripe module Capital class FinancingSummaryService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieve the financing state for the account that was authenticated in the request. def retrieve(params = {}, opts = {}) request( diff --git a/lib/stripe/services/capital/financing_transaction_service.rb b/lib/stripe/services/capital/financing_transaction_service.rb index 466fb2d92..236d1c262 100644 --- a/lib/stripe/services/capital/financing_transaction_service.rb +++ b/lib/stripe/services/capital/financing_transaction_service.rb @@ -4,6 +4,56 @@ module Stripe module Capital class FinancingTransactionService < StripeService + class ListParams < Stripe::RequestParams + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. + attr_accessor :charge + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns transactions that were created that apply to this financing offer ID. + attr_accessor :financing_offer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only returns transactions that are responsible for reversing this financing transaction ID. + attr_accessor :reversed_transaction + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. + attr_accessor :treasury_transaction + + def initialize( + charge: nil, + ending_before: nil, + expand: nil, + financing_offer: nil, + limit: nil, + reversed_transaction: nil, + starting_after: nil, + treasury_transaction: nil + ) + super + @charge = charge + @ending_before = ending_before + @expand = expand + @financing_offer = financing_offer + @limit = limit + @reversed_transaction = reversed_transaction + @starting_after = starting_after + @treasury_transaction = treasury_transaction + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of financing transactions. The transactions are returned in sorted order, # with the most recent transactions appearing first. def list(params = {}, opts = {}) diff --git a/lib/stripe/services/charge_service.rb b/lib/stripe/services/charge_service.rb index 4a236f210..e54e251c7 100644 --- a/lib/stripe/services/charge_service.rb +++ b/lib/stripe/services/charge_service.rb @@ -3,6 +3,1814 @@ module Stripe class ChargeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return charges that were created during the given date interval. + attr_accessor :created + # Only return charges for the customer specified by this customer ID. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return charges for this transfer group, limited to 100. + attr_accessor :transfer_group + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil, + transfer_group: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + @transfer_group = transfer_group + end + end + + class CreateParams < Stripe::RequestParams + class Destination < Stripe::RequestParams + # ID of an existing, connected Stripe account. + attr_accessor :account + # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. + attr_accessor :amount + + def initialize(account: nil, amount: nil) + super + @account = account + @amount = amount + end + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + attr_accessor :amount + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # Attribute for param field application_fee + attr_accessor :application_fee + # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). + attr_accessor :application_fee_amount + # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. + attr_accessor :capture + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of an existing customer that will be charged in this request. + attr_accessor :customer + # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + attr_accessor :description + # Attribute for param field destination + attr_accessor :destination + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). + attr_accessor :on_behalf_of + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + attr_accessor :shipping + # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. + attr_accessor :source + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). + attr_accessor :transfer_group + + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + capture: nil, + currency: nil, + customer: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + on_behalf_of: nil, + radar_options: nil, + receipt_email: nil, + shipping: nil, + source: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @amount = amount + @application_fee = application_fee + @application_fee_amount = application_fee_amount + @capture = capture + @currency = currency + @customer = customer + @description = description + @destination = destination + @expand = expand + @metadata = metadata + @on_behalf_of = on_behalf_of + @radar_options = radar_options + @receipt_email = receipt_email + @shipping = shipping + @source = source + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class FraudDetails < Stripe::RequestParams + # Either `safe` or `fraudulent`. + attr_accessor :user_report + + def initialize(user_report: nil) + super + @user_report = user_report + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + attr_accessor :customer + # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + attr_accessor :fraud_details + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + attr_accessor :shipping + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_accessor :transfer_group + + def initialize( + customer: nil, + description: nil, + expand: nil, + fraud_details: nil, + metadata: nil, + payment_details: nil, + receipt_email: nil, + shipping: nil, + transfer_group: nil + ) + super + @customer = customer + @description = description + @expand = expand + @fraud_details = fraud_details + @metadata = metadata + @payment_details = payment_details + @receipt_email = receipt_email + @shipping = shipping + @transfer_group = transfer_group + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class CaptureParams < Stripe::RequestParams + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. + attr_accessor :amount + # An application fee to add on to this charge. + attr_accessor :application_fee + # An application fee amount to add on to this charge, which must be less than or equal to the original amount. + attr_accessor :application_fee_amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + attr_accessor :receipt_email + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_accessor :transfer_group + + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + expand: nil, + payment_details: nil, + receipt_email: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @amount = amount + @application_fee = application_fee + @application_fee_amount = application_fee_amount + @expand = expand + @payment_details = payment_details + @receipt_email = receipt_email + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. # # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. diff --git a/lib/stripe/services/checkout/session_line_item_service.rb b/lib/stripe/services/checkout/session_line_item_service.rb index f1a5a56b7..05e2b98b6 100644 --- a/lib/stripe/services/checkout/session_line_item_service.rb +++ b/lib/stripe/services/checkout/session_line_item_service.rb @@ -4,6 +4,25 @@ module Stripe module Checkout class SessionLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(session, params = {}, opts = {}) request( diff --git a/lib/stripe/services/checkout/session_service.rb b/lib/stripe/services/checkout/session_service.rb index bfe755025..56fc6a652 100644 --- a/lib/stripe/services/checkout/session_service.rb +++ b/lib/stripe/services/checkout/session_service.rb @@ -11,6 +11,2591 @@ def initialize(requestor) @line_items = Stripe::Checkout::SessionLineItemService.new(@requestor) end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CustomerDetails < Stripe::RequestParams + # Customer's email address. + attr_accessor :email + + def initialize(email: nil) + super + @email = email + end + end + # Only return Checkout Sessions that were created during the given date interval. + attr_accessor :created + # Only return the Checkout Sessions for the Customer specified. + attr_accessor :customer + # Only return the Checkout Sessions for the Customer details specified. + attr_accessor :customer_details + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return the Checkout Session for the PaymentIntent specified. + attr_accessor :payment_intent + # Only return the Checkout Sessions for the Payment Link specified. + attr_accessor :payment_link + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return the Checkout Sessions matching the given status. + attr_accessor :status + # Only return the Checkout Session for the subscription specified. + attr_accessor :subscription + + def initialize( + created: nil, + customer: nil, + customer_details: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + payment_link: nil, + starting_after: nil, + status: nil, + subscription: nil + ) + super + @created = created + @customer = customer + @customer_details = customer_details + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @payment_link = payment_link + @starting_after = starting_after + @status = status + @subscription = subscription + end + end + + class CreateParams < Stripe::RequestParams + class AdaptivePricing < Stripe::RequestParams + # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class AfterExpiration < Stripe::RequestParams + class Recovery < Stripe::RequestParams + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + attr_accessor :allow_promotion_codes + # If `true`, a recovery URL will be generated to recover this Checkout Session if it + # expires before a successful transaction is completed. It will be attached to the + # Checkout Session object upon expiration. + attr_accessor :enabled + + def initialize(allow_promotion_codes: nil, enabled: nil) + super + @allow_promotion_codes = allow_promotion_codes + @enabled = enabled + end + end + # Configure a Checkout Session that can be used to recover an expired session. + attr_accessor :recovery + + def initialize(recovery: nil) + super + @recovery = recovery + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + attr_accessor :position + + def initialize(position: nil) + super + @position = position + end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + attr_accessor :terms_of_service + + def initialize( + payment_method_reuse_agreement: nil, + promotions: nil, + terms_of_service: nil + ) + super + @payment_method_reuse_agreement = payment_method_reuse_agreement + @promotions = promotions + @terms_of_service = terms_of_service + end + end + + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_accessor :value + + def initialize(label: nil, value: nil) + super + @label = label + @value = value + end + end + # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + attr_accessor :default_value + # The options available for the customer to select. Up to 200 options allowed. + attr_accessor :options + + def initialize(default_value: nil, options: nil) + super + @default_value = default_value + @options = options + end + end + + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_accessor :custom + # The type of the label. + attr_accessor :type + + def initialize(custom: nil, type: nil) + super + @custom = custom + @type = type + end + end + + class Numeric < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil) + super + @default_value = default_value + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + + class Text < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil) + super + @default_value = default_value + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + # Configuration for `type=dropdown` fields. + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_accessor :key + # The label for the field, displayed to the customer. + attr_accessor :label + # Configuration for `type=numeric` fields. + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_accessor :optional + # Configuration for `type=text` fields. + attr_accessor :text + # The type of the field. + attr_accessor :type + + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ) + super + @dropdown = dropdown + @key = key + @label = label + @numeric = numeric + @optional = optional + @text = text + @type = type + end + end + + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + # Custom text that should be displayed after the payment confirmation button. + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_accessor :terms_of_service_acceptance + + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ) + super + @after_submit = after_submit + @shipping_address = shipping_address + @submit = submit + @terms_of_service_acceptance = terms_of_service_acceptance + end + end + + class CustomerUpdate < Stripe::RequestParams + # Describes whether Checkout saves the billing address onto `customer.address`. + # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. + attr_accessor :address + # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + attr_accessor :name + # Describes whether Checkout saves shipping information onto `customer.shipping`. + # To collect shipping information, use `shipping_address_collection`. Defaults to `never`. + attr_accessor :shipping + + def initialize(address: nil, name: nil, shipping: nil) + super + @address = address + @name = name + @shipping = shipping + end + end + + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this Session. + attr_accessor :coupon + # The ID of a promotion code to apply to this Session. + attr_accessor :promotion_code + + def initialize(coupon: nil, promotion_code: nil) + super + @coupon = coupon + @promotion_code = promotion_code + end + end + + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + + def initialize(amount_tax_display: nil) + super + @amount_tax_display = amount_tax_display + end + end + # The account tax IDs associated with the invoice. + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ) + super + @account_tax_ids = account_tax_ids + @custom_fields = custom_fields + @description = description + @footer = footer + @issuer = issuer + @metadata = metadata + @rendering_options = rendering_options + end + end + # Set to `true` to enable invoice creation. + attr_accessor :enabled + # Parameters passed when creating invoices for payment-mode Checkout Sessions. + attr_accessor :invoice_data + + def initialize(enabled: nil, invoice_data: nil) + super + @enabled = enabled + @invoice_data = invoice_data + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative integer. + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + attr_accessor :adjustable_quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. + attr_accessor :dynamic_tax_rates + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + attr_accessor :tax_rates + + def initialize( + adjustable_quantity: nil, + dynamic_tax_rates: nil, + metadata: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @adjustable_quantity = adjustable_quantity + @dynamic_tax_rates = dynamic_tax_rates + @metadata = metadata + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class PaymentIntentData < Stripe::RequestParams + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. For details, + # see the PaymentIntents [use case for connected + # accounts](/docs/payments/connected-accounts). + attr_accessor :on_behalf_of + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment + # method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the + # customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the + # customer that their payment details will be saved and used for future + # payments. + # + # If a Customer has been provided or Checkout creates a new Customer, + # Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached + # to a Customer. To reuse the payment method, you can retrieve it from the + # Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` + # to dynamically optimize your payment flow and comply with regional + # legislation and network rules, such as SCA. + attr_accessor :setup_future_usage + # Shipping information for this payment. + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # The parameters used to automatically create a Transfer when the payment succeeds. + # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + application_fee_amount: nil, + capture_method: nil, + description: nil, + metadata: nil, + on_behalf_of: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @application_fee_amount = application_fee_amount + @capture_method = capture_method + @description = description + @metadata = metadata + @on_behalf_of = on_behalf_of + @receipt_email = receipt_email + @setup_future_usage = setup_future_usage + @shipping = shipping + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + + class PaymentMethodData < Stripe::RequestParams + # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. + attr_accessor :allow_redisplay + + def initialize(allow_redisplay: nil) + super + @allow_redisplay = allow_redisplay + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). This is only accepted for Checkout Sessions in `setup` mode. + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Verification method for the intent + attr_accessor :verification_method + + def initialize( + currency: nil, + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @currency = currency + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class AmazonPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + # Setting to true enables installments for this Checkout Session. + # Setting to false will prevent any installment plan from applying to a payment. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # Installment options for card payments + attr_accessor :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + attr_accessor :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + attr_accessor :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + + def initialize( + installments: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_three_d_secure: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil + ) + super + @installments = installments + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_three_d_secure = request_three_d_secure + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + end + end + + class Cashapp < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + + def initialize(expires_after_seconds: nil) + super + @expires_after_seconds = expires_after_seconds + end + end + + class RevolutPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + attr_accessor :reference + + def initialize(reference: nil) + super + @reference = reference + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(permissions: nil, prefetch: nil) + super + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Verification method for the intent + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + # contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # contains details about the Affirm payment method options. + attr_accessor :affirm + # contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # contains details about the Alipay payment method options. + attr_accessor :alipay + # contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # contains details about the AU Becs Debit payment method options. + attr_accessor :au_becs_debit + # contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # contains details about the Bancontact payment method options. + attr_accessor :bancontact + # contains details about the Boleto payment method options. + attr_accessor :boleto + # contains details about the Card payment method options. + attr_accessor :card + # contains details about the Cashapp Pay payment method options. + attr_accessor :cashapp + # contains details about the Customer Balance payment method options. + attr_accessor :customer_balance + # contains details about the EPS payment method options. + attr_accessor :eps + # contains details about the FPX payment method options. + attr_accessor :fpx + # contains details about the Giropay payment method options. + attr_accessor :giropay + # contains details about the Grabpay payment method options. + attr_accessor :grabpay + # contains details about the Ideal payment method options. + attr_accessor :ideal + # contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # contains details about the Klarna payment method options. + attr_accessor :klarna + # contains details about the Konbini payment method options. + attr_accessor :konbini + # contains details about the Korean card payment method options. + attr_accessor :kr_card + # contains details about the Link payment method options. + attr_accessor :link + # contains details about the Mobilepay payment method options. + attr_accessor :mobilepay + # contains details about the Multibanco payment method options. + attr_accessor :multibanco + # contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # contains details about the OXXO payment method options. + attr_accessor :oxxo + # contains details about the P24 payment method options. + attr_accessor :p24 + # contains details about the PAYCO payment method options. + attr_accessor :payco + # contains details about the PayNow payment method options. + attr_accessor :paynow + # contains details about the PayPal payment method options. + attr_accessor :paypal + # contains details about the PayTo payment method options. + attr_accessor :payto + # contains details about the Pix payment method options. + attr_accessor :pix + # contains details about the RevolutPay payment method options. + attr_accessor :revolut_pay + # contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # contains details about the Sepa Debit payment method options. + attr_accessor :sepa_debit + # contains details about the Sofort payment method options. + attr_accessor :sofort + # contains details about the Swish payment method options. + attr_accessor :swish + # contains details about the Us Bank Account payment method options. + attr_accessor :us_bank_account + # contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + grabpay: nil, + ideal: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + sofort: nil, + swish: nil, + us_bank_account: nil, + wechat_pay: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @boleto = boleto + @card = card + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @grabpay = grabpay + @ideal = ideal + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @sofort = sofort + @swish = swish + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + end + end + + class Permissions < Stripe::RequestParams + class Update < Stripe::RequestParams + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + attr_accessor :line_items + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + attr_accessor :shipping_details + + def initialize(line_items: nil, shipping_details: nil) + super + @line_items = line_items + @shipping_details = shipping_details + end + end + # Permissions for updating the Checkout Session. + attr_accessor :update + + def initialize(update: nil) + super + @update = update + end + end + + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class SavedPaymentMethodOptions < Stripe::RequestParams + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + attr_accessor :allow_redisplay_filters + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + attr_accessor :payment_method_save + + def initialize(allow_redisplay_filters: nil, payment_method_save: nil) + super + @allow_redisplay_filters = allow_redisplay_filters + @payment_method_save = payment_method_save + end + end + + class SetupIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account for which the setup is intended. + attr_accessor :on_behalf_of + + def initialize(description: nil, metadata: nil, on_behalf_of: nil) + super + @description = description + @metadata = metadata + @on_behalf_of = on_behalf_of + end + end + + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + attr_accessor :allowed_countries + + def initialize(allowed_countries: nil) + super + @allowed_countries = allowed_countries + end + end + + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the Shipping Rate to use for this shipping option. + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(issuer: nil) + super + @issuer = issuer + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # A future timestamp to anchor the subscription's billing cycle for new subscriptions. + attr_accessor :billing_cycle_anchor + # The tax rates that will apply to any subscription item that does not have + # `tax_rates` set. Invoices created will have their `default_tax_rates` populated + # from the subscription. + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. + # Use this field to optionally store an explanation of the subscription + # for rendering in the [customer portal](https://stripe.com/docs/customer-management). + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the subscription's invoices. + attr_accessor :on_behalf_of + # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer + # will get before being charged for the first time. Has to be at least + # 48 hours in the future. + attr_accessor :trial_end + # Integer representing the number of trial period days before the + # customer is charged for the first time. Has to be at least 1. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + application_fee_percent: nil, + billing_cycle_anchor: nil, + default_tax_rates: nil, + description: nil, + invoice_settings: nil, + metadata: nil, + on_behalf_of: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @application_fee_percent = application_fee_percent + @billing_cycle_anchor = billing_cycle_anchor + @default_tax_rates = default_tax_rates + @description = description + @invoice_settings = invoice_settings + @metadata = metadata + @on_behalf_of = on_behalf_of + @proration_behavior = proration_behavior + @transfer_data = transfer_data + @trial_end = trial_end + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + attr_accessor :required + + def initialize(enabled: nil, required: nil) + super + @enabled = enabled + @required = required + end + end + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + attr_accessor :adaptive_pricing + # Configure actions after a Checkout Session has expired. + attr_accessor :after_expiration + # Enables user redeemable promotion codes. + attr_accessor :allow_promotion_codes + # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + attr_accessor :automatic_tax + # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. + attr_accessor :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. + attr_accessor :cancel_url + # A unique string to reference the Checkout Session. This can be a + # customer ID, a cart ID, or similar, and can be used to reconcile the + # session with your internal systems. + attr_accessor :client_reference_id + # Configure fields for the Checkout Session to gather active consent from customers. + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Required in `setup` mode when `payment_method_types` is not set. + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + attr_accessor :custom_text + # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card + # payment method will be used to prefill the email, name, card details, and billing address + # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + # + # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + # + # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. + # + # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + attr_accessor :customer + # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + # + # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + # + # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) + # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + # + # Can only be set in `payment` and `setup` mode. + attr_accessor :customer_creation + # If provided, this value will be used when the Customer object is created. + # If not provided, customers will be asked to enter their email address. + # Use this parameter to prefill customer data if you already have an email + # on file. To access information about the customer once a session is + # complete, use the `customer` field. + attr_accessor :customer_email + # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + attr_accessor :customer_update + # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + attr_accessor :expires_at + # Generate a post-purchase Invoice for one-time payments. + attr_accessor :invoice_creation + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # + # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + # + # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + attr_accessor :line_items + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + attr_accessor :locale + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + attr_accessor :mode + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + # This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + attr_accessor :payment_method_collection + # The ID of the payment method configuration to use with this Checkout session. + attr_accessor :payment_method_configuration + # This parameter allows you to set some attributes on the payment method created during a Checkout session. + attr_accessor :payment_method_data + # Payment-method-specific configuration. + attr_accessor :payment_method_options + # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + # + # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. + # + # Read more about the supported payment methods and their requirements in our [payment + # method details guide](/docs/payments/checkout/payment-methods). + # + # If multiple payment methods are passed, Checkout will dynamically reorder them to + # prioritize the most relevant payment methods based on the customer's location and + # other characteristics. + attr_accessor :payment_method_types + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + # + # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + attr_accessor :permissions + # Controls phone number collection settings for the session. + # + # We recommend that you review your privacy policy and check with your legal contacts + # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + attr_accessor :phone_number_collection + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + attr_accessor :redirect_on_completion + # The URL to redirect your customer back to after they authenticate or cancel their payment on the + # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` + # and redirect-based payment methods are enabled on the session. + attr_accessor :return_url + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + attr_accessor :saved_payment_method_options + # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + attr_accessor :setup_intent_data + # When set, provides configuration for Checkout to collect a shipping address from a customer. + attr_accessor :shipping_address_collection + # The shipping rate options to apply to this Session. Up to a maximum of 5. + attr_accessor :shipping_options + # Describes the type of transaction being performed by Checkout in order to customize + # relevant text on the page, such as the submit button. `submit_type` can only be + # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + attr_accessor :submit_type + # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + attr_accessor :subscription_data + # The URL to which Stripe should send customers when payment or setup + # is complete. + # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use + # information from the successful Checkout Session on your page, read the + # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + attr_accessor :success_url + # Controls tax ID collection during checkout. + attr_accessor :tax_id_collection + # The UI mode of the Session. Defaults to `hosted`. + attr_accessor :ui_mode + + def initialize( + adaptive_pricing: nil, + after_expiration: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + cancel_url: nil, + client_reference_id: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer: nil, + customer_creation: nil, + customer_email: nil, + customer_update: nil, + discounts: nil, + expand: nil, + expires_at: nil, + invoice_creation: nil, + line_items: nil, + locale: nil, + metadata: nil, + mode: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + permissions: nil, + phone_number_collection: nil, + redirect_on_completion: nil, + return_url: nil, + saved_payment_method_options: nil, + setup_intent_data: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + success_url: nil, + tax_id_collection: nil, + ui_mode: nil + ) + super + @adaptive_pricing = adaptive_pricing + @after_expiration = after_expiration + @allow_promotion_codes = allow_promotion_codes + @automatic_tax = automatic_tax + @billing_address_collection = billing_address_collection + @cancel_url = cancel_url + @client_reference_id = client_reference_id + @consent_collection = consent_collection + @currency = currency + @custom_fields = custom_fields + @custom_text = custom_text + @customer = customer + @customer_creation = customer_creation + @customer_email = customer_email + @customer_update = customer_update + @discounts = discounts + @expand = expand + @expires_at = expires_at + @invoice_creation = invoice_creation + @line_items = line_items + @locale = locale + @metadata = metadata + @mode = mode + @payment_intent_data = payment_intent_data + @payment_method_collection = payment_method_collection + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @permissions = permissions + @phone_number_collection = phone_number_collection + @redirect_on_completion = redirect_on_completion + @return_url = return_url + @saved_payment_method_options = saved_payment_method_options + @setup_intent_data = setup_intent_data + @shipping_address_collection = shipping_address_collection + @shipping_options = shipping_options + @submit_type = submit_type + @subscription_data = subscription_data + @success_url = success_url + @tax_id_collection = tax_id_collection + @ui_mode = ui_mode + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CollectedInformation < Stripe::RequestParams + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The address of the customer + attr_accessor :address + # The name of customer + attr_accessor :name + + def initialize(address: nil, name: nil) + super + @address = address + @name = name + end + end + # The shipping details to apply to this Session. + attr_accessor :shipping_details + + def initialize(shipping_details: nil) + super + @shipping_details = shipping_details + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + attr_accessor :adjustable_quantity + # ID of an existing line item. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices). + attr_accessor :price + # The quantity of the line item being purchased. + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + attr_accessor :tax_rates + + def initialize( + adjustable_quantity: nil, + id: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil + ) + super + @adjustable_quantity = adjustable_quantity + @id = id + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + end + end + + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the Shipping Rate to use for this shipping option. + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + # Information about the customer collected within the Checkout Session. + attr_accessor :collected_information + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A list of items the customer is purchasing. + # + # When updating line items, you must retransmit the entire array of line items. + # + # To retain an existing line item, specify its `id`. + # + # To update an existing line item, specify its `id` along with the new values of the fields to update. + # + # To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices. + # + # To remove an existing line item, omit the line item's ID from the retransmitted array. + # + # To reorder a line item, specify it at the desired position in the retransmitted array. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The shipping rate options to apply to this Session. Up to a maximum of 5. + attr_accessor :shipping_options + + def initialize( + collected_information: nil, + expand: nil, + line_items: nil, + metadata: nil, + shipping_options: nil + ) + super + @collected_information = collected_information + @expand = expand + @line_items = line_items + @metadata = metadata + @shipping_options = shipping_options + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a Session object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/climate/order_service.rb b/lib/stripe/services/climate/order_service.rb index ee37d3a8b..42b287baf 100644 --- a/lib/stripe/services/climate/order_service.rb +++ b/lib/stripe/services/climate/order_service.rb @@ -4,6 +4,115 @@ module Stripe module Climate class OrderService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + attr_accessor :public_name + + def initialize(public_name: nil) + super + @public_name = public_name + end + end + # Requested amount of carbon removal units. Either this or `metric_tons` must be specified. + attr_accessor :amount + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + attr_accessor :beneficiary + # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Requested number of tons for the order. Either this or `amount` must be specified. + attr_accessor :metric_tons + # Unique identifier of the Climate product. + attr_accessor :product + + def initialize( + amount: nil, + beneficiary: nil, + currency: nil, + expand: nil, + metadata: nil, + metric_tons: nil, + product: nil + ) + super + @amount = amount + @beneficiary = beneficiary + @currency = currency + @expand = expand + @metadata = metadata + @metric_tons = metric_tons + @product = product + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + attr_accessor :public_name + + def initialize(public_name: nil) + super + @public_name = public_name + end + end + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + attr_accessor :beneficiary + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(beneficiary: nil, expand: nil, metadata: nil) + super + @beneficiary = beneficiary + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe diff --git a/lib/stripe/services/climate/product_service.rb b/lib/stripe/services/climate/product_service.rb index 0b01b8533..9b81a90da 100644 --- a/lib/stripe/services/climate/product_service.rb +++ b/lib/stripe/services/climate/product_service.rb @@ -4,6 +4,35 @@ module Stripe module Climate class ProductService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Lists all available Climate product objects. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/climate/supplier_service.rb b/lib/stripe/services/climate/supplier_service.rb index 362caf107..26ecfe177 100644 --- a/lib/stripe/services/climate/supplier_service.rb +++ b/lib/stripe/services/climate/supplier_service.rb @@ -4,6 +4,35 @@ module Stripe module Climate class SupplierService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Lists all available Climate supplier objects. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/confirmation_token_service.rb b/lib/stripe/services/confirmation_token_service.rb index 18f8e56eb..0bd9da09d 100644 --- a/lib/stripe/services/confirmation_token_service.rb +++ b/lib/stripe/services/confirmation_token_service.rb @@ -3,6 +3,16 @@ module Stripe class ConfirmationTokenService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves an existing ConfirmationToken object def retrieve(confirmation_token, params = {}, opts = {}) request( diff --git a/lib/stripe/services/country_spec_service.rb b/lib/stripe/services/country_spec_service.rb index 39ff260c5..1cef0e92a 100644 --- a/lib/stripe/services/country_spec_service.rb +++ b/lib/stripe/services/country_spec_service.rb @@ -3,6 +3,35 @@ module Stripe class CountrySpecService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Lists all Country Spec objects available in the API. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/coupon_service.rb b/lib/stripe/services/coupon_service.rb index 23544cbd5..f7225af7d 100644 --- a/lib/stripe/services/coupon_service.rb +++ b/lib/stripe/services/coupon_service.rb @@ -3,6 +3,166 @@ module Stripe class CouponService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + attr_accessor :amount_off + + def initialize(amount_off: nil) + super + @amount_off = amount_off + end + end + # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + attr_accessor :name + + def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil) + super + @currency_options = currency_options + @expand = expand + @metadata = metadata + @name = name + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # An array of Product IDs that this Coupon will apply to. + attr_accessor :products + + def initialize(products: nil) + super + @products = products + end + end + + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + attr_accessor :amount_off + + def initialize(amount_off: nil) + super + @amount_off = amount_off + end + end + # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + attr_accessor :amount_off + # A hash containing directions for what this Coupon will apply discounts to. + attr_accessor :applies_to + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + attr_accessor :currency + # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + attr_accessor :duration + # Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. + attr_accessor :duration_in_months + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. + attr_accessor :id + # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + attr_accessor :name + # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + attr_accessor :percent_off + # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + attr_accessor :redeem_by + + def initialize( + amount_off: nil, + applies_to: nil, + currency: nil, + currency_options: nil, + duration: nil, + duration_in_months: nil, + expand: nil, + id: nil, + max_redemptions: nil, + metadata: nil, + name: nil, + percent_off: nil, + redeem_by: nil + ) + super + @amount_off = amount_off + @applies_to = applies_to + @currency = currency + @currency_options = currency_options + @duration = duration + @duration_in_months = duration_in_months + @expand = expand + @id = id + @max_redemptions = max_redemptions + @metadata = metadata + @name = name + @percent_off = percent_off + @redeem_by = redeem_by + end + end + # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. # # A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it. diff --git a/lib/stripe/services/credit_note_line_item_service.rb b/lib/stripe/services/credit_note_line_item_service.rb index 1424621fc..50f034bbb 100644 --- a/lib/stripe/services/credit_note_line_item_service.rb +++ b/lib/stripe/services/credit_note_line_item_service.rb @@ -3,6 +3,25 @@ module Stripe class CreditNoteLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(credit_note, params = {}, opts = {}) request( diff --git a/lib/stripe/services/credit_note_preview_lines_service.rb b/lib/stripe/services/credit_note_preview_lines_service.rb index 392dd619a..63a4c28f4 100644 --- a/lib/stripe/services/credit_note_preview_lines_service.rb +++ b/lib/stripe/services/credit_note_preview_lines_service.rb @@ -3,6 +3,167 @@ module Stripe class CreditNotePreviewLinesService < StripeService + class ListParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate = tax_rate + @taxable_amount = taxable_amount + end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + attr_accessor :invoice_line_item + # The line item quantity to credit. + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @invoice_line_item = invoice_line_item + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + @type = type + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + attr_accessor :refund + + def initialize(amount_refunded: nil, refund: nil) + super + @amount_refunded = amount_refunded + @refund = refund + end + end + + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + attr_accessor :email_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the invoice. + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Line items that make up the credit note. + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_accessor :reason + # ID of an existing refund to link this credit note to. + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + attr_accessor :refund_amount + # Refunds to link to this credit note. + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + attr_accessor :shipping_cost + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil, + starting_after: nil + ) + super + @amount = amount + @credit_amount = credit_amount + @effective_at = effective_at + @email_type = email_type + @ending_before = ending_before + @expand = expand + @invoice = invoice + @limit = limit + @lines = lines + @memo = memo + @metadata = metadata + @out_of_band_amount = out_of_band_amount + @reason = reason + @refund = refund + @refund_amount = refund_amount + @refunds = refunds + @shipping_cost = shipping_cost + @starting_after = starting_after + end + end + # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/credit_note_service.rb b/lib/stripe/services/credit_note_service.rb index f0a612814..b3cfa4a46 100644 --- a/lib/stripe/services/credit_note_service.rb +++ b/lib/stripe/services/credit_note_service.rb @@ -11,6 +11,394 @@ def initialize(requestor) @preview_lines = Stripe::CreditNotePreviewLinesService.new(@requestor) end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return credit notes that were created during the given date interval. + attr_accessor :created + # Only return credit notes for the customer specified by this customer ID. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return credit notes for the invoice specified by this invoice ID. + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @invoice = invoice + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate = tax_rate + @taxable_amount = taxable_amount + end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + attr_accessor :invoice_line_item + # The line item quantity to credit. + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @invoice_line_item = invoice_line_item + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + @type = type + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + attr_accessor :refund + + def initialize(amount_refunded: nil, refund: nil) + super + @amount_refunded = amount_refunded + @refund = refund + end + end + + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the invoice. + attr_accessor :invoice + # Line items that make up the credit note. + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_accessor :reason + # ID of an existing refund to link this credit note to. + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + attr_accessor :refund_amount + # Refunds to link to this credit note. + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + attr_accessor :shipping_cost + + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ) + super + @amount = amount + @credit_amount = credit_amount + @effective_at = effective_at + @email_type = email_type + @expand = expand + @invoice = invoice + @lines = lines + @memo = memo + @metadata = metadata + @out_of_band_amount = out_of_band_amount + @reason = reason + @refund = refund + @refund_amount = refund_amount + @refunds = refunds + @shipping_cost = shipping_cost + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Credit note memo. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, memo: nil, metadata: nil) + super + @expand = expand + @memo = memo + @metadata = metadata + end + end + + class PreviewParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate = tax_rate + @taxable_amount = taxable_amount + end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + attr_accessor :invoice_line_item + # The line item quantity to credit. + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @invoice_line_item = invoice_line_item + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + @type = type + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + attr_accessor :refund + + def initialize(amount_refunded: nil, refund: nil) + super + @amount_refunded = amount_refunded + @refund = refund + end + end + + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the invoice. + attr_accessor :invoice + # Line items that make up the credit note. + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + attr_accessor :reason + # ID of an existing refund to link this credit note to. + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + attr_accessor :refund_amount + # Refunds to link to this credit note. + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + attr_accessor :shipping_cost + + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ) + super + @amount = amount + @credit_amount = credit_amount + @effective_at = effective_at + @email_type = email_type + @expand = expand + @invoice = invoice + @lines = lines + @memo = memo + @metadata = metadata + @out_of_band_amount = out_of_band_amount + @reason = reason + @refund = refund + @refund_amount = refund_amount + @refunds = refunds + @shipping_cost = shipping_cost + end + end + + class VoidCreditNoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result # in any combination of the following: diff --git a/lib/stripe/services/customer_balance_transaction_service.rb b/lib/stripe/services/customer_balance_transaction_service.rb index ad76a3fde..1b0106a6a 100644 --- a/lib/stripe/services/customer_balance_transaction_service.rb +++ b/lib/stripe/services/customer_balance_transaction_service.rb @@ -3,6 +3,73 @@ module Stripe class CustomerBalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(amount: nil, currency: nil, description: nil, expand: nil, metadata: nil) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end + # Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance). def create(customer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/customer_cash_balance_service.rb b/lib/stripe/services/customer_cash_balance_service.rb index ad87c9b76..1926f4ac3 100644 --- a/lib/stripe/services/customer_cash_balance_service.rb +++ b/lib/stripe/services/customer_cash_balance_service.rb @@ -3,6 +3,38 @@ module Stripe class CustomerCashBalanceService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + attr_accessor :reconciliation_mode + + def initialize(reconciliation_mode: nil) + super + @reconciliation_mode = reconciliation_mode + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A hash of settings for this cash balance. + attr_accessor :settings + + def initialize(expand: nil, settings: nil) + super + @expand = expand + @settings = settings + end + end + # Retrieves a customer's cash balance. def retrieve(customer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/customer_cash_balance_transaction_service.rb b/lib/stripe/services/customer_cash_balance_transaction_service.rb index e1d3be5bb..49284e139 100644 --- a/lib/stripe/services/customer_cash_balance_transaction_service.rb +++ b/lib/stripe/services/customer_cash_balance_transaction_service.rb @@ -3,6 +3,35 @@ module Stripe class CustomerCashBalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance). def list(customer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/customer_funding_instructions_service.rb b/lib/stripe/services/customer_funding_instructions_service.rb index 310b92503..94eee07c7 100644 --- a/lib/stripe/services/customer_funding_instructions_service.rb +++ b/lib/stripe/services/customer_funding_instructions_service.rb @@ -3,6 +3,51 @@ module Stripe class CustomerFundingInstructionsService < StripeService + class CreateParams < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The type of the `bank_transfer` + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Additional parameters for `bank_transfer` funding types + attr_accessor :bank_transfer + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The `funding_type` to get the instructions for. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @currency = currency + @expand = expand + @funding_type = funding_type + end + end + # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new # funding instructions will be created. If funding instructions have already been created for a given customer, the same # funding instructions will be retrieved. In other words, we will return the same funding instructions each time. diff --git a/lib/stripe/services/customer_payment_method_service.rb b/lib/stripe/services/customer_payment_method_service.rb index 344d0a029..baeabc255 100644 --- a/lib/stripe/services/customer_payment_method_service.rb +++ b/lib/stripe/services/customer_payment_method_service.rb @@ -3,6 +3,48 @@ module Stripe class CustomerPaymentMethodService < StripeService + class ListParams < Stripe::RequestParams + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + attr_accessor :type + + def initialize( + allow_redisplay: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ) + super + @allow_redisplay = allow_redisplay + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of PaymentMethods for a given Customer def list(customer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/customer_payment_source_service.rb b/lib/stripe/services/customer_payment_source_service.rb index a623acc20..f5c5d90a0 100644 --- a/lib/stripe/services/customer_payment_source_service.rb +++ b/lib/stripe/services/customer_payment_source_service.rb @@ -3,6 +3,193 @@ module Stripe class CustomerPaymentSourceService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filter sources according to a particular object type. + attr_accessor :object + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, object: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @object = object + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Please refer to full [documentation](https://stripe.com/docs/api) instead. + attr_accessor :source + # Attribute for param field validate + attr_accessor :validate + + def initialize(expand: nil, metadata: nil, source: nil, validate: nil) + super + @expand = expand + @metadata = metadata + @source = source + @validate = validate + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Owner's address. + attr_accessor :address + # Owner's email address. + attr_accessor :email + # Owner's full name. + attr_accessor :name + # Owner's phone number. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + # The name of the person or business that owns the bank account. + attr_accessor :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. + attr_accessor :account_holder_type + # City/District/Suburb/Town/Village. + attr_accessor :address_city + # Billing address country, if provided when creating card. + attr_accessor :address_country + # Address line 1 (Street address/PO Box/Company name). + attr_accessor :address_line1 + # Address line 2 (Apartment/Suite/Unit/Building). + attr_accessor :address_line2 + # State/County/Province/Region. + attr_accessor :address_state + # ZIP or postal code. + attr_accessor :address_zip + # Two digit number representing the card’s expiration month. + attr_accessor :exp_month + # Four digit number representing the card’s expiration year. + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Cardholder name. + attr_accessor :name + # Attribute for param field owner + attr_accessor :owner + + def initialize( + account_holder_name: nil, + account_holder_type: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + metadata: nil, + name: nil, + owner: nil + ) + super + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @exp_month = exp_month + @exp_year = exp_year + @expand = expand + @metadata = metadata + @name = name + @owner = owner + end + end + + class DeleteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class VerifyParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + attr_accessor :amounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amounts: nil, expand: nil) + super + @amounts = amounts + @expand = expand + end + end + # When you create a new credit card, you must specify a customer or recipient on which to create it. # # If the card's owner has no default card, then the new card will become the default. diff --git a/lib/stripe/services/customer_service.rb b/lib/stripe/services/customer_service.rb index a9dbf1aa8..e5f6453f3 100644 --- a/lib/stripe/services/customer_service.rb +++ b/lib/stripe/services/customer_service.rb @@ -16,6 +16,624 @@ def initialize(requestor) @funding_instructions = Stripe::CustomerFundingInstructionsService.new(@requestor) end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + attr_accessor :reconciliation_mode + + def initialize(reconciliation_mode: nil) + super + @reconciliation_mode = reconciliation_mode + end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + attr_accessor :template + + def initialize(amount_tax_display: nil, template: nil) + super + @amount_tax_display = amount_tax_display + @template = template + end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ) + super + @custom_fields = custom_fields + @default_payment_method = default_payment_method + @footer = footer + @rendering_options = rendering_options + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. + attr_accessor :validate_location + + def initialize(ip_address: nil, validate_location: nil) + super + @ip_address = ip_address + @validate_location = validate_location + end + end + # The customer's address. + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + attr_accessor :balance + # Balance information and default balance settings for this customer. + attr_accessor :cash_balance + # Attribute for param field coupon + attr_accessor :coupon + # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + # + # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + # + # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + attr_accessor :default_source + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The customer's full name or business name. + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + attr_accessor :next_invoice_sequence + # The customer's phone number. + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Attribute for param field source + attr_accessor :source + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # Attribute for param field validate + attr_accessor :validate + + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + default_source: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + validate: nil + ) + super + @address = address + @balance = balance + @cash_balance = cash_balance + @coupon = coupon + @default_source = default_source + @description = description + @email = email + @expand = expand + @invoice_prefix = invoice_prefix + @invoice_settings = invoice_settings + @metadata = metadata + @name = name + @next_invoice_sequence = next_invoice_sequence + @phone = phone + @preferred_locales = preferred_locales + @promotion_code = promotion_code + @shipping = shipping + @source = source + @tax = tax + @tax_exempt = tax_exempt + @validate = validate + end + end + + class DeleteDiscountParams < Stripe::RequestParams + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return customers that were created during the given date interval. + attr_accessor :created + # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. + attr_accessor :test_clock + + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + test_clock: nil + ) + super + @created = created + @email = email + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @test_clock = test_clock + end + end + + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + attr_accessor :reconciliation_mode + + def initialize(reconciliation_mode: nil) + super + @reconciliation_mode = reconciliation_mode + end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + attr_accessor :template + + def initialize(amount_tax_display: nil, template: nil) + super + @amount_tax_display = amount_tax_display + @template = template + end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ) + super + @custom_fields = custom_fields + @default_payment_method = default_payment_method + @footer = footer + @rendering_options = rendering_options + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. + attr_accessor :validate_location + + def initialize(ip_address: nil, validate_location: nil) + super + @ip_address = ip_address + @validate_location = validate_location + end + end + + class TaxIdDatum < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + attr_accessor :balance + # Balance information and default balance settings for this customer. + attr_accessor :cash_balance + # Attribute for param field coupon + attr_accessor :coupon + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The customer's full name or business name. + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + attr_accessor :next_invoice_sequence + # Attribute for param field payment_method + attr_accessor :payment_method + # The customer's phone number. + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Attribute for param field source + attr_accessor :source + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_id_data + # ID of the test clock to attach to the customer. + attr_accessor :test_clock + # Attribute for param field validate + attr_accessor :validate + + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + payment_method: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + tax_id_data: nil, + test_clock: nil, + validate: nil + ) + super + @address = address + @balance = balance + @cash_balance = cash_balance + @coupon = coupon + @description = description + @email = email + @expand = expand + @invoice_prefix = invoice_prefix + @invoice_settings = invoice_settings + @metadata = metadata + @name = name + @next_invoice_sequence = next_invoice_sequence + @payment_method = payment_method + @phone = phone + @preferred_locales = preferred_locales + @promotion_code = promotion_code + @shipping = shipping + @source = source + @tax = tax + @tax_exempt = tax_exempt + @tax_id_data = tax_id_data + @test_clock = test_clock + @validate = validate + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + # Creates a new customer object. def create(params = {}, opts = {}) request(method: :post, path: "/v1/customers", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/customer_session_service.rb b/lib/stripe/services/customer_session_service.rb index 064c4c927..d7ff21c56 100644 --- a/lib/stripe/services/customer_session_service.rb +++ b/lib/stripe/services/customer_session_service.rb @@ -3,6 +3,108 @@ module Stripe class CustomerSessionService < StripeService + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class BuyButton < Stripe::RequestParams + # Whether the buy button is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class PaymentElement < Stripe::RequestParams + class Features < Stripe::RequestParams + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + attr_accessor :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + attr_accessor :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + attr_accessor :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + attr_accessor :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + attr_accessor :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + attr_accessor :payment_method_save_usage + + def initialize( + payment_method_allow_redisplay_filters: nil, + payment_method_redisplay: nil, + payment_method_redisplay_limit: nil, + payment_method_remove: nil, + payment_method_save: nil, + payment_method_save_usage: nil + ) + super + @payment_method_allow_redisplay_filters = payment_method_allow_redisplay_filters + @payment_method_redisplay = payment_method_redisplay + @payment_method_redisplay_limit = payment_method_redisplay_limit + @payment_method_remove = payment_method_remove + @payment_method_save = payment_method_save + @payment_method_save_usage = payment_method_save_usage + end + end + # Whether the Payment Element is enabled. + attr_accessor :enabled + # This hash defines whether the Payment Element supports certain features. + attr_accessor :features + + def initialize(enabled: nil, features: nil) + super + @enabled = enabled + @features = features + end + end + + class PricingTable < Stripe::RequestParams + # Whether the pricing table is enabled. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + # Configuration for buy button. + attr_accessor :buy_button + # Configuration for the Payment Element. + attr_accessor :payment_element + # Configuration for the pricing table. + attr_accessor :pricing_table + + def initialize(buy_button: nil, payment_element: nil, pricing_table: nil) + super + @buy_button = buy_button + @payment_element = payment_element + @pricing_table = pricing_table + end + end + # Configuration for each component. Exactly 1 component must be enabled. + attr_accessor :components + # The ID of an existing customer for which to create the Customer Session. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(components: nil, customer: nil, expand: nil) + super + @components = components + @customer = customer + @expand = expand + end + end + # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/customer_tax_id_service.rb b/lib/stripe/services/customer_tax_id_service.rb index 7ba64d8d1..262de7ec3 100644 --- a/lib/stripe/services/customer_tax_id_service.rb +++ b/lib/stripe/services/customer_tax_id_service.rb @@ -3,6 +3,54 @@ module Stripe class CustomerTaxIdService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(expand: nil, type: nil, value: nil) + super + @expand = expand + @type = type + @value = value + end + end + # Creates a new tax_id object for a customer. def create(customer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/dispute_service.rb b/lib/stripe/services/dispute_service.rb index b9748bbf2..62af64cef 100644 --- a/lib/stripe/services/dispute_service.rb +++ b/lib/stripe/services/dispute_service.rb @@ -3,6 +3,393 @@ module Stripe class DisputeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return disputes associated to the charge specified by this charge ID. + attr_accessor :charge + # Only return disputes that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class EnhancedEvidence < Stripe::RequestParams + class VisaCompellingEvidence3 < Stripe::RequestParams + class DisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_accessor :customer_device_id + # The email address of the customer. + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + attr_accessor :customer_purchase_ip + # Categorization of disputed payment. + attr_accessor :merchandise_or_services + # A description of the product or service that was sold. + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :shipping_address + + def initialize( + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + merchandise_or_services: nil, + product_description: nil, + shipping_address: nil + ) + super + @customer_account_id = customer_account_id + @customer_device_fingerprint = customer_device_fingerprint + @customer_device_id = customer_device_id + @customer_email_address = customer_email_address + @customer_purchase_ip = customer_purchase_ip + @merchandise_or_services = merchandise_or_services + @product_description = product_description + @shipping_address = shipping_address + end + end + + class PriorUndisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + attr_accessor :charge + # User Account ID used to log into business platform. Must be recognizable by the user. + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + attr_accessor :customer_device_id + # The email address of the customer. + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + attr_accessor :customer_purchase_ip + # A description of the product or service that was sold. + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :shipping_address + + def initialize( + charge: nil, + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + product_description: nil, + shipping_address: nil + ) + super + @charge = charge + @customer_account_id = customer_account_id + @customer_device_fingerprint = customer_device_fingerprint + @customer_device_id = customer_device_id + @customer_email_address = customer_email_address + @customer_purchase_ip = customer_purchase_ip + @product_description = product_description + @shipping_address = shipping_address + end + end + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :prior_undisputed_transactions + + def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil) + super + @disputed_transaction = disputed_transaction + @prior_undisputed_transactions = prior_undisputed_transactions + end + end + + class VisaCompliance < Stripe::RequestParams + # A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. + attr_accessor :fee_acknowledged + + def initialize(fee_acknowledged: nil) + super + @fee_acknowledged = fee_acknowledged + end + end + # Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + attr_accessor :visa_compelling_evidence_3 + # Evidence provided for Visa Compliance evidence submission. + attr_accessor :visa_compliance + + def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil) + super + @visa_compelling_evidence_3 = visa_compelling_evidence_3 + @visa_compliance = visa_compliance + end + end + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. + attr_accessor :access_activity_log + # The billing address provided by the customer. + attr_accessor :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + attr_accessor :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + attr_accessor :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + attr_accessor :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + attr_accessor :customer_communication + # The email address of the customer. + attr_accessor :customer_email_address + # The name of the customer. + attr_accessor :customer_name + # The IP address that the customer used when making the purchase. + attr_accessor :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + attr_accessor :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + attr_accessor :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + attr_accessor :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + attr_accessor :duplicate_charge_id + # Additional evidence for qualifying evidence programs. + attr_accessor :enhanced_evidence + # A description of the product or service that was sold. Has a maximum character count of 20,000. + attr_accessor :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + attr_accessor :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + attr_accessor :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + attr_accessor :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + attr_accessor :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + attr_accessor :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + attr_accessor :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. + attr_accessor :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + attr_accessor :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. + attr_accessor :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + attr_accessor :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + attr_accessor :uncategorized_file + # Any additional evidence or statements. Has a maximum character count of 20,000. + attr_accessor :uncategorized_text + + def initialize( + access_activity_log: nil, + billing_address: nil, + cancellation_policy: nil, + cancellation_policy_disclosure: nil, + cancellation_rebuttal: nil, + customer_communication: nil, + customer_email_address: nil, + customer_name: nil, + customer_purchase_ip: nil, + customer_signature: nil, + duplicate_charge_documentation: nil, + duplicate_charge_explanation: nil, + duplicate_charge_id: nil, + enhanced_evidence: nil, + product_description: nil, + receipt: nil, + refund_policy: nil, + refund_policy_disclosure: nil, + refund_refusal_explanation: nil, + service_date: nil, + service_documentation: nil, + shipping_address: nil, + shipping_carrier: nil, + shipping_date: nil, + shipping_documentation: nil, + shipping_tracking_number: nil, + uncategorized_file: nil, + uncategorized_text: nil + ) + super + @access_activity_log = access_activity_log + @billing_address = billing_address + @cancellation_policy = cancellation_policy + @cancellation_policy_disclosure = cancellation_policy_disclosure + @cancellation_rebuttal = cancellation_rebuttal + @customer_communication = customer_communication + @customer_email_address = customer_email_address + @customer_name = customer_name + @customer_purchase_ip = customer_purchase_ip + @customer_signature = customer_signature + @duplicate_charge_documentation = duplicate_charge_documentation + @duplicate_charge_explanation = duplicate_charge_explanation + @duplicate_charge_id = duplicate_charge_id + @enhanced_evidence = enhanced_evidence + @product_description = product_description + @receipt = receipt + @refund_policy = refund_policy + @refund_policy_disclosure = refund_policy_disclosure + @refund_refusal_explanation = refund_refusal_explanation + @service_date = service_date + @service_documentation = service_documentation + @shipping_address = shipping_address + @shipping_carrier = shipping_carrier + @shipping_date = shipping_date + @shipping_documentation = shipping_documentation + @shipping_tracking_number = shipping_tracking_number + @uncategorized_file = uncategorized_file + @uncategorized_text = uncategorized_text + end + end + # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + attr_accessor :submit + + def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil) + super + @evidence = evidence + @expand = expand + @metadata = metadata + @submit = submit + end + end + + class CloseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. # # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible. diff --git a/lib/stripe/services/entitlements/active_entitlement_service.rb b/lib/stripe/services/entitlements/active_entitlement_service.rb index 2481067eb..e11f7767b 100644 --- a/lib/stripe/services/entitlements/active_entitlement_service.rb +++ b/lib/stripe/services/entitlements/active_entitlement_service.rb @@ -4,6 +4,44 @@ module Stripe module Entitlements class ActiveEntitlementService < StripeService + class ListParams < Stripe::RequestParams + # The ID of the customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieve a list of active entitlements for a customer def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/entitlements/feature_service.rb b/lib/stripe/services/entitlements/feature_service.rb index 05b0daed3..f9913297f 100644 --- a/lib/stripe/services/entitlements/feature_service.rb +++ b/lib/stripe/services/entitlements/feature_service.rb @@ -4,6 +4,86 @@ module Stripe module Entitlements class FeatureService < StripeService + class ListParams < Stripe::RequestParams + # If set, filter results to only include features with the given archive status. + attr_accessor :archived + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # If set, filter results to only include features with the given lookup_key. + attr_accessor :lookup_key + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + archived: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_key: nil, + starting_after: nil + ) + super + @archived = archived + @ending_before = ending_before + @expand = expand + @limit = limit + @lookup_key = lookup_key + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A unique key you provide as your own system identifier. This may be up to 80 characters. + attr_accessor :lookup_key + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + attr_accessor :name + + def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil) + super + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @name = name + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + attr_accessor :name + + def initialize(active: nil, expand: nil, metadata: nil, name: nil) + super + @active = active + @expand = expand + @metadata = metadata + @name = name + end + end + # Creates a feature def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/ephemeral_key_service.rb b/lib/stripe/services/ephemeral_key_service.rb index b58c18cf0..7499900b5 100644 --- a/lib/stripe/services/ephemeral_key_service.rb +++ b/lib/stripe/services/ephemeral_key_service.rb @@ -3,6 +3,44 @@ module Stripe class EphemeralKeyService < StripeService + class DeleteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + # The ID of the Customer you'd like to modify using the resulting ephemeral key. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the Issuing Card you'd like to access using the resulting ephemeral key. + attr_accessor :issuing_card + # A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information. + attr_accessor :nonce + # The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key + attr_accessor :verification_session + + def initialize( + customer: nil, + expand: nil, + issuing_card: nil, + nonce: nil, + verification_session: nil + ) + super + @customer = customer + @expand = expand + @issuing_card = issuing_card + @nonce = nonce + @verification_session = verification_session + end + end + # Creates a short-lived API key for a given resource. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/event_service.rb b/lib/stripe/services/event_service.rb index a6a75eb85..7ced0a597 100644 --- a/lib/stripe/services/event_service.rb +++ b/lib/stripe/services/event_service.rb @@ -3,6 +3,74 @@ module Stripe class EventService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return events that were created during the given date interval. + attr_accessor :created + # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. + attr_accessor :delivery_success + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. + attr_accessor :type + # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. + attr_accessor :types + + def initialize( + created: nil, + delivery_success: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + types: nil + ) + super + @created = created + @delivery_success = delivery_success + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + @types = types + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). def list(params = {}, opts = {}) request(method: :get, path: "/v1/events", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/exchange_rate_service.rb b/lib/stripe/services/exchange_rate_service.rb index 86205a382..08aad87bc 100644 --- a/lib/stripe/services/exchange_rate_service.rb +++ b/lib/stripe/services/exchange_rate_service.rb @@ -3,6 +3,35 @@ module Stripe class ExchangeRateService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/file_link_service.rb b/lib/stripe/services/file_link_service.rb index d06ca20be..27f6e4c83 100644 --- a/lib/stripe/services/file_link_service.rb +++ b/lib/stripe/services/file_link_service.rb @@ -3,6 +3,105 @@ module Stripe class FileLinkService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return links that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Filter links by their expiration status. By default, Stripe returns all links. + attr_accessor :expired + # Only return links for the given file. + attr_accessor :file + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + expired: nil, + file: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @expired = expired + @file = file + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The link isn't usable after this future timestamp. + attr_accessor :expires_at + # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + attr_accessor :file + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil) + super + @expand = expand + @expires_at = expires_at + @file = file + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, expires_at: nil, metadata: nil) + super + @expand = expand + @expires_at = expires_at + @metadata = metadata + end + end + # Creates a new file link object. def create(params = {}, opts = {}) request(method: :post, path: "/v1/file_links", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/file_service.rb b/lib/stripe/services/file_service.rb index 7afc74229..7d7db1a44 100644 --- a/lib/stripe/services/file_service.rb +++ b/lib/stripe/services/file_service.rb @@ -3,6 +3,100 @@ module Stripe class FileService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return files that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + attr_accessor :purpose + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + purpose: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @purpose = purpose + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class FileLinkData < Stripe::RequestParams + # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + attr_accessor :create + # The link isn't available after this future timestamp. + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(create: nil, expires_at: nil, metadata: nil) + super + @create = create + @expires_at = expires_at + @metadata = metadata + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. + attr_accessor :file + # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + attr_accessor :file_link_data + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + attr_accessor :purpose + + def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil) + super + @expand = expand + @file = file + @file_link_data = file_link_data + @purpose = purpose + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. # # All of Stripe's officially supported Client libraries support sending multipart/form-data. diff --git a/lib/stripe/services/financial_connections/account_inferred_balance_service.rb b/lib/stripe/services/financial_connections/account_inferred_balance_service.rb index 989639a8a..db6a85323 100644 --- a/lib/stripe/services/financial_connections/account_inferred_balance_service.rb +++ b/lib/stripe/services/financial_connections/account_inferred_balance_service.rb @@ -4,6 +4,25 @@ module Stripe module FinancialConnections class AccountInferredBalanceService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Lists the recorded inferred balances for a Financial Connections Account. def list(account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/financial_connections/account_owner_service.rb b/lib/stripe/services/financial_connections/account_owner_service.rb index 5d9de8616..955d92197 100644 --- a/lib/stripe/services/financial_connections/account_owner_service.rb +++ b/lib/stripe/services/financial_connections/account_owner_service.rb @@ -4,6 +4,34 @@ module Stripe module FinancialConnections class AccountOwnerService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The ID of the ownership object to fetch owners from. + attr_accessor :ownership + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + ownership: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @ownership = ownership + @starting_after = starting_after + end + end + # Lists all owners for a given Account def list(account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/financial_connections/account_service.rb b/lib/stripe/services/financial_connections/account_service.rb index e6a686868..e29335b1b 100644 --- a/lib/stripe/services/financial_connections/account_service.rb +++ b/lib/stripe/services/financial_connections/account_service.rb @@ -13,6 +13,109 @@ def initialize(requestor) @owners = Stripe::FinancialConnections::AccountOwnerService.new(@requestor) end + class ListParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. + attr_accessor :customer + + def initialize(account: nil, customer: nil) + super + @account = account + @customer = customer + end + end + # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. + attr_accessor :account_holder + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # If present, only return accounts that were collected as part of the given session. + attr_accessor :session + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + account_holder: nil, + ending_before: nil, + expand: nil, + limit: nil, + session: nil, + starting_after: nil + ) + super + @account_holder = account_holder + @ending_before = ending_before + @expand = expand + @limit = limit + @session = session + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class DisconnectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RefreshParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The list of account features that you would like to refresh. + attr_accessor :features + + def initialize(expand: nil, features: nil) + super + @expand = expand + @features = features + end + end + + class SubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The list of account features to which you would like to subscribe. + attr_accessor :features + + def initialize(expand: nil, features: nil) + super + @expand = expand + @features = features + end + end + + class UnsubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The list of account features from which you would like to unsubscribe. + attr_accessor :features + + def initialize(expand: nil, features: nil) + super + @expand = expand + @features = features + end + end + # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). def disconnect(account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/financial_connections/institution_service.rb b/lib/stripe/services/financial_connections/institution_service.rb index 03f6e85bc..a8575685c 100644 --- a/lib/stripe/services/financial_connections/institution_service.rb +++ b/lib/stripe/services/financial_connections/institution_service.rb @@ -4,6 +4,35 @@ module Stripe module FinancialConnections class InstitutionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of Financial Connections Institution objects. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/financial_connections/session_service.rb b/lib/stripe/services/financial_connections/session_service.rb index 89726e8c9..93e2dbcfc 100644 --- a/lib/stripe/services/financial_connections/session_service.rb +++ b/lib/stripe/services/financial_connections/session_service.rb @@ -4,6 +4,109 @@ module Stripe module FinancialConnections class SessionService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. + attr_accessor :customer + # Type of account holder to collect accounts for. + attr_accessor :type + + def initialize(account: nil, customer: nil, type: nil) + super + @account = account + @customer = customer + @type = type + end + end + + class Filters < Stripe::RequestParams + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + attr_accessor :account_subcategories + # List of countries from which to collect accounts. + attr_accessor :countries + # Stripe ID of the institution with which the customer should be directed to log in. + attr_accessor :institution + + def initialize(account_subcategories: nil, countries: nil, institution: nil) + super + @account_subcategories = account_subcategories + @countries = countries + @institution = institution + end + end + + class Limits < Stripe::RequestParams + # The number of accounts that can be linked in this Session. + attr_accessor :accounts + + def initialize(accounts: nil) + super + @accounts = accounts + end + end + + class ManualEntry < Stripe::RequestParams + # Whether manual entry will be handled by Stripe during the Session. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # The account holder to link accounts for. + attr_accessor :account_holder + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Filters to restrict the kinds of accounts to collect. + attr_accessor :filters + # Settings for configuring Session-specific limits. + attr_accessor :limits + # Settings for configuring manual entry of account details for this Session. + attr_accessor :manual_entry + # List of data features that you would like to request access to. + # + # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + account_holder: nil, + expand: nil, + filters: nil, + limits: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @account_holder = account_holder + @expand = expand + @filters = filters + @limits = limits + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/financial_connections/transaction_service.rb b/lib/stripe/services/financial_connections/transaction_service.rb index b28cc90e6..02c907249 100644 --- a/lib/stripe/services/financial_connections/transaction_service.rb +++ b/lib/stripe/services/financial_connections/transaction_service.rb @@ -4,6 +4,80 @@ module Stripe module FinancialConnections class TransactionService < StripeService + class ListParams < Stripe::RequestParams + class TransactedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class TransactionRefresh < Stripe::RequestParams + # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). + attr_accessor :after + + def initialize(after: nil) + super + @after = after + end + end + # The ID of the Stripe account whose transactions will be retrieved. + attr_accessor :account + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: + attr_accessor :transacted_at + # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: + attr_accessor :transaction_refresh + + def initialize( + account: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transacted_at: nil, + transaction_refresh: nil + ) + super + @account = account + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @transacted_at = transacted_at + @transaction_refresh = transaction_refresh + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of Financial Connections Transaction objects. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/forwarding/request_service.rb b/lib/stripe/services/forwarding/request_service.rb index c9b3ec239..ad416426d 100644 --- a/lib/stripe/services/forwarding/request_service.rb +++ b/lib/stripe/services/forwarding/request_service.rb @@ -4,6 +4,118 @@ module Stripe module Forwarding class RequestService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Return results where the `created` field is greater than this value. + attr_accessor :gt + # Return results where the `created` field is greater than or equal to this value. + attr_accessor :gte + # Return results where the `created` field is less than this value. + attr_accessor :lt + # Return results where the `created` field is less than or equal to this value. + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. + attr_accessor :created + # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Request < Stripe::RequestParams + class Header < Stripe::RequestParams + # The header name. + attr_accessor :name + # The header value. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + # The body payload to send to the destination endpoint. + attr_accessor :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + attr_accessor :headers + + def initialize(body: nil, headers: nil) + super + @body = body + @headers = headers + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + attr_accessor :payment_method + # The field kinds to be replaced in the forwarded request. + attr_accessor :replacements + # The request body and headers to be sent to the destination endpoint. + attr_accessor :request + # The destination URL for the forwarded request. Must be supported by the config. + attr_accessor :url + + def initialize( + expand: nil, + metadata: nil, + payment_method: nil, + replacements: nil, + request: nil, + url: nil + ) + super + @expand = expand + @metadata = metadata + @payment_method = payment_method + @replacements = replacements + @request = request + @url = url + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a ForwardingRequest object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/gift_cards/card_service.rb b/lib/stripe/services/gift_cards/card_service.rb index d828be52c..6f4f4e462 100644 --- a/lib/stripe/services/gift_cards/card_service.rb +++ b/lib/stripe/services/gift_cards/card_service.rb @@ -4,6 +4,120 @@ module Stripe module GiftCards class CardService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + attr_accessor :payment_intent + + def initialize(payment_intent: nil) + super + @payment_intent = payment_intent + end + end + # The details for the payment that created this object. + attr_accessor :payment + # The type of event that created this object. + attr_accessor :type + + def initialize(payment: nil, type: nil) + super + @payment = payment + @type = type + end + end + # The active state for the new gift card, defaults to false. The active state can be updated after creation. + attr_accessor :active + # Related objects which created this gift card. + attr_accessor :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The initial amount to load onto the new gift card, defaults to 0. + attr_accessor :initial_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + active: nil, + created_by: nil, + currency: nil, + expand: nil, + initial_amount: nil, + metadata: nil + ) + super + @active = active + @created_by = created_by + @currency = currency + @expand = expand + @initial_amount = initial_amount + @metadata = metadata + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # The new active state for the gift card. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(active: nil, expand: nil, metadata: nil) + super + @active = active + @expand = expand + @metadata = metadata + end + end + + class ValidateParams < Stripe::RequestParams + # The gift card code to be validated. + attr_accessor :code + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The pin associated with the gift card. Not all gift cards have pins. + attr_accessor :giftcard_pin + + def initialize(code: nil, expand: nil, giftcard_pin: nil) + super + @code = code + @expand = expand + @giftcard_pin = giftcard_pin + end + end + # Creates a new gift card object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/gift_cards/transaction_service.rb b/lib/stripe/services/gift_cards/transaction_service.rb index 277ad18fb..c612ef7f3 100644 --- a/lib/stripe/services/gift_cards/transaction_service.rb +++ b/lib/stripe/services/gift_cards/transaction_service.rb @@ -4,6 +4,149 @@ module Stripe module GiftCards class TransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The gift card to list transactions for. + attr_accessor :gift_card + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + ending_before: nil, + expand: nil, + gift_card: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ) + super + @ending_before = ending_before + @expand = expand + @gift_card = gift_card + @limit = limit + @starting_after = starting_after + @transfer_group = transfer_group + end + end + + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + attr_accessor :payment_intent + + def initialize(payment_intent: nil) + super + @payment_intent = payment_intent + end + end + # The details for the payment that created this object. + attr_accessor :payment + # The type of event that created this object. + attr_accessor :type + + def initialize(payment: nil, type: nil) + super + @payment = payment + @type = type + end + end + # The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds. + attr_accessor :amount + # Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the `amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card. + attr_accessor :confirm + # Related objects which created this transaction. + attr_accessor :created_by + # The currency of the transaction. This must match the currency of the gift card. + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The gift card to create a new transaction on. + attr_accessor :gift_card + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + amount: nil, + confirm: nil, + created_by: nil, + currency: nil, + description: nil, + expand: nil, + gift_card: nil, + metadata: nil, + transfer_group: nil + ) + super + @amount = amount + @confirm = confirm + @created_by = created_by + @currency = currency + @description = description + @expand = expand + @gift_card = gift_card + @metadata = metadata + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ConfirmParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Cancel a gift card transaction def cancel(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/identity/verification_report_service.rb b/lib/stripe/services/identity/verification_report_service.rb index 6598452f3..4ce6d8496 100644 --- a/lib/stripe/services/identity/verification_report_service.rb +++ b/lib/stripe/services/identity/verification_report_service.rb @@ -4,6 +4,74 @@ module Stripe module Identity class VerificationReportService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_accessor :client_reference_id + # Only return VerificationReports that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return VerificationReports of this type + attr_accessor :type + # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + attr_accessor :verification_session + + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + verification_session: nil + ) + super + @client_reference_id = client_reference_id + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + @verification_session = verification_session + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # List all verification reports. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/identity/verification_session_service.rb b/lib/stripe/services/identity/verification_session_service.rb index c36805393..6a4c36c69 100644 --- a/lib/stripe/services/identity/verification_session_service.rb +++ b/lib/stripe/services/identity/verification_session_service.rb @@ -4,6 +4,250 @@ module Stripe module Identity class VerificationSessionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_accessor :client_reference_id + # Only return VerificationSessions that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Attribute for param field related_customer + attr_accessor :related_customer + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + attr_accessor :status + + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + related_customer: nil, + starting_after: nil, + status: nil + ) + super + @client_reference_id = client_reference_id + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @related_customer = related_customer + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_accessor :require_matching_selfie + + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ) + super + @allowed_types = allowed_types + @require_id_number = require_id_number + @require_live_capture = require_live_capture + @require_matching_selfie = require_matching_selfie + end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + attr_accessor :email + # Phone number of user being verified + attr_accessor :phone + + def initialize(email: nil, phone: nil) + super + @email = email + @phone = phone + end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + attr_accessor :client_reference_id + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A set of options for the session’s verification checks. + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + attr_accessor :provided_details + # Token referencing a Customer resource. + attr_accessor :related_customer + # The URL that the user will be redirected to upon completing the verification flow. + attr_accessor :return_url + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. + attr_accessor :type + # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + attr_accessor :verification_flow + + def initialize( + client_reference_id: nil, + expand: nil, + metadata: nil, + options: nil, + provided_details: nil, + related_customer: nil, + return_url: nil, + type: nil, + verification_flow: nil + ) + super + @client_reference_id = client_reference_id + @expand = expand + @metadata = metadata + @options = options + @provided_details = provided_details + @related_customer = related_customer + @return_url = return_url + @type = type + @verification_flow = verification_flow + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + attr_accessor :require_matching_selfie + + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ) + super + @allowed_types = allowed_types + @require_id_number = require_id_number + @require_live_capture = require_live_capture + @require_matching_selfie = require_matching_selfie + end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + attr_accessor :email + # Phone number of user being verified + attr_accessor :phone + + def initialize(email: nil, phone: nil) + super + @email = email + @phone = phone + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A set of options for the session’s verification checks. + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + attr_accessor :provided_details + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + attr_accessor :type + + def initialize(expand: nil, metadata: nil, options: nil, provided_details: nil, type: nil) + super + @expand = expand + @metadata = metadata + @options = options + @provided_details = provided_details + @type = type + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RedactParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work). # # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel). diff --git a/lib/stripe/services/invoice_item_service.rb b/lib/stripe/services/invoice_item_service.rb index 9c69a6205..438fff152 100644 --- a/lib/stripe/services/invoice_item_service.rb +++ b/lib/stripe/services/invoice_item_service.rb @@ -3,6 +3,409 @@ module Stripe class InvoiceItemService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @expand = expand + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return invoice items that were created during the given date interval. + attr_accessor :created + # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. + attr_accessor :pending + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + pending: nil, + starting_after: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @invoice = invoice + @limit = limit + @pending = pending + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the customer who will be billed when this invoice item is billed. + attr_accessor :customer + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. + attr_accessor :discountable + # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. + attr_accessor :invoice + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + attr_accessor :subscription + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + invoice: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + subscription: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @customer = customer + @description = description + @discountable = discountable + @discounts = discounts + @expand = expand + @invoice = invoice + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @subscription = subscription + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/invoice_line_item_service.rb b/lib/stripe/services/invoice_line_item_service.rb index e8edbbc54..4c2e3ef1f 100644 --- a/lib/stripe/services/invoice_line_item_service.rb +++ b/lib/stripe/services/invoice_line_item_service.rb @@ -3,6 +3,253 @@ module Stripe class InvoiceLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @country = country + @description = description + @display_name = display_name + @inclusive = inclusive + @jurisdiction = jurisdiction + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate_data = tax_rate_data + @taxable_amount = taxable_amount + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @expand = expand + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + end + end + # When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(invoice, params = {}, opts = {}) request( diff --git a/lib/stripe/services/invoice_payment_service.rb b/lib/stripe/services/invoice_payment_service.rb index 9a3fc99a9..95ad1fbed 100644 --- a/lib/stripe/services/invoice_payment_service.rb +++ b/lib/stripe/services/invoice_payment_service.rb @@ -3,6 +3,35 @@ module Stripe class InvoicePaymentService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. def list(invoice, params = {}, opts = {}) request( diff --git a/lib/stripe/services/invoice_rendering_template_service.rb b/lib/stripe/services/invoice_rendering_template_service.rb index d263f0a90..bf606b9b3 100644 --- a/lib/stripe/services/invoice_rendering_template_service.rb +++ b/lib/stripe/services/invoice_rendering_template_service.rb @@ -3,6 +3,61 @@ module Stripe class InvoiceRenderingTemplateService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Attribute for param field status + attr_accessor :status + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil, status: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field version + attr_accessor :version + + def initialize(expand: nil, version: nil) + super + @expand = expand + @version = version + end + end + + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UnarchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. def archive(template, params = {}, opts = {}) request( diff --git a/lib/stripe/services/invoice_service.rb b/lib/stripe/services/invoice_service.rb index eadbdb65c..2ee82eda3 100644 --- a/lib/stripe/services/invoice_service.rb +++ b/lib/stripe/services/invoice_service.rb @@ -12,6 +12,5819 @@ def initialize(requestor) @upcoming_lines = Stripe::InvoiceUpcomingLinesService.new(@requestor) end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Date on which a payment plan’s payment is due. + attr_accessor :due_date + + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil) + super + @amount = amount + @days_until_due = days_until_due + @description = description + @due_date = due_date + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + attr_accessor :enabled + # The selected installment plan to use for this invoice. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(installments: nil, request_three_d_secure: nil) + super + @installments = installments + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + + def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil) + super + @default_mandate = default_mandate + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + end + end + + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + attr_accessor :page_size + + def initialize(page_size: nil) + super + @page_size = page_size + end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # Invoice pdf rendering options + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + attr_accessor :template_version + + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil) + super + @amount_tax_display = amount_tax_display + @pdf = pdf + @template = template + @template_version = template_version + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address + attr_accessor :address + # Recipient name. + attr_accessor :name + # Recipient phone (including extension) + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + attr_accessor :amount + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + attr_accessor :automatically_finalizes_at + # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + attr_accessor :collection_method + # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + attr_accessor :custom_fields + # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_accessor :description + # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Footer to be displayed on the invoice. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + attr_accessor :payment_settings + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + attr_accessor :statement_descriptor + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + attr_accessor :transfer_data + + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + custom_fields: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + transfer_data: nil + ) + super + @account_tax_ids = account_tax_ids + @amounts_due = amounts_due + @application_fee_amount = application_fee_amount + @auto_advance = auto_advance + @automatic_tax = automatic_tax + @automatically_finalizes_at = automatically_finalizes_at + @collection_method = collection_method + @custom_fields = custom_fields + @days_until_due = days_until_due + @default_margins = default_margins + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @due_date = due_date + @effective_at = effective_at + @expand = expand + @footer = footer + @issuer = issuer + @metadata = metadata + @number = number + @on_behalf_of = on_behalf_of + @payment_settings = payment_settings + @rendering = rendering + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @statement_descriptor = statement_descriptor + @transfer_data = transfer_data + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class DueDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + attr_accessor :collection_method + # Only return invoices that were created during the given date interval. + attr_accessor :created + # Only return invoices for the customer specified by this customer ID. + attr_accessor :customer + # Attribute for param field due_date + attr_accessor :due_date + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + attr_accessor :status + # Only return invoices for the subscription specified by this subscription ID. + attr_accessor :subscription + + def initialize( + collection_method: nil, + created: nil, + customer: nil, + due_date: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + subscription: nil + ) + super + @collection_method = collection_method + @created = created + @customer = customer + @due_date = due_date + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + @subscription = subscription + end + end + + class CreateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Date on which a payment plan’s payment is due. + attr_accessor :due_date + + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil) + super + @amount = amount + @days_until_due = days_until_due + @description = description + @due_date = due_date + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class FromInvoice < Stripe::RequestParams + # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + attr_accessor :action + # The `id` of the invoice that will be cloned. + attr_accessor :invoice + + def initialize(action: nil, invoice: nil) + super + @action = action + @invoice = invoice + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + attr_accessor :enabled + # The selected installment plan to use for this invoice. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(installments: nil, request_three_d_secure: nil) + super + @installments = installments + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + + def initialize(default_mandate: nil, payment_method_options: nil, payment_method_types: nil) + super + @default_mandate = default_mandate + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + end + end + + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + attr_accessor :page_size + + def initialize(page_size: nil) + super + @page_size = page_size + end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + # Invoice pdf rendering options + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + attr_accessor :template_version + + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil) + super + @amount_tax_display = amount_tax_display + @pdf = pdf + @template = template + @template_version = template_version + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address + attr_accessor :address + # Recipient name. + attr_accessor :name + # Recipient phone (including extension) + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + attr_accessor :amount + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + attr_accessor :automatically_finalizes_at + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The currency to create this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # A list of up to 4 custom fields to be displayed on the invoice. + attr_accessor :custom_fields + # The ID of the customer who will be billed. + attr_accessor :customer + # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + attr_accessor :description + # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Footer to be displayed on the invoice. + attr_accessor :footer + # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + attr_accessor :from_invoice + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + attr_accessor :payment_settings + # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. + attr_accessor :pending_invoice_items_behavior + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + attr_accessor :statement_descriptor + # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. + attr_accessor :subscription + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + attr_accessor :transfer_data + + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + currency: nil, + custom_fields: nil, + customer: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + from_invoice: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + pending_invoice_items_behavior: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + subscription: nil, + transfer_data: nil + ) + super + @account_tax_ids = account_tax_ids + @amounts_due = amounts_due + @application_fee_amount = application_fee_amount + @auto_advance = auto_advance + @automatic_tax = automatic_tax + @automatically_finalizes_at = automatically_finalizes_at + @collection_method = collection_method + @currency = currency + @custom_fields = custom_fields + @customer = customer + @days_until_due = days_until_due + @default_margins = default_margins + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @due_date = due_date + @effective_at = effective_at + @expand = expand + @footer = footer + @from_invoice = from_invoice + @issuer = issuer + @metadata = metadata + @number = number + @on_behalf_of = on_behalf_of + @payment_settings = payment_settings + @pending_invoice_items_behavior = pending_invoice_items_behavior + @rendering = rendering + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @statement_descriptor = statement_descriptor + @subscription = subscription + @transfer_data = transfer_data + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class UpcomingParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + + def initialize(ip_address: nil) + super + @ip_address = ip_address + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_ids + + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil) + super + @address = address + @shipping = shipping + @tax = tax + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @description = description + @discountable = discountable + @discounts = discounts + @invoiceitem = invoiceitem + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The end of the prebilled time period. + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(bill_until: nil, iterations: nil) + super + @bill_until = bill_until + @iterations = iterations + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @amendments = amendments + @billing_behavior = billing_behavior + @end_behavior = end_behavior + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + attr_accessor :trial_end + + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancel_now = cancel_now + @default_tax_rates = default_tax_rates + @items = items + @prebilling = prebilling + @proration_behavior = proration_behavior + @proration_date = proration_date + @resume_at = resume_at + @start_date = start_date + @trial_end = trial_end + end + end + + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Settings for automatic tax lookup for this invoice preview. + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :subscription_trial_from_plan + + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ) + super + @automatic_tax = automatic_tax + @coupon = coupon + @currency = currency + @customer = customer + @customer_details = customer_details + @discounts = discounts + @expand = expand + @invoice_items = invoice_items + @issuer = issuer + @on_behalf_of = on_behalf_of + @preview_mode = preview_mode + @schedule = schedule + @schedule_details = schedule_details + @subscription = subscription + @subscription_billing_cycle_anchor = subscription_billing_cycle_anchor + @subscription_cancel_at = subscription_cancel_at + @subscription_cancel_at_period_end = subscription_cancel_at_period_end + @subscription_cancel_now = subscription_cancel_now + @subscription_default_tax_rates = subscription_default_tax_rates + @subscription_details = subscription_details + @subscription_items = subscription_items + @subscription_prebilling = subscription_prebilling + @subscription_proration_behavior = subscription_proration_behavior + @subscription_proration_date = subscription_proration_date + @subscription_resume_at = subscription_resume_at + @subscription_start_date = subscription_start_date + @subscription_trial_end = subscription_trial_end + @subscription_trial_from_plan = subscription_trial_from_plan + end + end + + class AddLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @country = country + @description = description + @display_name = display_name + @inclusive = inclusive + @jurisdiction = jurisdiction + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate_data = tax_rate_data + @taxable_amount = taxable_amount + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. + attr_accessor :invoice_item + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + invoice_item: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @invoice_item = invoice_item + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :invoice_metadata + # The line items to add. + attr_accessor :lines + + def initialize(expand: nil, invoice_metadata: nil, lines: nil) + super + @expand = expand + @invoice_metadata = invoice_metadata + @lines = lines + end + end + + class AttachPaymentParams < Stripe::RequestParams + class PaymentRecordData < Stripe::RequestParams + # The amount that was paid out of band. + attr_accessor :amount + # The currency that was paid out of band. + attr_accessor :currency + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The type of money movement for this out of band payment record. + attr_accessor :money_movement_type + # The timestamp when this out of band payment was paid. + attr_accessor :paid_at + # The reference for this out of band payment record. + attr_accessor :payment_reference + + def initialize( + amount: nil, + currency: nil, + metadata: nil, + money_movement_type: nil, + paid_at: nil, + payment_reference: nil + ) + super + @amount = amount + @currency = currency + @metadata = metadata + @money_movement_type = money_movement_type + @paid_at = paid_at + @payment_reference = payment_reference + end + end + # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + attr_accessor :payment_intent + # The ID of the PaymentRecord to detach from the invoice. + attr_accessor :payment_record + # The PaymentRecord data for attaching an out of band payment to the invoice. + attr_accessor :payment_record_data + + def initialize( + amount_requested: nil, + expand: nil, + payment_intent: nil, + payment_record: nil, + payment_record_data: nil + ) + super + @amount_requested = amount_requested + @expand = expand + @payment_intent = payment_intent + @payment_record = payment_record + @payment_record_data = payment_record_data + end + end + + class AttachPaymentIntentParams < Stripe::RequestParams + # The portion of the PaymentIntent’s `amount` that should be applied to thisinvoice. Defaults to the entire amount. + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + attr_accessor :payment_intent + + def initialize(amount_requested: nil, expand: nil, payment_intent: nil) + super + @amount_requested = amount_requested + @expand = expand + @payment_intent = payment_intent + end + end + + class FinalizeInvoiceParams < Stripe::RequestParams + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + attr_accessor :auto_advance + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(auto_advance: nil, expand: nil) + super + @auto_advance = auto_advance + @expand = expand + end + end + + class MarkUncollectibleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PayParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + # + # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + attr_accessor :forgive + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. + attr_accessor :mandate + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). + attr_accessor :off_session + # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. + attr_accessor :paid_out_of_band + # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. + attr_accessor :payment_method + # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. + attr_accessor :source + + def initialize( + expand: nil, + forgive: nil, + mandate: nil, + off_session: nil, + paid_out_of_band: nil, + payment_method: nil, + source: nil + ) + super + @expand = expand + @forgive = forgive + @mandate = mandate + @off_session = off_session + @paid_out_of_band = paid_out_of_band + @payment_method = payment_method + @source = source + end + end + + class RemoveLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. + attr_accessor :behavior + # ID of an existing line item to remove from this invoice. + attr_accessor :id + + def initialize(behavior: nil, id: nil) + super + @behavior = behavior + @id = id + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :invoice_metadata + # The line items to remove. + attr_accessor :lines + + def initialize(expand: nil, invoice_metadata: nil, lines: nil) + super + @expand = expand + @invoice_metadata = invoice_metadata + @lines = lines + end + end + + class SendInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(description: nil, images: nil, metadata: nil, name: nil, tax_code: nil) + super + @description = description + @images = images + @metadata = metadata + @name = name + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @product_data = product_data + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @country = country + @description = description + @display_name = display_name + @inclusive = inclusive + @jurisdiction = jurisdiction + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + # The amount, in cents (or local equivalent), of the tax. + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + attr_accessor :taxable_amount + + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil) + super + @amount = amount + @tax_rate_data = tax_rate_data + @taxable_amount = taxable_amount + end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + attr_accessor :discounts + # ID of an existing line item on the invoice. + attr_accessor :id + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + id: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ) + super + @amount = amount + @description = description + @discountable = discountable + @discounts = discounts + @id = id + @margins = margins + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_amounts = tax_amounts + @tax_rates = tax_rates + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + attr_accessor :invoice_metadata + # The line items to update. + attr_accessor :lines + + def initialize(expand: nil, invoice_metadata: nil, lines: nil) + super + @expand = expand + @invoice_metadata = invoice_metadata + @lines = lines + end + end + + class VoidInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreatePreviewParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + + def initialize(ip_address: nil) + super + @ip_address = ip_address + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_ids + + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil) + super + @address = address + @shipping = shipping + @tax = tax + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @description = description + @discountable = discountable + @discounts = discounts + @invoiceitem = invoiceitem + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The end of the prebilled time period. + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(bill_until: nil, iterations: nil) + super + @bill_until = bill_until + @iterations = iterations + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @amendments = amendments + @billing_behavior = billing_behavior + @end_behavior = end_behavior + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + attr_accessor :trial_end + + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancel_now = cancel_now + @default_tax_rates = default_tax_rates + @items = items + @prebilling = prebilling + @proration_behavior = proration_behavior + @proration_date = proration_date + @resume_at = resume_at + @start_date = start_date + @trial_end = trial_end + end + end + # Settings for automatic tax lookup for this invoice preview. + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + attr_accessor :subscription + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + attr_accessor :subscription_details + + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_details: nil + ) + super + @automatic_tax = automatic_tax + @coupon = coupon + @currency = currency + @customer = customer + @customer_details = customer_details + @discounts = discounts + @expand = expand + @invoice_items = invoice_items + @issuer = issuer + @on_behalf_of = on_behalf_of + @preview_mode = preview_mode + @schedule = schedule + @schedule_details = schedule_details + @subscription = subscription + @subscription_details = subscription_details + end + end + # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. def add_lines(invoice, params = {}, opts = {}) request( diff --git a/lib/stripe/services/invoice_upcoming_lines_service.rb b/lib/stripe/services/invoice_upcoming_lines_service.rb index 6783da871..f1669345e 100644 --- a/lib/stripe/services/invoice_upcoming_lines_service.rb +++ b/lib/stripe/services/invoice_upcoming_lines_service.rb @@ -3,6 +3,1966 @@ module Stripe class InvoiceUpcomingLinesService < StripeService + class ListParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Customer shipping address. + attr_accessor :address + # Customer name. + attr_accessor :name + # Customer phone (including extension). + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + attr_accessor :ip_address + + def initialize(ip_address: nil) + super + @ip_address = ip_address + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's address. + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + attr_accessor :shipping + # Tax details about the customer. + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The customer's tax IDs. + attr_accessor :tax_ids + + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil) + super + @address = address + @shipping = shipping + @tax = tax + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + attr_accessor :end + # The start of the period. This value is inclusive. + attr_accessor :start + + def initialize(end_: nil, start: nil) + super + @end = end_ + @start = start + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @amount = amount + @currency = currency + @description = description + @discountable = discountable + @discounts = discounts + @invoiceitem = invoiceitem + @metadata = metadata + @period = period + @price = price + @price_data = price_data + @quantity = quantity + @tax_behavior = tax_behavior + @tax_code = tax_code + @tax_rates = tax_rates + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The end of the prebilled time period. + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(bill_until: nil, iterations: nil) + super + @bill_until = bill_until + @iterations = iterations + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @amendments = amendments + @billing_behavior = billing_behavior + @end_behavior = end_behavior + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + attr_accessor :trial_end + + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancel_now = cancel_now + @default_tax_rates = default_tax_rates + @items = items + @prebilling = prebilling + @proration_behavior = proration_behavior + @proration_date = proration_date + @resume_at = resume_at + @start_date = start_date + @trial_end = trial_end + end + end + + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Settings for automatic tax lookup for this invoice preview. + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + attr_accessor :schedule_details + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :subscription_trial_from_plan + + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + ending_before: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + limit: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + starting_after: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ) + super + @automatic_tax = automatic_tax + @coupon = coupon + @currency = currency + @customer = customer + @customer_details = customer_details + @discounts = discounts + @ending_before = ending_before + @expand = expand + @invoice_items = invoice_items + @issuer = issuer + @limit = limit + @on_behalf_of = on_behalf_of + @preview_mode = preview_mode + @schedule = schedule + @schedule_details = schedule_details + @starting_after = starting_after + @subscription = subscription + @subscription_billing_cycle_anchor = subscription_billing_cycle_anchor + @subscription_cancel_at = subscription_cancel_at + @subscription_cancel_at_period_end = subscription_cancel_at_period_end + @subscription_cancel_now = subscription_cancel_now + @subscription_default_tax_rates = subscription_default_tax_rates + @subscription_details = subscription_details + @subscription_items = subscription_items + @subscription_prebilling = subscription_prebilling + @subscription_proration_behavior = subscription_proration_behavior + @subscription_proration_date = subscription_proration_date + @subscription_resume_at = subscription_resume_at + @subscription_start_date = subscription_start_date + @subscription_trial_end = subscription_trial_end + @subscription_trial_from_plan = subscription_trial_from_plan + end + end + # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/authorization_service.rb b/lib/stripe/services/issuing/authorization_service.rb index 51b435f3f..5acefc334 100644 --- a/lib/stripe/services/issuing/authorization_service.rb +++ b/lib/stripe/services/issuing/authorization_service.rb @@ -4,6 +4,116 @@ module Stripe module Issuing class AuthorizationService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return authorizations that belong to the given card. + attr_accessor :card + # Only return authorizations that belong to the given cardholder. + attr_accessor :cardholder + # Only return authorizations that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + attr_accessor :status + + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @card = card + @cardholder = cardholder + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class ApproveParams < Stripe::RequestParams + # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). + attr_accessor :amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(amount: nil, expand: nil, metadata: nil) + super + @amount = amount + @expand = expand + @metadata = metadata + end + end + + class DeclineParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). def approve(authorization, params = {}, opts = {}) diff --git a/lib/stripe/services/issuing/card_service.rb b/lib/stripe/services/issuing/card_service.rb index c2d96dae4..9c8d84e53 100644 --- a/lib/stripe/services/issuing/card_service.rb +++ b/lib/stripe/services/issuing/card_service.rb @@ -4,6 +4,480 @@ module Stripe module Issuing class CardService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return cards belonging to the Cardholder with the provided ID. + attr_accessor :cardholder + # Only return cards that were issued during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Only return cards that have the given expiration month. + attr_accessor :exp_month + # Only return cards that have the given expiration year. + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return cards that have the given last four digits. + attr_accessor :last4 + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Attribute for param field personalization_design + attr_accessor :personalization_design + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + attr_accessor :status + # Only return cards that have the given type. One of `virtual` or `physical`. + attr_accessor :type + + def initialize( + cardholder: nil, + created: nil, + ending_before: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + last4: nil, + limit: nil, + personalization_design: nil, + starting_after: nil, + status: nil, + type: nil + ) + super + @cardholder = cardholder + @created = created + @ending_before = ending_before + @exp_month = exp_month + @exp_year = exp_year + @expand = expand + @last4 = last4 + @limit = limit + @personalization_design = personalization_design + @starting_after = starting_after + @status = status + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + attr_accessor :encrypted_number + + def initialize(encrypted_number: nil) + super + @encrypted_number = encrypted_number + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + attr_accessor :eori_number + + def initialize(eori_number: nil) + super + @eori_number = eori_number + end + end + # The address that the card is shipped to. + attr_accessor :address + # Address validation settings. + attr_accessor :address_validation + # Customs information for the shipment. + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + attr_accessor :name + # Phone number of the recipient of the shipment. + attr_accessor :phone_number + # Whether a signature is required for card delivery. + attr_accessor :require_signature + # Shipment service. + attr_accessor :service + # Packaging options. + attr_accessor :type + + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ) + super + @address = address + @address_validation = address_validation + @customs = customs + @name = name + @phone_number = phone_number + @require_signature = require_signature + @service = service + @type = type + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + attr_accessor :spending_limits + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + end + end + # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. + attr_accessor :cardholder + # The currency for the card. + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field financial_account + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The personalization design object belonging to this card. + attr_accessor :personalization_design + # The desired PIN for this card. + attr_accessor :pin + # The card this is meant to be a replacement for (if any). + attr_accessor :replacement_for + # If `replacement_for` is specified, this should indicate why that card is being replaced. + attr_accessor :replacement_reason + # The second line to print on the card. Max length: 24 characters. + attr_accessor :second_line + # The address where the card will be shipped. + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + attr_accessor :status + # The type of card to issue. Possible values are `physical` or `virtual`. + attr_accessor :type + + def initialize( + cardholder: nil, + currency: nil, + expand: nil, + financial_account: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + replacement_for: nil, + replacement_reason: nil, + second_line: nil, + shipping: nil, + spending_controls: nil, + status: nil, + type: nil + ) + super + @cardholder = cardholder + @currency = currency + @expand = expand + @financial_account = financial_account + @metadata = metadata + @personalization_design = personalization_design + @pin = pin + @replacement_for = replacement_for + @replacement_reason = replacement_reason + @second_line = second_line + @shipping = shipping + @spending_controls = spending_controls + @status = status + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + attr_accessor :encrypted_number + + def initialize(encrypted_number: nil) + super + @encrypted_number = encrypted_number + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + attr_accessor :eori_number + + def initialize(eori_number: nil) + super + @eori_number = eori_number + end + end + # The address that the card is shipped to. + attr_accessor :address + # Address validation settings. + attr_accessor :address_validation + # Customs information for the shipment. + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + attr_accessor :name + # Phone number of the recipient of the shipment. + attr_accessor :phone_number + # Whether a signature is required for card delivery. + attr_accessor :require_signature + # Shipment service. + attr_accessor :service + # Packaging options. + attr_accessor :type + + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ) + super + @address = address + @address_validation = address_validation + @customs = customs + @name = name + @phone_number = phone_number + @require_signature = require_signature + @service = service + @type = type + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + attr_accessor :spending_limits + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + end + end + # Reason why the `status` of this card is `canceled`. + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Attribute for param field personalization_design + attr_accessor :personalization_design + # The desired new PIN for this card. + attr_accessor :pin + # Updated shipping information for the card. + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + attr_accessor :status + + def initialize( + cancellation_reason: nil, + expand: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + shipping: nil, + spending_controls: nil, + status: nil + ) + super + @cancellation_reason = cancellation_reason + @expand = expand + @metadata = metadata + @personalization_design = personalization_design + @pin = pin + @shipping = shipping + @spending_controls = spending_controls + @status = status + end + end + # Creates an Issuing Card object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/cardholder_service.rb b/lib/stripe/services/issuing/cardholder_service.rb index 790670bb9..7440e2717 100644 --- a/lib/stripe/services/issuing/cardholder_service.rb +++ b/lib/stripe/services/issuing/cardholder_service.rb @@ -4,6 +4,559 @@ module Stripe module Issuing class CardholderService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return cardholders that were created during the given date interval. + attr_accessor :created + # Only return cardholders that have the given email address. + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return cardholders that have the given phone number. + attr_accessor :phone_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + attr_accessor :status + # Only return cardholders that have the given type. One of `individual` or `company`. + attr_accessor :type + + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + phone_number: nil, + starting_after: nil, + status: nil, + type: nil + ) + super + @created = created + @email = email + @ending_before = ending_before + @expand = expand + @limit = limit + @phone_number = phone_number + @starting_after = starting_after + @status = status + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The cardholder’s billing address. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + + class Company < Stripe::RequestParams + # The entity's business ID number. + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + attr_accessor :user_terms_acceptance + + def initialize(user_terms_acceptance: nil) + super + @user_terms_acceptance = user_terms_acceptance + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # Information related to the card_issuing program for this cardholder. + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :last_name + # Government-issued ID document for this cardholder. + attr_accessor :verification + + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ) + super + @card_issuing = card_issuing + @dob = dob + @first_name = first_name + @last_name = last_name + @verification = verification + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + attr_accessor :spending_limits_currency + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + @spending_limits_currency = spending_limits_currency + end + end + # The cardholder's billing address. + attr_accessor :billing + # Additional information about a `company` cardholder. + attr_accessor :company + # The cardholder's email address. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Additional information about an `individual` cardholder. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. + attr_accessor :name + # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. + # While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + attr_accessor :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + attr_accessor :type + + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + name: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil, + type: nil + ) + super + @billing = billing + @company = company + @email = email + @expand = expand + @individual = individual + @metadata = metadata + @name = name + @phone_number = phone_number + @preferred_locales = preferred_locales + @spending_controls = spending_controls + @status = status + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The cardholder’s billing address. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + + class Company < Stripe::RequestParams + # The entity's business ID number. + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + attr_accessor :user_terms_acceptance + + def initialize(user_terms_acceptance: nil) + super + @user_terms_acceptance = user_terms_acceptance + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # Information related to the card_issuing program for this cardholder. + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + attr_accessor :last_name + # Government-issued ID document for this cardholder. + attr_accessor :verification + + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ) + super + @card_issuing = card_issuing + @dob = dob + @first_name = first_name + @last_name = last_name + @verification = verification + end + end + + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + attr_accessor :categories + # Interval (or event) to which the amount applies. + attr_accessor :interval + + def initialize(amount: nil, categories: nil, interval: nil) + super + @amount = amount + @categories = categories + @interval = interval + end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + attr_accessor :spending_limits_currency + + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ) + super + @allowed_categories = allowed_categories + @allowed_merchant_countries = allowed_merchant_countries + @blocked_categories = blocked_categories + @blocked_merchant_countries = blocked_merchant_countries + @spending_limits = spending_limits + @spending_limits_currency = spending_limits_currency + end + end + # The cardholder's billing address. + attr_accessor :billing + # Additional information about a `company` cardholder. + attr_accessor :company + # The cardholder's email address. + attr_accessor :email + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Additional information about an `individual` cardholder. + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. + attr_accessor :status + + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil + ) + super + @billing = billing + @company = company + @email = email + @expand = expand + @individual = individual + @metadata = metadata + @phone_number = phone_number + @preferred_locales = preferred_locales + @spending_controls = spending_controls + @status = status + end + end + # Creates a new Issuing Cardholder object that can be issued cards. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/credit_underwriting_record_service.rb b/lib/stripe/services/issuing/credit_underwriting_record_service.rb index ded7b12f0..a0b969eea 100644 --- a/lib/stripe/services/issuing/credit_underwriting_record_service.rb +++ b/lib/stripe/services/issuing/credit_underwriting_record_service.rb @@ -4,6 +4,462 @@ module Stripe module Issuing class CreditUnderwritingRecordService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CorrectParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + attr_accessor :application_method + # Scope of demand made by the applicant. + attr_accessor :purpose + # Date when the applicant submitted their application. + attr_accessor :submitted_at + + def initialize(application_method: nil, purpose: nil, submitted_at: nil) + super + @application_method = application_method + @purpose = purpose + @submitted_at = submitted_at + end + end + + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + attr_accessor :email + # Full name of the company or person. + attr_accessor :name + + def initialize(email: nil, name: nil) + super + @email = email + @name = name + end + end + + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(amount: nil, currency: nil, reason_other_explanation: nil, reasons: nil) + super + @amount = amount + @currency = currency + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + # Details about the application rejection. + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + attr_accessor :credit_line_closed + # Outcome of the decision. + attr_accessor :type + + def initialize( + application_rejected: nil, + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ) + super + @application_rejected = application_rejected + @credit_limit_approved = credit_limit_approved + @credit_limit_decreased = credit_limit_decreased + @credit_line_closed = credit_line_closed + @type = type + end + end + + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + attr_accessor :explanation + # The decision before the exception was applied. + attr_accessor :original_decision_type + + def initialize(explanation: nil, original_decision_type: nil) + super + @explanation = explanation + @original_decision_type = original_decision_type + end + end + # Details about the application submission. + attr_accessor :application + # Information about the company or person applying or holding the account. + attr_accessor :credit_user + # Date when a decision was made. + attr_accessor :decided_at + # Details about the decision. + attr_accessor :decision + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_accessor :underwriting_exception + + def initialize( + application: nil, + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ) + super + @application = application + @credit_user = credit_user + @decided_at = decided_at + @decision = decision + @expand = expand + @metadata = metadata + @regulatory_reporting_file = regulatory_reporting_file + @underwriting_exception = underwriting_exception + end + end + + class ReportDecisionParams < Stripe::RequestParams + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + # Details about the application rejection. + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + attr_accessor :credit_limit_approved + # Outcome of the decision. + attr_accessor :type + + def initialize(application_rejected: nil, credit_limit_approved: nil, type: nil) + super + @application_rejected = application_rejected + @credit_limit_approved = credit_limit_approved + @type = type + end + end + + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + attr_accessor :explanation + # The decision before the exception was applied. + attr_accessor :original_decision_type + + def initialize(explanation: nil, original_decision_type: nil) + super + @explanation = explanation + @original_decision_type = original_decision_type + end + end + # Date when a decision was made. + attr_accessor :decided_at + # Details about the decision. + attr_accessor :decision + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_accessor :underwriting_exception + + def initialize( + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ) + super + @decided_at = decided_at + @decision = decision + @expand = expand + @metadata = metadata + @regulatory_reporting_file = regulatory_reporting_file + @underwriting_exception = underwriting_exception + end + end + + class CreateFromApplicationParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + attr_accessor :application_method + # Scope of demand made by the applicant. + attr_accessor :purpose + # Date when the applicant submitted their application. + attr_accessor :submitted_at + + def initialize(application_method: nil, purpose: nil, submitted_at: nil) + super + @application_method = application_method + @purpose = purpose + @submitted_at = submitted_at + end + end + + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + attr_accessor :email + # Full name of the company or person. + attr_accessor :name + + def initialize(email: nil, name: nil) + super + @email = email + @name = name + end + end + # Details about the application submission. + attr_accessor :application + # Information about the company or person applying or holding the account. + attr_accessor :credit_user + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(application: nil, credit_user: nil, expand: nil, metadata: nil) + super + @application = application + @credit_user = credit_user + @expand = expand + @metadata = metadata + end + end + + class CreateFromProactiveReviewParams < Stripe::RequestParams + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + attr_accessor :email + # Full name of the company or person. + attr_accessor :name + + def initialize(email: nil, name: nil) + super + @email = email + @name = name + end + end + + class Decision < Stripe::RequestParams + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + attr_accessor :currency + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(amount: nil, currency: nil, reason_other_explanation: nil, reasons: nil) + super + @amount = amount + @currency = currency + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + attr_accessor :reasons + + def initialize(reason_other_explanation: nil, reasons: nil) + super + @reason_other_explanation = reason_other_explanation + @reasons = reasons + end + end + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + attr_accessor :credit_line_closed + # Outcome of the decision. + attr_accessor :type + + def initialize( + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ) + super + @credit_limit_approved = credit_limit_approved + @credit_limit_decreased = credit_limit_decreased + @credit_line_closed = credit_line_closed + @type = type + end + end + + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + attr_accessor :explanation + # The decision before the exception was applied. + attr_accessor :original_decision_type + + def initialize(explanation: nil, original_decision_type: nil) + super + @explanation = explanation + @original_decision_type = original_decision_type + end + end + # Information about the company or person applying or holding the account. + attr_accessor :credit_user + # Date when a decision was made. + attr_accessor :decided_at + # Details about the decision. + attr_accessor :decision + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + attr_accessor :underwriting_exception + + def initialize( + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ) + super + @credit_user = credit_user + @decided_at = decided_at + @decision = decision + @expand = expand + @metadata = metadata + @regulatory_reporting_file = regulatory_reporting_file + @underwriting_exception = underwriting_exception + end + end + # Update a CreditUnderwritingRecord object to correct mistakes. def correct(credit_underwriting_record, params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/dispute_service.rb b/lib/stripe/services/issuing/dispute_service.rb index 310fded82..e2f7ad0f3 100644 --- a/lib/stripe/services/issuing/dispute_service.rb +++ b/lib/stripe/services/issuing/dispute_service.rb @@ -4,6 +4,664 @@ module Stripe module Issuing class DisputeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return Issuing disputes that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Select Issuing disputes with the given status. + attr_accessor :status + # Select the Issuing dispute for the given transaction. + attr_accessor :transaction + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + transaction: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + @transaction = transaction + end + end + + class CreateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_policy_provided = cancellation_policy_provided + @cancellation_reason = cancellation_reason + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + @return_status = return_status + @returned_at = returned_at + end + end + + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + attr_accessor :original_transaction + + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ) + super + @additional_documentation = additional_documentation + @card_statement = card_statement + @cash_receipt = cash_receipt + @check_image = check_image + @explanation = explanation + @original_transaction = original_transaction + end + end + + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @received_at = received_at + @return_description = return_description + @return_status = return_status + @returned_at = returned_at + end + end + + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_reason = cancellation_reason + @explanation = explanation + @received_at = received_at + end + end + # Evidence provided when `reason` is 'canceled'. + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + attr_accessor :service_not_as_described + + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ) + super + @canceled = canceled + @duplicate = duplicate + @fraudulent = fraudulent + @merchandise_not_as_described = merchandise_not_as_described + @no_valid_authorization = no_valid_authorization + @not_received = not_received + @other = other + @reason = reason + @service_not_as_described = service_not_as_described + end + end + + class Treasury < Stripe::RequestParams + # The ID of the ReceivedDebit to initiate an Issuings dispute for. + attr_accessor :received_debit + + def initialize(received_debit: nil) + super + @received_debit = received_debit + end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + attr_accessor :amount + # Evidence provided for the dispute. + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + attr_accessor :transaction + # Params for disputes related to Treasury FinancialAccounts + attr_accessor :treasury + + def initialize( + amount: nil, + evidence: nil, + expand: nil, + metadata: nil, + transaction: nil, + treasury: nil + ) + super + @amount = amount + @evidence = evidence + @expand = expand + @metadata = metadata + @transaction = transaction + @treasury = treasury + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_policy_provided = cancellation_policy_provided + @cancellation_reason = cancellation_reason + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + @return_status = return_status + @returned_at = returned_at + end + end + + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + attr_accessor :original_transaction + + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ) + super + @additional_documentation = additional_documentation + @card_statement = card_statement + @cash_receipt = cash_receipt + @check_image = check_image + @explanation = explanation + @original_transaction = original_transaction + end + end + + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + attr_accessor :returned_at + + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @received_at = received_at + @return_description = return_description + @return_status = return_status + @returned_at = returned_at + end + end + + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + + def initialize(additional_documentation: nil, explanation: nil) + super + @additional_documentation = additional_documentation + @explanation = explanation + end + end + + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @expected_at = expected_at + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + attr_accessor :product_description + # Whether the product was a merchandise or service. + attr_accessor :product_type + + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ) + super + @additional_documentation = additional_documentation + @explanation = explanation + @product_description = product_description + @product_type = product_type + end + end + + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + attr_accessor :additional_documentation + # Date when order was canceled. + attr_accessor :canceled_at + # Reason for canceling the order. + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + attr_accessor :explanation + # Date when the product was received. + attr_accessor :received_at + + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ) + super + @additional_documentation = additional_documentation + @canceled_at = canceled_at + @cancellation_reason = cancellation_reason + @explanation = explanation + @received_at = received_at + end + end + # Evidence provided when `reason` is 'canceled'. + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + attr_accessor :service_not_as_described + + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ) + super + @canceled = canceled + @duplicate = duplicate + @fraudulent = fraudulent + @merchandise_not_as_described = merchandise_not_as_described + @no_valid_authorization = no_valid_authorization + @not_received = not_received + @other = other + @reason = reason + @service_not_as_described = service_not_as_described + end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Evidence provided for the dispute. + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil) + super + @amount = amount + @evidence = evidence + @expand = expand + @metadata = metadata + end + end + + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/dispute_settlement_detail_service.rb b/lib/stripe/services/issuing/dispute_settlement_detail_service.rb index 54ce6c23b..c8caa8d0d 100644 --- a/lib/stripe/services/issuing/dispute_settlement_detail_service.rb +++ b/lib/stripe/services/issuing/dispute_settlement_detail_service.rb @@ -4,6 +4,44 @@ module Stripe module Issuing class DisputeSettlementDetailService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Select the Issuing dispute settlement details for the given settlement. + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @settlement = settlement + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/fraud_liability_debit_service.rb b/lib/stripe/services/issuing/fraud_liability_debit_service.rb index b81ed38d9..de2ccdde5 100644 --- a/lib/stripe/services/issuing/fraud_liability_debit_service.rb +++ b/lib/stripe/services/issuing/fraud_liability_debit_service.rb @@ -4,6 +4,62 @@ module Stripe module Issuing class FraudLiabilityDebitService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return Issuing Fraud Liability Debits that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/personalization_design_service.rb b/lib/stripe/services/issuing/personalization_design_service.rb index 2dd92fe92..bebc579ec 100644 --- a/lib/stripe/services/issuing/personalization_design_service.rb +++ b/lib/stripe/services/issuing/personalization_design_service.rb @@ -4,6 +4,208 @@ module Stripe module Issuing class PersonalizationDesignService < StripeService + class ListParams < Stripe::RequestParams + class Preferences < Stripe::RequestParams + # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. + attr_accessor :is_default + # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + attr_accessor :is_platform_default + + def initialize(is_default: nil, is_platform_default: nil) + super + @is_default = is_default + @is_platform_default = is_platform_default + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return personalization designs with the given lookup keys. + attr_accessor :lookup_keys + # Only return personalization designs with the given preferences. + attr_accessor :preferences + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return personalization designs with the given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + preferences: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @lookup_keys = lookup_keys + @preferences = preferences + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + attr_accessor :footer_body + # The footer title text of the carrier letter. + attr_accessor :footer_title + # The header body text of the carrier letter. + attr_accessor :header_body + # The header title text of the carrier letter. + attr_accessor :header_title + + def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil) + super + @footer_body = footer_body + @footer_title = footer_title + @header_body = header_body + @header_title = header_title + end + end + + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + attr_accessor :is_default + + def initialize(is_default: nil) + super + @is_default = is_default + end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Friendly display name. + attr_accessor :name + # The physical bundle object belonging to this personalization design. + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + attr_accessor :transfer_lookup_key + + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ) + super + @card_logo = card_logo + @carrier_text = carrier_text + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @name = name + @physical_bundle = physical_bundle + @preferences = preferences + @transfer_lookup_key = transfer_lookup_key + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + attr_accessor :footer_body + # The footer title text of the carrier letter. + attr_accessor :footer_title + # The header body text of the carrier letter. + attr_accessor :header_body + # The header title text of the carrier letter. + attr_accessor :header_title + + def initialize(footer_body: nil, footer_title: nil, header_body: nil, header_title: nil) + super + @footer_body = footer_body + @footer_title = footer_title + @header_body = header_body + @header_title = header_title + end + end + + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + attr_accessor :is_default + + def initialize(is_default: nil) + super + @is_default = is_default + end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Friendly display name. Providing an empty string will set the field to null. + attr_accessor :name + # The physical bundle object belonging to this personalization design. + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + attr_accessor :transfer_lookup_key + + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ) + super + @card_logo = card_logo + @carrier_text = carrier_text + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @name = name + @physical_bundle = physical_bundle + @preferences = preferences + @transfer_lookup_key = transfer_lookup_key + end + end + # Creates a personalization design object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/physical_bundle_service.rb b/lib/stripe/services/issuing/physical_bundle_service.rb index 60e0d404d..4c6534fe6 100644 --- a/lib/stripe/services/issuing/physical_bundle_service.rb +++ b/lib/stripe/services/issuing/physical_bundle_service.rb @@ -4,6 +4,48 @@ module Stripe module Issuing class PhysicalBundleService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return physical bundles with the given status. + attr_accessor :status + # Only return physical bundles with the given type. + attr_accessor :type + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + type: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/token_service.rb b/lib/stripe/services/issuing/token_service.rb index 1a081f27d..33f3ce10f 100644 --- a/lib/stripe/services/issuing/token_service.rb +++ b/lib/stripe/services/issuing/token_service.rb @@ -4,6 +4,83 @@ module Stripe module Issuing class TokenService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # The Issuing card identifier to list tokens for. + attr_accessor :card + # Only return Issuing tokens that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Select Issuing tokens with the given status. + attr_accessor :status + + def initialize( + card: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @card = card + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Specifies which status the token should be updated to. + attr_accessor :status + + def initialize(expand: nil, status: nil) + super + @expand = expand + @status = status + end + end + # Lists all Issuing Token objects for a given card. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/issuing/transaction_service.rb b/lib/stripe/services/issuing/transaction_service.rb index 3d51e6409..f22282bcf 100644 --- a/lib/stripe/services/issuing/transaction_service.rb +++ b/lib/stripe/services/issuing/transaction_service.rb @@ -4,6 +4,91 @@ module Stripe module Issuing class TransactionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return transactions that belong to the given card. + attr_accessor :card + # Only return transactions that belong to the given cardholder. + attr_accessor :cardholder + # Only return transactions that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return transactions that are associated with the given settlement. + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return transactions that have the given type. One of `capture` or `refund`. + attr_accessor :type + + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil, + type: nil + ) + super + @card = card + @cardholder = cardholder + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @settlement = settlement + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/mandate_service.rb b/lib/stripe/services/mandate_service.rb index 57e00ce14..cd4fbfc30 100644 --- a/lib/stripe/services/mandate_service.rb +++ b/lib/stripe/services/mandate_service.rb @@ -3,6 +3,16 @@ module Stripe class MandateService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves a Mandate object. def retrieve(mandate, params = {}, opts = {}) request( diff --git a/lib/stripe/services/margin_service.rb b/lib/stripe/services/margin_service.rb index dcc2f6d4f..70978e940 100644 --- a/lib/stripe/services/margin_service.rb +++ b/lib/stripe/services/margin_service.rb @@ -3,6 +3,79 @@ module Stripe class MarginService < StripeService + class ListParams < Stripe::RequestParams + # Only return margins that are active or inactive. For example, pass `true` to only list active margins. + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(active: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @active = active + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + attr_accessor :name + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + attr_accessor :percent_off + + def initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil) + super + @active = active + @expand = expand + @metadata = metadata + @name = name + @percent_off = percent_off + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + attr_accessor :name + + def initialize(active: nil, expand: nil, metadata: nil, name: nil) + super + @active = active + @expand = expand + @metadata = metadata + @name = name + end + end + # Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/order_line_item_service.rb b/lib/stripe/services/order_line_item_service.rb index d2535117d..e158b1515 100644 --- a/lib/stripe/services/order_line_item_service.rb +++ b/lib/stripe/services/order_line_item_service.rb @@ -3,6 +3,25 @@ module Stripe class OrderLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/order_service.rb b/lib/stripe/services/order_service.rb index 6015bedb4..b0ad9c6f9 100644 --- a/lib/stripe/services/order_service.rb +++ b/lib/stripe/services/order_service.rb @@ -10,6 +10,2281 @@ def initialize(requestor) @line_items = Stripe::OrderLineItemService.new(@requestor) end + class ListParams < Stripe::RequestParams + # Only return orders for the given customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address provided by the customer. + attr_accessor :address + # The billing email provided by the customer. + attr_accessor :email + # The billing name provided by the customer. + attr_accessor :name + # The billing phone number provided by the customer. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + attr_accessor :type + + def initialize(gift_card: nil, type: nil) + super + @gift_card = gift_card + @type = type + end + end + + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + + def initialize(coupon: nil, discount: nil) + super + @coupon = coupon + @discount = discount + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ) + super + @description = description + @id = id + @images = images + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @shippable = shippable + @tax_code = tax_code + @url = url + end + end + # The description for the line item. Will default to the name of the associated product. + attr_accessor :description + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + attr_accessor :product_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates applied to this line item. + attr_accessor :tax_rates + + def initialize( + description: nil, + discounts: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @description = description + @discounts = discounts + @price = price + @price_data = price_data + @product = product + @product_data = product_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + attr_accessor :wechat_pay + + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ) + super + @acss_debit = acss_debit + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @ideal = ideal + @klarna = klarna + @link = link + @oxxo = oxxo + @p24 = p24 + @paypal = paypal + @sepa_debit = sepa_debit + @sofort = sofort + @wechat_pay = wechat_pay + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # ID of the Connected account receiving the transfer. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + attr_accessor :transfer_data + + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ) + super + @application_fee_amount = application_fee_amount + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @return_url = return_url + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + end + end + # Settings describing how the order should configure generated PaymentIntents. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The shipping address for the order. + attr_accessor :address + # The name of the recipient of the order. + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + attr_accessor :tax_ids + + def initialize(tax_exempt: nil, tax_ids: nil) + super + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + # Settings for automatic tax calculation for this order. + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The customer associated with this order. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The IP address of the purchaser for this order. + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + attr_accessor :shipping_cost + # Shipping details for the order. + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + attr_accessor :tax_details + + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ) + super + @automatic_tax = automatic_tax + @billing_details = billing_details + @credits = credits + @currency = currency + @customer = customer + @description = description + @discounts = discounts + @expand = expand + @ip_address = ip_address + @line_items = line_items + @metadata = metadata + @payment = payment + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @tax_details = tax_details + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address provided by the customer. + attr_accessor :address + # The billing email provided by the customer. + attr_accessor :email + # The billing name provided by the customer. + attr_accessor :name + # The billing phone number provided by the customer. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + attr_accessor :type + + def initialize(gift_card: nil, type: nil) + super + @gift_card = gift_card + @type = type + end + end + + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + + def initialize(coupon: nil, discount: nil) + super + @coupon = coupon + @discount = discount + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ) + super + @description = description + @id = id + @images = images + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @shippable = shippable + @tax_code = tax_code + @url = url + end + end + # The description for the line item. Will default to the name of the associated product. + attr_accessor :description + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of an existing line item on the order. + attr_accessor :id + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + attr_accessor :product_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates applied to this line item. + attr_accessor :tax_rates + + def initialize( + description: nil, + discounts: nil, + id: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @description = description + @discounts = discounts + @id = id + @price = price + @price_data = price_data + @product = product + @product_data = product_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + attr_accessor :wechat_pay + + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ) + super + @acss_debit = acss_debit + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @ideal = ideal + @klarna = klarna + @link = link + @oxxo = oxxo + @p24 = p24 + @paypal = paypal + @sepa_debit = sepa_debit + @sofort = sofort + @wechat_pay = wechat_pay + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # ID of the Connected account receiving the transfer. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + attr_accessor :transfer_data + + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ) + super + @application_fee_amount = application_fee_amount + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @return_url = return_url + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + end + end + # Settings describing how the order should configure generated PaymentIntents. + attr_accessor :settings + + def initialize(settings: nil) + super + @settings = settings + end + end + + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + # The ID of the shipping rate to use for this order. + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + attr_accessor :shipping_rate_data + + def initialize(shipping_rate: nil, shipping_rate_data: nil) + super + @shipping_rate = shipping_rate + @shipping_rate_data = shipping_rate_data + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The shipping address for the order. + attr_accessor :address + # The name of the recipient of the order. + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + attr_accessor :tax_ids + + def initialize(tax_exempt: nil, tax_ids: nil) + super + @tax_exempt = tax_exempt + @tax_ids = tax_ids + end + end + # Settings for automatic tax calculation for this order. + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field. + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The customer associated with this order. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The IP address of the purchaser for this order. + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + attr_accessor :shipping_cost + # Shipping details for the order. + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + attr_accessor :tax_details + + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ) + super + @automatic_tax = automatic_tax + @billing_details = billing_details + @credits = credits + @currency = currency + @customer = customer + @description = description + @discounts = discounts + @expand = expand + @ip_address = ip_address + @line_items = line_items + @metadata = metadata + @payment = payment + @shipping_cost = shipping_cost + @shipping_details = shipping_details + @tax_details = tax_details + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReopenParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. + attr_accessor :expected_total + + def initialize(expand: nil, expected_total: nil) + super + @expand = expand + @expected_total = expected_total + end + end + # Cancels the order as well as the payment intent if one is attached. def cancel(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_attempt_record_service.rb b/lib/stripe/services/payment_attempt_record_service.rb index 0d3749c21..c5e8e49cd 100644 --- a/lib/stripe/services/payment_attempt_record_service.rb +++ b/lib/stripe/services/payment_attempt_record_service.rb @@ -3,6 +3,29 @@ module Stripe class PaymentAttemptRecordService < StripeService + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The ID of the Payment Record. + attr_accessor :payment_record + + def initialize(expand: nil, payment_record: nil) + super + @expand = expand + @payment_record = payment_record + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # List all the Payment Attempt Records attached to the specified Payment Record. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_intent_service.rb b/lib/stripe/services/payment_intent_service.rb index b0e02aa3c..43b8273c9 100644 --- a/lib/stripe/services/payment_intent_service.rb +++ b/lib/stripe/services/payment_intent_service.rb @@ -3,6 +3,11318 @@ module Stripe class PaymentIntentService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + attr_accessor :created + # Only return PaymentIntents for the customer that this customer ID specifies. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + attr_accessor :allow_redirects + # Whether this feature is enabled. + attr_accessor :enabled + + def initialize(allow_redirects: nil, enabled: nil) + super + @allow_redirects = allow_redirects + @enabled = enabled + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(code: nil, setup_future_usage: nil) + super + @code = code + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Please pass in an address that is within your Stripe user account country + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + attr_accessor :phone + + def initialize(address: nil, phone: nil) + super + @address = address + @phone = phone + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @exemption_indicator = exemption_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + attr_accessor :three_d_secure + + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ) + super + @capture_method = capture_method + @cvc_token = cvc_token + @installments = installments + @mandate_options = mandate_options + @moto = moto + @network = network + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_partial_authorization = request_partial_authorization + @request_three_d_secure = request_three_d_secure + @require_cvc_recollection = require_cvc_recollection + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + @statement_details = statement_details + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + attr_accessor :requested_priority + + def initialize(requested_priority: nil) + super + @requested_priority = requested_priority + end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + attr_accessor :routing + + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ) + super + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization_support = request_incremental_authorization_support + @routing = routing + end + end + + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after = expires_after + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ) + super + @confirmation_number = confirmation_number + @expires_after_days = expires_after_days + @expires_at = expires_at + @product_description = product_description + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after_seconds = expires_after_seconds + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Rechnung < Stripe::RequestParams + end + + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(reference: nil, setup_future_usage: nil) + super + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Preferred transaction settlement speed + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @preferred_settlement_speed = preferred_settlement_speed + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @card_present = card_present + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + # The amount is capped at the total transaction amount and if no amount is set, + # the full amount is transferred. + # + # If you intend to collect a fee and you need a more robust reporting experience, using + # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) + # might be a better fit for your integration. + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. + attr_accessor :automatic_payment_methods + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + attr_accessor :confirm + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + attr_accessor :confirmation_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :mandate + # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :off_session + # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :on_behalf_of + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + # + # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + attr_accessor :radar_options + # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + attr_accessor :return_url + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + attr_accessor :secret_key_confirmation + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a Transfer. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + attr_accessor :transfer_group + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + automatic_payment_methods: nil, + capture_method: nil, + confirm: nil, + confirmation_method: nil, + confirmation_token: nil, + currency: nil, + customer: nil, + description: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + secret_key_confirmation: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil, + use_stripe_sdk: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @automatic_payment_methods = automatic_payment_methods + @capture_method = capture_method + @confirm = confirm + @confirmation_method = confirmation_method + @confirmation_token = confirmation_token + @currency = currency + @customer = customer + @description = description + @error_on_requires_action = error_on_requires_action + @expand = expand + @mandate = mandate + @mandate_data = mandate_data + @metadata = metadata + @off_session = off_session + @on_behalf_of = on_behalf_of + @payment_details = payment_details + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @radar_options = radar_options + @receipt_email = receipt_email + @return_url = return_url + @secret_key_confirmation = secret_key_confirmation + @setup_future_usage = setup_future_usage + @shipping = shipping + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + @use_stripe_sdk = use_stripe_sdk + end + end + + class RetrieveParams < Stripe::RequestParams + # The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(client_secret: nil, expand: nil) + super + @client_secret = client_secret + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. + attr_accessor :type + + def initialize(online: nil, type: nil) + super + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(code: nil, setup_future_usage: nil) + super + @code = code + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Please pass in an address that is within your Stripe user account country + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + attr_accessor :phone + + def initialize(address: nil, phone: nil) + super + @address = address + @phone = phone + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @exemption_indicator = exemption_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + attr_accessor :three_d_secure + + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ) + super + @capture_method = capture_method + @cvc_token = cvc_token + @installments = installments + @mandate_options = mandate_options + @moto = moto + @network = network + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_partial_authorization = request_partial_authorization + @request_three_d_secure = request_three_d_secure + @require_cvc_recollection = require_cvc_recollection + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + @statement_details = statement_details + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + attr_accessor :requested_priority + + def initialize(requested_priority: nil) + super + @requested_priority = requested_priority + end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + attr_accessor :routing + + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ) + super + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization_support = request_incremental_authorization_support + @routing = routing + end + end + + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after = expires_after + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ) + super + @confirmation_number = confirmation_number + @expires_after_days = expires_after_days + @expires_at = expires_at + @product_description = product_description + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after_seconds = expires_after_seconds + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Rechnung < Stripe::RequestParams + end + + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(reference: nil, setup_future_usage: nil) + super + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Preferred transaction settlement speed + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @preferred_settlement_speed = preferred_settlement_speed + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @card_present = card_present + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # This hash contains details about the Mandate to create. + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # Attribute for param field payment_method + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + attr_accessor :payment_method_data + # Payment-method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_group + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + currency: nil, + customer: nil, + description: nil, + expand: nil, + mandate_data: nil, + metadata: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @capture_method = capture_method + @currency = currency + @customer = customer + @description = description + @expand = expand + @mandate_data = mandate_data + @metadata = metadata + @payment_details = payment_details + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @receipt_email = receipt_email + @setup_future_usage = setup_future_usage + @shipping = shipping + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + @transfer_group = transfer_group + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class ApplyCustomerBalanceParams < Stripe::RequestParams + # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. + # + # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. + # + # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amount: nil, currency: nil, expand: nil) + super + @amount = amount + @currency = currency + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(cancellation_reason: nil, expand: nil) + super + @cancellation_reason = cancellation_reason + @expand = expand + end + end + + class CaptureParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. + attr_accessor :amount_to_capture + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + attr_accessor :final_capture + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a transfer after the payment + # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + + def initialize( + amount_to_capture: nil, + application_fee_amount: nil, + async_workflows: nil, + expand: nil, + final_capture: nil, + metadata: nil, + payment_details: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ) + super + @amount_to_capture = amount_to_capture + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @expand = expand + @final_capture = final_capture + @metadata = metadata + @payment_details = payment_details + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_data = transfer_data + end + end + + class ConfirmParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the car rental. + attr_accessor :booking_number + # Class code of the car. + attr_accessor :car_class_code + # Make of the car. + attr_accessor :car_make + # Model of the car. + attr_accessor :car_model + # The name of the rental car company. + attr_accessor :company + # The customer service phone number of the car rental company. + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + attr_accessor :days_rented + # Delivery details for this purchase. + attr_accessor :delivery + # The details of the passengers in the travel reservation + attr_accessor :drivers + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + attr_accessor :no_show + # Car pick-up address. + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + attr_accessor :pickup_at + # Rental rate. + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + attr_accessor :rate_interval + # The name of the person or entity renting the car. + attr_accessor :renter_name + # Car return address. + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + attr_accessor :tax_exempt + + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ) + super + @affiliate = affiliate + @booking_number = booking_number + @car_class_code = car_class_code + @car_make = car_make + @car_model = car_model + @company = company + @customer_service_phone_number = customer_service_phone_number + @days_rented = days_rented + @delivery = delivery + @drivers = drivers + @extra_charges = extra_charges + @no_show = no_show + @pickup_address = pickup_address + @pickup_at = pickup_at + @rate_amount = rate_amount + @rate_interval = rate_interval + @renter_name = renter_name + @return_address = return_address + @return_at = return_at + @tax_exempt = tax_exempt + end + end + + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + # Indicates if the tickets are digitally checked when entering the venue. + attr_accessor :access_controlled_venue + # The event location's address. + attr_accessor :address + # Affiliate details for this purchase. + attr_accessor :affiliate + # The name of the company + attr_accessor :company + # Delivery details for this purchase. + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + attr_accessor :genre + # The name of the event. + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ) + super + @access_controlled_venue = access_controlled_venue + @address = address + @affiliate = affiliate + @company = company + @delivery = delivery + @ends_at = ends_at + @genre = genre + @name = name + @starts_at = starts_at + end + end + + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Segment < Stripe::RequestParams + # The flight segment amount. + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + attr_accessor :departure_airport + # The flight number associated with the segment + attr_accessor :flight_number + # The fare class for the segment. + attr_accessor :service_class + + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ) + super + @amount = amount + @arrival_airport = arrival_airport + @arrives_at = arrives_at + @carrier = carrier + @departs_at = departs_at + @departure_airport = departure_airport + @flight_number = flight_number + @service_class = service_class + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + attr_accessor :carrier + # Delivery details for this purchase. + attr_accessor :delivery + # The name of the person or entity on the reservation. + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + attr_accessor :passengers + # The individual flight segments associated with the trip. + attr_accessor :segments + # The ticket number associated with the travel reservation. + attr_accessor :ticket_number + + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ) + super + @affiliate = affiliate + @agency_number = agency_number + @carrier = carrier + @delivery = delivery + @passenger_name = passenger_name + @passengers = passengers + @segments = segments + @ticket_number = ticket_number + end + end + + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + attr_accessor :email + # The name of the recipient the ticket is delivered to. + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + attr_accessor :phone + + def initialize(email: nil, name: nil, phone: nil) + super + @email = email + @name = name + @phone = phone + end + end + # The delivery method for the payment + attr_accessor :mode + # Details of the recipient. + attr_accessor :recipient + + def initialize(mode: nil, recipient: nil) + super + @mode = mode + @recipient = recipient + end + end + + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + # The lodging location's address. + attr_accessor :address + # The number of adults on the booking + attr_accessor :adults + # Affiliate details for this purchase. + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + attr_accessor :booking_number + # The lodging category + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + attr_accessor :delivery + # List of additional charges being billed. + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + attr_accessor :no_show + # The number of rooms on the booking + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + attr_accessor :passengers + # The phone number of the lodging location. + attr_accessor :property_phone_number + # The room class for this purchase. + attr_accessor :room_class + # The number of room nights + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + attr_accessor :total_room_tax_amount + # The total tax amount + attr_accessor :total_tax_amount + + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ) + super + @address = address + @adults = adults + @affiliate = affiliate + @booking_number = booking_number + @category = category + @checkin_at = checkin_at + @checkout_at = checkout_at + @customer_service_phone_number = customer_service_phone_number + @daily_room_rate_amount = daily_room_rate_amount + @delivery = delivery + @extra_charges = extra_charges + @fire_safety_act_compliance = fire_safety_act_compliance + @name = name + @no_show = no_show + @number_of_rooms = number_of_rooms + @passengers = passengers + @property_phone_number = property_phone_number + @room_class = room_class + @room_nights = room_nights + @total_room_tax_amount = total_room_tax_amount + @total_tax_amount = total_tax_amount + end + end + + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + + def initialize(count: nil, interval: nil) + super + @count = count + @interval = interval + end + end + # Affiliate details for this purchase. + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + attr_accessor :starts_at + + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ) + super + @affiliate = affiliate + @auto_renewal = auto_renewal + @billing_interval = billing_interval + @ends_at = ends_at + @name = name + @starts_at = starts_at + end + end + # Car rental details for this PaymentIntent. + attr_accessor :car_rental + # Event details for this PaymentIntent + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + attr_accessor :lodging + # Subscription details for this PaymentIntent + attr_accessor :subscription + + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ) + super + @car_rental = car_rental + @event_details = event_details + @flight = flight + @lodging = lodging + @subscription = subscription + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize(mandate_options: nil, setup_future_usage: nil, verification_method: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(code: nil, setup_future_usage: nil) + super + @code = code + @setup_future_usage = setup_future_usage + end + end + + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + attr_accessor :type + + def initialize(count: nil, interval: nil, type: nil) + super + @count = count + @interval = interval + @type = type + end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + attr_accessor :plan + + def initialize(enabled: nil, plan: nil) + super + @enabled = enabled + @plan = plan + end + end + + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Please pass in an address that is within your Stripe user account country + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + attr_accessor :phone + + def initialize(address: nil, phone: nil) + super + @address = address + @phone = phone + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @exemption_indicator = exemption_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + attr_accessor :three_d_secure + + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ) + super + @capture_method = capture_method + @cvc_token = cvc_token + @installments = installments + @mandate_options = mandate_options + @moto = moto + @network = network + @request_decremental_authorization = request_decremental_authorization + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization = request_incremental_authorization + @request_multicapture = request_multicapture + @request_overcapture = request_overcapture + @request_partial_authorization = request_partial_authorization + @request_three_d_secure = request_three_d_secure + @require_cvc_recollection = require_cvc_recollection + @setup_future_usage = setup_future_usage + @statement_descriptor_suffix_kana = statement_descriptor_suffix_kana + @statement_descriptor_suffix_kanji = statement_descriptor_suffix_kanji + @statement_details = statement_details + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + attr_accessor :requested_priority + + def initialize(requested_priority: nil) + super + @requested_priority = requested_priority + end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + attr_accessor :routing + + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ) + super + @request_extended_authorization = request_extended_authorization + @request_incremental_authorization_support = request_incremental_authorization_support + @routing = routing + end + end + + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for the eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @requested_address_types = requested_address_types + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + @setup_future_usage = setup_future_usage + end + end + + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after = expires_after + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @preferred_locale = preferred_locale + @setup_future_usage = setup_future_usage + end + end + + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ) + super + @confirmation_number = confirmation_number + @expires_after_days = expires_after_days + @expires_at = expires_at + @product_description = product_description + @setup_future_usage = setup_future_usage + end + end + + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @persistent_token = persistent_token + @setup_future_usage = setup_future_usage + end + end + + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_days: nil, setup_future_usage: nil) + super + @expires_after_days = expires_after_days + @setup_future_usage = setup_future_usage + end + end + + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + attr_accessor :tos_shown_and_accepted + + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil) + super + @setup_future_usage = setup_future_usage + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :amount + # The tax behavior for the line item. + attr_accessor :behavior + + def initialize(amount: nil, behavior: nil) + super + @amount = amount + @behavior = behavior + end + end + # Type of the line item. + attr_accessor :category + # Description of the line item. + attr_accessor :description + # Descriptive name of the line item. + attr_accessor :name + # Quantity of the line item. Must be a positive number. + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + attr_accessor :sold_by + # The tax information for the line item. + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + attr_accessor :unit_amount + + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ) + super + @category = category + @description = description + @name = name + @quantity = quantity + @sku = sku + @sold_by = sold_by + @tax = tax + @unit_amount = unit_amount + end + end + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # The line items purchased by the customer. + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ) + super + @capture_method = capture_method + @line_items = line_items + @preferred_locale = preferred_locale + @reference = reference + @reference_id = reference_id + @risk_correlation_id = risk_correlation_id + @setup_future_usage = setup_future_usage + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil) + super + @expires_after_seconds = expires_after_seconds + @expires_at = expires_at + @setup_future_usage = setup_future_usage + end + end + + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Rechnung < Stripe::RequestParams + end + + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + attr_accessor :setup_future_usage + + def initialize(capture_method: nil, setup_future_usage: nil) + super + @capture_method = capture_method + @setup_future_usage = setup_future_usage + end + end + + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + attr_accessor :capture_method + + def initialize(capture_method: nil) + super + @capture_method = capture_method + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(mandate_options: nil, setup_future_usage: nil) + super + @mandate_options = mandate_options + @setup_future_usage = setup_future_usage + end + end + + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(preferred_language: nil, setup_future_usage: nil) + super + @preferred_language = preferred_language + @setup_future_usage = setup_future_usage + end + end + + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(reference: nil, setup_future_usage: nil) + super + @reference = reference + @setup_future_usage = setup_future_usage + end + end + + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Preferred transaction settlement speed + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @preferred_settlement_speed = preferred_settlement_speed + @setup_future_usage = setup_future_usage + @verification_method = verification_method + end + end + + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + attr_accessor :app_id + # The client type that the end customer will pay from + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(app_id: nil, client: nil, setup_future_usage: nil) + super + @app_id = app_id + @client = client + @setup_future_usage = setup_future_usage + end + end + + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + + def initialize(setup_future_usage: nil) + super + @setup_future_usage = setup_future_usage + end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @card_present = card_present + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of the mandate that's used for this payment. + attr_accessor :mandate + # Attribute for param field mandate_data + attr_accessor :mandate_data + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + attr_accessor :off_session + # Provides industry-specific information about the charge. + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + attr_accessor :radar_options + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + attr_accessor :return_url + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + attr_accessor :shipping + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + confirmation_token: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + off_session: nil, + payment_details: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil, + use_stripe_sdk: nil + ) + super + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @capture_method = capture_method + @confirmation_token = confirmation_token + @error_on_requires_action = error_on_requires_action + @expand = expand + @mandate = mandate + @mandate_data = mandate_data + @off_session = off_session + @payment_details = payment_details + @payment_method = payment_method + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @radar_options = radar_options + @receipt_email = receipt_email + @return_url = return_url + @setup_future_usage = setup_future_usage + @shipping = shipping + @use_stripe_sdk = use_stripe_sdk + end + end + + class DecrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + transfer_data: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @description = description + @expand = expand + @metadata = metadata + @transfer_data = transfer_data + end + end + + class IncrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + attr_accessor :calculation + + def initialize(calculation: nil) + super + @calculation = calculation + end + end + # Tax arguments for automations + attr_accessor :tax + + def initialize(tax: nil) + super + @tax = tax + end + end + # Arguments passed in automations + attr_accessor :inputs + + def initialize(inputs: nil) + super + @inputs = inputs + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Request partial authorization on this PaymentIntent. + attr_accessor :request_partial_authorization + + def initialize(request_partial_authorization: nil) + super + @request_partial_authorization = request_partial_authorization + end + end + # Configuration for any card payments attempted on this PaymentIntent. + attr_accessor :card + + def initialize(card: nil) + super + @card = card + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + + def initialize(amount: nil) + super + @amount = amount + end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Payment method-specific configuration for this PaymentIntent. + attr_accessor :payment_method_options + # Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + attr_accessor :statement_descriptor + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + attr_accessor :transfer_data + + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + payment_method_options: nil, + statement_descriptor: nil, + transfer_data: nil + ) + super + @amount = amount + @application_fee_amount = application_fee_amount + @async_workflows = async_workflows + @description = description + @expand = expand + @metadata = metadata + @payment_method_options = payment_method_options + @statement_descriptor = statement_descriptor + @transfer_data = transfer_data + end + end + + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amounts: nil, descriptor_code: nil, expand: nil) + super + @amounts = amounts + @descriptor_code = descriptor_code + @expand = expand + end + end + + class TriggerActionParams < Stripe::RequestParams + class ScanQrCode < Stripe::RequestParams + # Whether the QR Code scan's payment should succeed or fail. + attr_accessor :result + + def initialize(result: nil) + super + @result = result + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # True to simulate success, false to simulate failure. + attr_accessor :scan_qr_code + # The type of action to be simulated. + attr_accessor :type + + def initialize(expand: nil, scan_qr_code: nil, type: nil) + super + @expand = expand + @scan_qr_code = scan_qr_code + @type = type + end + end + # Manually reconcile the remaining amount for a customer_balance PaymentIntent. def apply_customer_balance(intent, params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_link_line_item_service.rb b/lib/stripe/services/payment_link_line_item_service.rb index f121b574d..703b7ee70 100644 --- a/lib/stripe/services/payment_link_line_item_service.rb +++ b/lib/stripe/services/payment_link_line_item_service.rb @@ -3,6 +3,25 @@ module Stripe class PaymentLinkLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(payment_link, params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_link_service.rb b/lib/stripe/services/payment_link_service.rb index d01e63604..aa4b54f06 100644 --- a/lib/stripe/services/payment_link_service.rb +++ b/lib/stripe/services/payment_link_service.rb @@ -10,6 +10,1289 @@ def initialize(requestor) @line_items = Stripe::PaymentLinkLineItemService.new(@requestor) end + class ListParams < Stripe::RequestParams + # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(active: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @active = active + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + attr_accessor :custom_message + + def initialize(custom_message: nil) + super + @custom_message = custom_message + end + end + + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + attr_accessor :url + + def initialize(url: nil) + super + @url = url + end + end + # Configuration when `type=hosted_confirmation`. + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + attr_accessor :type + + def initialize(hosted_confirmation: nil, redirect: nil, type: nil) + super + @hosted_confirmation = hosted_confirmation + @redirect = redirect + @type = type + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + attr_accessor :position + + def initialize(position: nil) + super + @position = position + end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + attr_accessor :terms_of_service + + def initialize(payment_method_reuse_agreement: nil, promotions: nil, terms_of_service: nil) + super + @payment_method_reuse_agreement = payment_method_reuse_agreement + @promotions = promotions + @terms_of_service = terms_of_service + end + end + + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_accessor :value + + def initialize(label: nil, value: nil) + super + @label = label + @value = value + end + end + # The options available for the customer to select. Up to 200 options allowed. + attr_accessor :options + + def initialize(options: nil) + super + @options = options + end + end + + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_accessor :custom + # The type of the label. + attr_accessor :type + + def initialize(custom: nil, type: nil) + super + @custom = custom + @type = type + end + end + + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + # Configuration for `type=dropdown` fields. + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_accessor :key + # The label for the field, displayed to the customer. + attr_accessor :label + # Configuration for `type=numeric` fields. + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_accessor :optional + # Configuration for `type=text` fields. + attr_accessor :text + # The type of the field. + attr_accessor :type + + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ) + super + @dropdown = dropdown + @key = key + @label = label + @numeric = numeric + @optional = optional + @text = text + @type = type + end + end + + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + # Custom text that should be displayed after the payment confirmation button. + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_accessor :terms_of_service_acceptance + + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ) + super + @after_submit = after_submit + @shipping_address = shipping_address + @submit = submit + @terms_of_service_acceptance = terms_of_service_acceptance + end + end + + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + + def initialize(amount_tax_display: nil) + super + @amount_tax_display = amount_tax_display + end + end + # The account tax IDs associated with the invoice. + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ) + super + @account_tax_ids = account_tax_ids + @custom_fields = custom_fields + @description = description + @footer = footer + @issuer = issuer + @metadata = metadata + @rendering_options = rendering_options + end + end + # Whether the feature is enabled + attr_accessor :enabled + # Invoice PDF configuration. + attr_accessor :invoice_data + + def initialize(enabled: nil, invoice_data: nil) + super + @enabled = enabled + @invoice_data = invoice_data + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + attr_accessor :adjustable_quantity + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + attr_accessor :price + # The quantity of the line item being purchased. + attr_accessor :quantity + + def initialize(adjustable_quantity: nil, price: nil, quantity: nil) + super + @adjustable_quantity = adjustable_quantity + @price = price + @quantity = quantity + end + end + + class PaymentIntentData < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + # + # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + attr_accessor :setup_future_usage + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + capture_method: nil, + description: nil, + metadata: nil, + setup_future_usage: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ) + super + @capture_method = capture_method + @description = description + @metadata = metadata + @setup_future_usage = setup_future_usage + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_group = transfer_group + end + end + + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + attr_accessor :limit + + def initialize(limit: nil) + super + @limit = limit + end + end + # Configuration for the `completed_sessions` restriction type. + attr_accessor :completed_sessions + + def initialize(completed_sessions: nil) + super + @completed_sessions = completed_sessions + end + end + + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + attr_accessor :allowed_countries + + def initialize(allowed_countries: nil) + super + @allowed_countries = allowed_countries + end + end + + class ShippingOption < Stripe::RequestParams + # The ID of the Shipping Rate to use for this shipping option. + attr_accessor :shipping_rate + + def initialize(shipping_rate: nil) + super + @shipping_rate = shipping_rate + end + end + + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(issuer: nil) + super + @issuer = issuer + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + description: nil, + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @description = description + @invoice_settings = invoice_settings + @metadata = metadata + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + attr_accessor :required + + def initialize(enabled: nil, required: nil) + super + @enabled = enabled + @required = required + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + attr_accessor :destination + + def initialize(amount: nil, destination: nil) + super + @amount = amount + @destination = destination + end + end + # Behavior after the purchase is complete. + attr_accessor :after_completion + # Enables user redeemable promotion codes. + attr_accessor :allow_promotion_codes + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :application_fee_percent + # Configuration for automatic tax collection. + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + attr_accessor :billing_address_collection + # Configure fields to gather active consent from customers. + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + attr_accessor :metadata + # The account on behalf of which to charge. + attr_accessor :on_behalf_of + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). + attr_accessor :payment_method_types + # Controls phone number collection settings during checkout. + # + # We recommend that you review your privacy policy and check with your legal contacts. + attr_accessor :phone_number_collection + # Settings that restrict the usage of a payment link. + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + attr_accessor :shipping_address_collection + # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + attr_accessor :shipping_options + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + attr_accessor :tax_id_collection + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + attr_accessor :transfer_data + + def initialize( + after_completion: nil, + allow_promotion_codes: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_address_collection: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + on_behalf_of: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + phone_number_collection: nil, + restrictions: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil, + transfer_data: nil + ) + super + @after_completion = after_completion + @allow_promotion_codes = allow_promotion_codes + @application_fee_amount = application_fee_amount + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_address_collection = billing_address_collection + @consent_collection = consent_collection + @currency = currency + @custom_fields = custom_fields + @custom_text = custom_text + @customer_creation = customer_creation + @expand = expand + @inactive_message = inactive_message + @invoice_creation = invoice_creation + @line_items = line_items + @metadata = metadata + @on_behalf_of = on_behalf_of + @payment_intent_data = payment_intent_data + @payment_method_collection = payment_method_collection + @payment_method_types = payment_method_types + @phone_number_collection = phone_number_collection + @restrictions = restrictions + @shipping_address_collection = shipping_address_collection + @shipping_options = shipping_options + @submit_type = submit_type + @subscription_data = subscription_data + @tax_id_collection = tax_id_collection + @transfer_data = transfer_data + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + attr_accessor :custom_message + + def initialize(custom_message: nil) + super + @custom_message = custom_message + end + end + + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + attr_accessor :url + + def initialize(url: nil) + super + @url = url + end + end + # Configuration when `type=hosted_confirmation`. + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + attr_accessor :type + + def initialize(hosted_confirmation: nil, redirect: nil, type: nil) + super + @hosted_confirmation = hosted_confirmation + @redirect = redirect + @type = type + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + attr_accessor :value + + def initialize(label: nil, value: nil) + super + @label = label + @value = value + end + end + # The options available for the customer to select. Up to 200 options allowed. + attr_accessor :options + + def initialize(options: nil) + super + @options = options + end + end + + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + attr_accessor :custom + # The type of the label. + attr_accessor :type + + def initialize(custom: nil, type: nil) + super + @custom = custom + @type = type + end + end + + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + attr_accessor :minimum_length + + def initialize(maximum_length: nil, minimum_length: nil) + super + @maximum_length = maximum_length + @minimum_length = minimum_length + end + end + # Configuration for `type=dropdown` fields. + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + attr_accessor :key + # The label for the field, displayed to the customer. + attr_accessor :label + # Configuration for `type=numeric` fields. + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + attr_accessor :optional + # Configuration for `type=text` fields. + attr_accessor :text + # The type of the field. + attr_accessor :type + + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ) + super + @dropdown = dropdown + @key = key + @label = label + @numeric = numeric + @optional = optional + @text = text + @type = type + end + end + + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + attr_accessor :message + + def initialize(message: nil) + super + @message = message + end + end + # Custom text that should be displayed after the payment confirmation button. + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + attr_accessor :terms_of_service_acceptance + + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ) + super + @after_submit = after_submit + @shipping_address = shipping_address + @submit = submit + @terms_of_service_acceptance = terms_of_service_acceptance + end + end + + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + attr_accessor :value + + def initialize(name: nil, value: nil) + super + @name = name + @value = value + end + end + + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + attr_accessor :amount_tax_display + + def initialize(amount_tax_display: nil) + super + @amount_tax_display = amount_tax_display + end + end + # The account tax IDs associated with the invoice. + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + attr_accessor :rendering_options + + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ) + super + @account_tax_ids = account_tax_ids + @custom_fields = custom_fields + @description = description + @footer = footer + @issuer = issuer + @metadata = metadata + @rendering_options = rendering_options + end + end + # Whether the feature is enabled + attr_accessor :enabled + # Invoice PDF configuration. + attr_accessor :invoice_data + + def initialize(enabled: nil, invoice_data: nil) + super + @enabled = enabled + @invoice_data = invoice_data + end + end + + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + attr_accessor :minimum + + def initialize(enabled: nil, maximum: nil, minimum: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + attr_accessor :adjustable_quantity + # The ID of an existing line item on the payment link. + attr_accessor :id + # The quantity of the line item being purchased. + attr_accessor :quantity + + def initialize(adjustable_quantity: nil, id: nil, quantity: nil) + super + @adjustable_quantity = adjustable_quantity + @id = id + @quantity = quantity + end + end + + class PaymentIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + attr_accessor :transfer_group + + def initialize( + description: nil, + metadata: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ) + super + @description = description + @metadata = metadata + @statement_descriptor = statement_descriptor + @statement_descriptor_suffix = statement_descriptor_suffix + @transfer_group = transfer_group + end + end + + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + attr_accessor :limit + + def initialize(limit: nil) + super + @limit = limit + end + end + # Configuration for the `completed_sessions` restriction type. + attr_accessor :completed_sessions + + def initialize(completed_sessions: nil) + super + @completed_sessions = completed_sessions + end + end + + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + attr_accessor :allowed_countries + + def initialize(allowed_countries: nil) + super + @allowed_countries = allowed_countries + end + end + + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(issuer: nil) + super + @issuer = issuer + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @invoice_settings = invoice_settings + @metadata = metadata + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + attr_accessor :required + + def initialize(enabled: nil, required: nil) + super + @enabled = enabled + @required = required + end + end + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + attr_accessor :active + # Behavior after the purchase is complete. + attr_accessor :after_completion + # Enables user redeemable promotion codes. + attr_accessor :allow_promotion_codes + # Configuration for automatic tax collection. + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + attr_accessor :billing_address_collection + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + attr_accessor :metadata + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # Settings that restrict the usage of a payment link. + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + attr_accessor :shipping_address_collection + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + attr_accessor :tax_id_collection + + def initialize( + active: nil, + after_completion: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + restrictions: nil, + shipping_address_collection: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil + ) + super + @active = active + @after_completion = after_completion + @allow_promotion_codes = allow_promotion_codes + @automatic_tax = automatic_tax + @billing_address_collection = billing_address_collection + @custom_fields = custom_fields + @custom_text = custom_text + @customer_creation = customer_creation + @expand = expand + @inactive_message = inactive_message + @invoice_creation = invoice_creation + @line_items = line_items + @metadata = metadata + @payment_intent_data = payment_intent_data + @payment_method_collection = payment_method_collection + @payment_method_types = payment_method_types + @restrictions = restrictions + @shipping_address_collection = shipping_address_collection + @submit_type = submit_type + @subscription_data = subscription_data + @tax_id_collection = tax_id_collection + end + end + # Creates a payment link. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_method_configuration_service.rb b/lib/stripe/services/payment_method_configuration_service.rb index ca67c4dd4..cca7aa1a7 100644 --- a/lib/stripe/services/payment_method_configuration_service.rb +++ b/lib/stripe/services/payment_method_configuration_service.rb @@ -3,6 +3,2244 @@ module Stripe class PaymentMethodConfigurationService < StripeService + class ListParams < Stripe::RequestParams + # The Connect application to filter by. + attr_accessor :application + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + application: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @application = application + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + attr_accessor :acss_debit + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + attr_accessor :eps + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + attr_accessor :multibanco + # Configuration name. + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + attr_accessor :p24 + # Configuration's parent configuration. Specify to create a child configuration. + attr_accessor :parent + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + parent: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @apple_pay = apple_pay + @apple_pay_later = apple_pay_later + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @cartes_bancaires = cartes_bancaires + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @expand = expand + @fpx = fpx + @giropay = giropay + @google_pay = google_pay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @jcb = jcb + @klarna = klarna + @konbini = konbini + @link = link + @mobilepay = mobilepay + @multibanco = multibanco + @name = name + @oxxo = oxxo + @p24 = p24 + @parent = parent + @paynow = paynow + @paypal = paypal + @payto = payto + @promptpay = promptpay + @qris = qris + @revolut_pay = revolut_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + attr_accessor :preference + + def initialize(preference: nil) + super + @preference = preference + end + end + # Whether or not the payment method should be displayed. + attr_accessor :display_preference + + def initialize(display_preference: nil) + super + @display_preference = display_preference + end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + attr_accessor :acss_debit + # Whether the configuration can be used for new payments. + attr_accessor :active + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + attr_accessor :eps + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + attr_accessor :multibanco + # Configuration name. + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + attr_accessor :p24 + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + attr_accessor :zip + + def initialize( + acss_debit: nil, + active: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @active = active + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @alma = alma + @amazon_pay = amazon_pay + @apple_pay = apple_pay + @apple_pay_later = apple_pay_later + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @blik = blik + @boleto = boleto + @card = card + @cartes_bancaires = cartes_bancaires + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @expand = expand + @fpx = fpx + @giropay = giropay + @google_pay = google_pay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @jcb = jcb + @klarna = klarna + @konbini = konbini + @link = link + @mobilepay = mobilepay + @multibanco = multibanco + @name = name + @oxxo = oxxo + @p24 = p24 + @paynow = paynow + @paypal = paypal + @payto = payto + @promptpay = promptpay + @qris = qris + @revolut_pay = revolut_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + # Creates a payment method configuration def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_method_domain_service.rb b/lib/stripe/services/payment_method_domain_service.rb index 7942238eb..2bcee077f 100644 --- a/lib/stripe/services/payment_method_domain_service.rb +++ b/lib/stripe/services/payment_method_domain_service.rb @@ -3,6 +3,87 @@ module Stripe class PaymentMethodDomainService < StripeService + class ListParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + attr_accessor :enabled + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + domain_name: nil, + enabled: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @domain_name = domain_name + @enabled = enabled + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(domain_name: nil, enabled: nil, expand: nil) + super + @domain_name = domain_name + @enabled = enabled + @expand = expand + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(enabled: nil, expand: nil) + super + @enabled = enabled + @expand = expand + end + end + + class ValidateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a payment method domain. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/payment_method_service.rb b/lib/stripe/services/payment_method_service.rb index 22980664a..24c8c1bcb 100644 --- a/lib/stripe/services/payment_method_service.rb +++ b/lib/stripe/services/payment_method_service.rb @@ -3,6 +3,906 @@ module Stripe class PaymentMethodService < StripeService + class ListParams < Stripe::RequestParams + # The ID of the customer whose PaymentMethods will be retrieved. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + attr_accessor :type + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + attr_accessor :preferred + + def initialize(preferred: nil) + super + @preferred = preferred + end + end + # The card's CVC. It is highly recommended to always include this value. + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + attr_accessor :networks + # The card number, as a string without any separators. + attr_accessor :number + # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + attr_accessor :token + + def initialize( + cvc: nil, + exp_month: nil, + exp_year: nil, + networks: nil, + number: nil, + token: nil + ) + super + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @networks = networks + @number = number + @token = token + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. + attr_accessor :card + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # The `Customer` to whom the original PaymentMethod is attached. + attr_accessor :customer + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # The PaymentMethod to share. + attr_accessor :payment_method + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + payment_method: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @card = card + @cashapp = cashapp + @customer = customer + @customer_balance = customer_balance + @eps = eps + @expand = expand + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @payment_method = payment_method + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + attr_accessor :preferred + + def initialize(preferred: nil) + super + @preferred = preferred + end + end + # Two-digit number representing the card's expiration month. + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + attr_accessor :networks + + def initialize(exp_month: nil, exp_year: nil, networks: nil) + super + @exp_month = exp_month + @exp_year = exp_year + @networks = networks + end + end + + class Link < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class UsBankAccount < Stripe::RequestParams + # Bank account holder type. + attr_accessor :account_holder_type + # Bank account type. + attr_accessor :account_type + + def initialize(account_holder_type: nil, account_type: nil) + super + @account_holder_type = account_holder_type + @account_type = account_type + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `card` PaymentMethod, this hash contains the user's card details. + attr_accessor :card + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + + def initialize( + allow_redisplay: nil, + billing_details: nil, + card: nil, + expand: nil, + link: nil, + metadata: nil, + naver_pay: nil, + payto: nil, + us_bank_account: nil + ) + super + @allow_redisplay = allow_redisplay + @billing_details = billing_details + @card = card + @expand = expand + @link = link + @metadata = metadata + @naver_pay = naver_pay + @payto = payto + @us_bank_account = us_bank_account + end + end + + class AttachParams < Stripe::RequestParams + # The ID of the customer to which to attach the PaymentMethod. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(customer: nil, expand: nil) + super + @customer = customer + @expand = expand + end + end + + class DetachParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Attaches a PaymentMethod object to a Customer. # # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents) diff --git a/lib/stripe/services/payment_record_service.rb b/lib/stripe/services/payment_record_service.rb index dd96f658c..c6b72396c 100644 --- a/lib/stripe/services/payment_record_service.rb +++ b/lib/stripe/services/payment_record_service.rb @@ -3,6 +3,494 @@ module Stripe class PaymentRecordService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReportPaymentAttemptParams < Stripe::RequestParams + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + attr_accessor :failed_at + + def initialize(failed_at: nil) + super + @failed_at = failed_at + end + end + + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + attr_accessor :guaranteed_at + + def initialize(guaranteed_at: nil) + super + @guaranteed_at = guaranteed_at + end + end + + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address associated with the method of payment. + attr_accessor :address + # The billing email associated with the method of payment. + attr_accessor :email + # The billing name associated with the method of payment. + attr_accessor :name + # The billing phone number associated with the method of payment. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_accessor :display_name + # The custom payment method type associated with this payment. + attr_accessor :type + + def initialize(display_name: nil, type: nil) + super + @display_name = display_name + @type = type + end + end + # The billing details associated with the method of payment. + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + attr_accessor :type + + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil) + super + @billing_details = billing_details + @custom = custom + @payment_method = payment_method + @type = type + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The physical shipping address. + attr_accessor :address + # The shipping recipient's name. + attr_accessor :name + # The shipping recipient's phone number. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the payment attempt failure. + attr_accessor :failed + # Information about the payment attempt guarantee. + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The outcome of the reported payment. + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + attr_accessor :payment_method_details + # Shipping information for this payment. + attr_accessor :shipping_details + + def initialize( + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + shipping_details: nil + ) + super + @description = description + @expand = expand + @failed = failed + @guaranteed = guaranteed + @initiated_at = initiated_at + @metadata = metadata + @outcome = outcome + @payment_method_details = payment_method_details + @shipping_details = shipping_details + end + end + + class ReportPaymentAttemptCanceledParams < Stripe::RequestParams + # When the reported payment was canceled. Measured in seconds since the Unix epoch. + attr_accessor :canceled_at + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field metadata + attr_accessor :metadata + + def initialize(canceled_at: nil, expand: nil, metadata: nil) + super + @canceled_at = canceled_at + @expand = expand + @metadata = metadata + end + end + + class ReportPaymentAttemptFailedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # When the reported payment failed. Measured in seconds since the Unix epoch. + attr_accessor :failed_at + # Attribute for param field metadata + attr_accessor :metadata + + def initialize(expand: nil, failed_at: nil, metadata: nil) + super + @expand = expand + @failed_at = failed_at + @metadata = metadata + end + end + + class ReportPaymentAttemptGuaranteedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + attr_accessor :guaranteed_at + # Attribute for param field metadata + attr_accessor :metadata + + def initialize(expand: nil, guaranteed_at: nil, metadata: nil) + super + @expand = expand + @guaranteed_at = guaranteed_at + @metadata = metadata + end + end + + class ReportPaymentParams < Stripe::RequestParams + class AmountRequested < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + attr_accessor :value + + def initialize(currency: nil, value: nil) + super + @currency = currency + @value = value + end + end + + class CustomerDetails < Stripe::RequestParams + # The customer who made the payment. + attr_accessor :customer + # The customer's phone number. + attr_accessor :email + # The customer's name. + attr_accessor :name + # The customer's phone number. + attr_accessor :phone + + def initialize(customer: nil, email: nil, name: nil, phone: nil) + super + @customer = customer + @email = email + @name = name + @phone = phone + end + end + + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + attr_accessor :failed_at + + def initialize(failed_at: nil) + super + @failed_at = failed_at + end + end + + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + attr_accessor :guaranteed_at + + def initialize(guaranteed_at: nil) + super + @guaranteed_at = guaranteed_at + end + end + + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The billing address associated with the method of payment. + attr_accessor :address + # The billing email associated with the method of payment. + attr_accessor :email + # The billing name associated with the method of payment. + attr_accessor :name + # The billing phone number associated with the method of payment. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + attr_accessor :display_name + # The custom payment method type associated with this payment. + attr_accessor :type + + def initialize(display_name: nil, type: nil) + super + @display_name = display_name + @type = type + end + end + # The billing details associated with the method of payment. + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + attr_accessor :type + + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil) + super + @billing_details = billing_details + @custom = custom + @payment_method = payment_method + @type = type + end + end + + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The physical shipping address. + attr_accessor :address + # The shipping recipient's name. + attr_accessor :name + # The shipping recipient's phone number. + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + # The amount you intend to collect for this payment. + attr_accessor :amount_requested + # Customer information for this payment. + attr_accessor :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. + attr_accessor :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about the payment attempt failure. + attr_accessor :failed + # Information about the payment attempt guarantee. + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The outcome of the reported payment. + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + attr_accessor :payment_method_details + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + attr_accessor :payment_reference + # Shipping information for this payment. + attr_accessor :shipping_details + + def initialize( + amount_requested: nil, + customer_details: nil, + customer_presence: nil, + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + payment_reference: nil, + shipping_details: nil + ) + super + @amount_requested = amount_requested + @customer_details = customer_details + @customer_presence = customer_presence + @description = description + @expand = expand + @failed = failed + @guaranteed = guaranteed + @initiated_at = initiated_at + @metadata = metadata + @outcome = outcome + @payment_method_details = payment_method_details + @payment_reference = payment_reference + @shipping_details = shipping_details + end + end + # Report a new Payment Record. You may report a Payment Record as it is # initialized and later report updates through the other report_* methods, or report Payment # Records in a terminal state directly, through this method. diff --git a/lib/stripe/services/payout_service.rb b/lib/stripe/services/payout_service.rb index 28219a533..e8e1ed0f3 100644 --- a/lib/stripe/services/payout_service.rb +++ b/lib/stripe/services/payout_service.rb @@ -3,6 +3,173 @@ module Stripe class PayoutService < StripeService + class ListParams < Stripe::RequestParams + class ArrivalDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return payouts that are expected to arrive during the given date interval. + attr_accessor :arrival_date + # Only return payouts that were created during the given date interval. + attr_accessor :created + # The ID of an external account - only return payouts sent to this external account. + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + attr_accessor :status + + def initialize( + arrival_date: nil, + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @arrival_date = arrival_date + @created = created + @destination = destination + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer in cents representing how much to payout. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. + attr_accessor :destination + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + attr_accessor :method + # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. + attr_accessor :source_type + # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + method: nil, + source_type: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @description = description + @destination = destination + @expand = expand + @metadata = metadata + @method = method + @source_type = source_type + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. def cancel(payout, params = {}, opts = {}) request( diff --git a/lib/stripe/services/plan_service.rb b/lib/stripe/services/plan_service.rb index 7170239c6..3dbf2cfd1 100644 --- a/lib/stripe/services/plan_service.rb +++ b/lib/stripe/services/plan_service.rb @@ -3,6 +3,267 @@ module Stripe class PlanService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Whether the plan is currently available for new subscriptions. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A brief description of the plan, hidden from customers. + attr_accessor :nickname + # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + attr_accessor :product + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_accessor :trial_period_days + + def initialize( + active: nil, + expand: nil, + metadata: nil, + nickname: nil, + product: nil, + trial_period_days: nil + ) + super + @active = active + @expand = expand + @metadata = metadata + @nickname = nickname + @product = product + @trial_period_days = trial_period_days + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return plans for the given product. + attr_accessor :product + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + product: nil, + starting_after: nil + ) + super + @active = active + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @product = product + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Product < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_accessor :unit_label + + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ) + super + @active = active + @id = id + @metadata = metadata + @name = name + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @unit_label = unit_label + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + + class TransformUsage < Stripe::RequestParams + # Divide usage by this number. + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + attr_accessor :round + + def initialize(divide_by: nil, round: nil) + super + @divide_by = divide_by + @round = round + end + end + # Whether the plan is currently available for new subscriptions. Defaults to `true`. + attr_accessor :active + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + attr_accessor :aggregate_usage + # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. + attr_accessor :amount + # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + attr_accessor :amount_decimal + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + attr_accessor :id + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The meter tracking the usage of a metered price + attr_accessor :meter + # A brief description of the plan, hidden from customers. + attr_accessor :nickname + # Attribute for param field product + attr_accessor :product + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + attr_accessor :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + attr_accessor :transform_usage + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_accessor :usage_type + + def initialize( + active: nil, + aggregate_usage: nil, + amount: nil, + amount_decimal: nil, + billing_scheme: nil, + currency: nil, + expand: nil, + id: nil, + interval: nil, + interval_count: nil, + metadata: nil, + meter: nil, + nickname: nil, + product: nil, + tiers: nil, + tiers_mode: nil, + transform_usage: nil, + trial_period_days: nil, + usage_type: nil + ) + super + @active = active + @aggregate_usage = aggregate_usage + @amount = amount + @amount_decimal = amount_decimal + @billing_scheme = billing_scheme + @currency = currency + @expand = expand + @id = id + @interval = interval + @interval_count = interval_count + @metadata = metadata + @meter = meter + @nickname = nickname + @product = product + @tiers = tiers + @tiers_mode = tiers_mode + @transform_usage = transform_usage + @trial_period_days = trial_period_days + @usage_type = usage_type + end + end + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. def create(params = {}, opts = {}) request(method: :post, path: "/v1/plans", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/price_service.rb b/lib/stripe/services/price_service.rb index c5ea620d1..a7e778a2b 100644 --- a/lib/stripe/services/price_service.rb +++ b/lib/stripe/services/price_service.rb @@ -3,6 +3,541 @@ module Stripe class PriceService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Recurring < Stripe::RequestParams + # Filter by billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # Filter by the price's meter. + attr_accessor :meter + # Filter by the usage type for this price. Can be either `metered` or `licensed`. + attr_accessor :usage_type + + def initialize(interval: nil, meter: nil, usage_type: nil) + super + @interval = interval + @meter = meter + @usage_type = usage_type + end + end + # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return prices for the given currency. + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. + attr_accessor :lookup_keys + # Only return prices for the given product. + attr_accessor :product + # Only return prices with these recurring fields. + attr_accessor :recurring + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return prices of type `recurring` or `one_time`. + attr_accessor :type + + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + product: nil, + recurring: nil, + starting_after: nil, + type: nil + ) + super + @active = active + @created = created + @currency = currency + @ending_before = ending_before + @expand = expand + @limit = limit + @lookup_keys = lookup_keys + @product = product + @recurring = recurring + @starting_after = starting_after + @type = type + end + end + + class CreateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @custom_unit_amount = custom_unit_amount + @tax_behavior = tax_behavior + @tiers = tiers + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class ProductData < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_accessor :unit_label + + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ) + super + @active = active + @id = id + @metadata = metadata + @name = name + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @unit_label = unit_label + end + end + + class Recurring < Stripe::RequestParams + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. + attr_accessor :aggregate_usage + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + # The meter tracking the usage of a metered price + attr_accessor :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + attr_accessor :usage_type + + def initialize( + aggregate_usage: nil, + interval: nil, + interval_count: nil, + meter: nil, + trial_period_days: nil, + usage_type: nil + ) + super + @aggregate_usage = aggregate_usage + @interval = interval + @interval_count = interval_count + @meter = meter + @trial_period_days = trial_period_days + @usage_type = usage_type + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + + class TransformQuantity < Stripe::RequestParams + # Divide usage by this number. + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + attr_accessor :round + + def initialize(divide_by: nil, round: nil) + super + @divide_by = divide_by + @round = round + end + end + # Whether the price can be used for new purchases. Defaults to `true`. + attr_accessor :active + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A brief description of the price, hidden from customers. + attr_accessor :nickname + # The ID of the product that this price will belong to. + attr_accessor :product + # These fields can be used to create a new product that this price will belong to. + attr_accessor :product_data + # The recurring components of a price such as `interval` and `usage_type`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + attr_accessor :tiers_mode + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + attr_accessor :transfer_lookup_key + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + attr_accessor :transform_quantity + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + active: nil, + billing_scheme: nil, + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + nickname: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + tiers: nil, + tiers_mode: nil, + transfer_lookup_key: nil, + transform_quantity: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @active = active + @billing_scheme = billing_scheme + @currency = currency + @currency_options = currency_options + @custom_unit_amount = custom_unit_amount + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @nickname = nickname + @product = product + @product_data = product_data + @recurring = recurring + @tax_behavior = tax_behavior + @tiers = tiers + @tiers_mode = tiers_mode + @transfer_lookup_key = transfer_lookup_key + @transform_quantity = transform_quantity + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @custom_unit_amount = custom_unit_amount + @tax_behavior = tax_behavior + @tiers = tiers + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class MigrateTo < Stripe::RequestParams + # The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. + attr_accessor :behavior + # The time after which subscriptions should start using the new price. + attr_accessor :effective_after + # The ID of the price object. + attr_accessor :price + + def initialize(behavior: nil, effective_after: nil, price: nil) + super + @behavior = behavior + @effective_after = effective_after + @price = price + end + end + # Whether the price can be used for new purchases. Defaults to `true`. + attr_accessor :active + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If specified, subscriptions using this price will be updated to use the new referenced price. + attr_accessor :migrate_to + # A brief description of the price, hidden from customers. + attr_accessor :nickname + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + attr_accessor :transfer_lookup_key + + def initialize( + active: nil, + currency_options: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + migrate_to: nil, + nickname: nil, + tax_behavior: nil, + transfer_lookup_key: nil + ) + super + @active = active + @currency_options = currency_options + @expand = expand + @lookup_key = lookup_key + @metadata = metadata + @migrate_to = migrate_to + @nickname = nickname + @tax_behavior = tax_behavior + @transfer_lookup_key = transfer_lookup_key + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + # Creates a new price for an existing product. The price can be recurring or one-time. def create(params = {}, opts = {}) request(method: :post, path: "/v1/prices", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/product_feature_service.rb b/lib/stripe/services/product_feature_service.rb index 1215a3ff6..6d860a76a 100644 --- a/lib/stripe/services/product_feature_service.rb +++ b/lib/stripe/services/product_feature_service.rb @@ -3,6 +3,51 @@ module Stripe class ProductFeatureService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product. + attr_accessor :entitlement_feature + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(entitlement_feature: nil, expand: nil) + super + @entitlement_feature = entitlement_feature + @expand = expand + end + end + # Creates a product_feature, which represents a feature attachment to a product def create(product, params = {}, opts = {}) request( diff --git a/lib/stripe/services/product_service.rb b/lib/stripe/services/product_service.rb index 04b7b96e7..712719644 100644 --- a/lib/stripe/services/product_service.rb +++ b/lib/stripe/services/product_service.rb @@ -10,6 +10,484 @@ def initialize(requestor) @features = Stripe::ProductFeatureService.new(@requestor) end + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + # Whether the product is available for purchase. + attr_accessor :active + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + attr_accessor :default_price + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + active: nil, + default_price: nil, + description: nil, + expand: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil, + url: nil + ) + super + @active = active + @default_price = default_price + @description = description + @expand = expand + @images = images + @marketing_features = marketing_features + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @shippable = shippable + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @unit_label = unit_label + @url = url + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + attr_accessor :active + # Only return products that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). + attr_accessor :ids + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return products that can be shipped (i.e., physical, not digital products). + attr_accessor :shippable + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return products of this type. + attr_accessor :type + # Only return products with the given url. + attr_accessor :url + + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + ids: nil, + limit: nil, + shippable: nil, + starting_after: nil, + type: nil, + url: nil + ) + super + @active = active + @created = created + @ending_before = ending_before + @expand = expand + @ids = ids + @limit = limit + @shippable = shippable + @starting_after = starting_after + @type = type + @url = url + end + end + + class CreateParams < Stripe::RequestParams + class DefaultPriceData < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + attr_accessor :up_to + + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ) + super + @flat_amount = flat_amount + @flat_amount_decimal = flat_amount_decimal + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + @up_to = up_to + end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @custom_unit_amount = custom_unit_amount + @tax_behavior = tax_behavior + @tiers = tiers + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + attr_accessor :preset + + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil) + super + @enabled = enabled + @maximum = maximum + @minimum = minimum + @preset = preset + end + end + + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + attr_accessor :custom_unit_amount + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @currency_options = currency_options + @custom_unit_amount = custom_unit_amount + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + attr_accessor :name + + def initialize(name: nil) + super + @name = name + end + end + + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + attr_accessor :width + + def initialize(height: nil, length: nil, weight: nil, width: nil) + super + @height = height + @length = length + @weight = weight + @width = width + end + end + + class Provisioning < Stripe::RequestParams + class GiftCard < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + # The initial amount with which the provisioned gift card will be created. + attr_accessor :amount + # Attribute for param field currency + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + # Attribute for param field fixed_amount + attr_accessor :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. + attr_accessor :type + + def initialize(fixed_amount: nil, type: nil) + super + @fixed_amount = fixed_amount + @type = type + end + end + # Attribute for param field gift_card + attr_accessor :gift_card + # The type of provisioning, only `gift_card` currently supported. + attr_accessor :type + + def initialize(gift_card: nil, type: nil) + super + @gift_card = gift_card + @type = type + end + end + # Whether the product is currently available for purchase. Defaults to `true`. + attr_accessor :active + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + attr_accessor :default_price_data + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + attr_accessor :name + # The dimensions of this product for shipping purposes. + attr_accessor :package_dimensions + # Provisioning configuration for this product. + attr_accessor :provisioning + # Whether this product is shipped (i.e., physical goods). + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. Only used for subscription payments. + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + attr_accessor :type + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + attr_accessor :url + + def initialize( + active: nil, + default_price_data: nil, + description: nil, + expand: nil, + id: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + provisioning: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + type: nil, + unit_label: nil, + url: nil + ) + super + @active = active + @default_price_data = default_price_data + @description = description + @expand = expand + @id = id + @images = images + @marketing_features = marketing_features + @metadata = metadata + @name = name + @package_dimensions = package_dimensions + @provisioning = provisioning + @shippable = shippable + @statement_descriptor = statement_descriptor + @tax_code = tax_code + @type = type + @unit_label = unit_label + @url = url + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + # Creates a new product object. def create(params = {}, opts = {}) request(method: :post, path: "/v1/products", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/promotion_code_service.rb b/lib/stripe/services/promotion_code_service.rb index 2054ecaf1..e4b730161 100644 --- a/lib/stripe/services/promotion_code_service.rb +++ b/lib/stripe/services/promotion_code_service.rb @@ -3,6 +3,193 @@ module Stripe class PromotionCodeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Filter promotion codes by whether they are active. + attr_accessor :active + # Only return promotion codes that have this case-insensitive code. + attr_accessor :code + # Only return promotion codes for this coupon. + attr_accessor :coupon + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return promotion codes that are restricted to this customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + code: nil, + coupon: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @code = code + @coupon = coupon + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_accessor :minimum_amount + + def initialize(minimum_amount: nil) + super + @minimum_amount = minimum_amount + end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + attr_accessor :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_accessor :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + attr_accessor :minimum_amount_currency + + def initialize( + currency_options: nil, + first_time_transaction: nil, + minimum_amount: nil, + minimum_amount_currency: nil + ) + super + @currency_options = currency_options + @first_time_transaction = first_time_transaction + @minimum_amount = minimum_amount + @minimum_amount_currency = minimum_amount_currency + end + end + # Whether the promotion code is currently active. + attr_accessor :active + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + # + # If left blank, we will generate one automatically. + attr_accessor :code + # The coupon for this promotion code. + attr_accessor :coupon + # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + attr_accessor :expires_at + # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + attr_accessor :restrictions + + def initialize( + active: nil, + code: nil, + coupon: nil, + customer: nil, + expand: nil, + expires_at: nil, + max_redemptions: nil, + metadata: nil, + restrictions: nil + ) + super + @active = active + @code = code + @coupon = coupon + @customer = customer + @expand = expand + @expires_at = expires_at + @max_redemptions = max_redemptions + @metadata = metadata + @restrictions = restrictions + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + attr_accessor :minimum_amount + + def initialize(minimum_amount: nil) + super + @minimum_amount = minimum_amount + end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(currency_options: nil) + super + @currency_options = currency_options + end + end + # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + attr_accessor :restrictions + + def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil) + super + @active = active + @expand = expand + @metadata = metadata + @restrictions = restrictions + end + end + # A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/quote_computed_upfront_line_items_service.rb b/lib/stripe/services/quote_computed_upfront_line_items_service.rb index b32ef79c3..ec5f1621f 100644 --- a/lib/stripe/services/quote_computed_upfront_line_items_service.rb +++ b/lib/stripe/services/quote_computed_upfront_line_items_service.rb @@ -3,6 +3,25 @@ module Stripe class QuoteComputedUpfrontLineItemsService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. def list(quote, params = {}, opts = {}) request( diff --git a/lib/stripe/services/quote_line_item_service.rb b/lib/stripe/services/quote_line_item_service.rb index 0d97a1e02..2682067fc 100644 --- a/lib/stripe/services/quote_line_item_service.rb +++ b/lib/stripe/services/quote_line_item_service.rb @@ -3,6 +3,25 @@ module Stripe class QuoteLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. def list(quote, params = {}, opts = {}) request( diff --git a/lib/stripe/services/quote_line_service.rb b/lib/stripe/services/quote_line_service.rb index e25262c87..189849109 100644 --- a/lib/stripe/services/quote_line_service.rb +++ b/lib/stripe/services/quote_line_service.rb @@ -3,6 +3,25 @@ module Stripe class QuoteLineService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. def list(quote, params = {}, opts = {}) request( diff --git a/lib/stripe/services/quote_preview_invoice_service.rb b/lib/stripe/services/quote_preview_invoice_service.rb index b7427e46e..a82e7ffd8 100644 --- a/lib/stripe/services/quote_preview_invoice_service.rb +++ b/lib/stripe/services/quote_preview_invoice_service.rb @@ -3,6 +3,25 @@ module Stripe class QuotePreviewInvoiceService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Preview the invoices that would be generated by accepting the quote. def list(quote, params = {}, opts = {}) request( diff --git a/lib/stripe/services/quote_preview_subscription_schedule_service.rb b/lib/stripe/services/quote_preview_subscription_schedule_service.rb index 5467233c0..1dc341582 100644 --- a/lib/stripe/services/quote_preview_subscription_schedule_service.rb +++ b/lib/stripe/services/quote_preview_subscription_schedule_service.rb @@ -3,6 +3,25 @@ module Stripe class QuotePreviewSubscriptionScheduleService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Preview the schedules that would be generated by accepting the quote def list(quote, params = {}, opts = {}) request( diff --git a/lib/stripe/services/quote_service.rb b/lib/stripe/services/quote_service.rb index 43dbec9c8..2e35df037 100644 --- a/lib/stripe/services/quote_service.rb +++ b/lib/stripe/services/quote_service.rb @@ -15,6 +15,2407 @@ def initialize(requestor) @computed_upfront_line_items = Stripe::QuoteComputedUpfrontLineItemsService.new(@requestor) end + class ListParams < Stripe::RequestParams + # The ID of the customer whose quotes will be retrieved. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The subscription which the quote updates. + attr_accessor :from_subscription + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the quote. + attr_accessor :status + # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. + attr_accessor :test_clock + + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + from_subscription: nil, + limit: nil, + starting_after: nil, + status: nil, + test_clock: nil + ) + super + @customer = customer + @ending_before = ending_before + @expand = expand + @from_subscription = from_subscription + @limit = limit + @starting_after = starting_after + @status = status + @test_clock = test_clock + end + end + + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class FromQuote < Stripe::RequestParams + # Whether this quote is a revision of the previous quote. + attr_accessor :is_revision + # The `id` of the quote that will be cloned. + attr_accessor :quote + + def initialize(is_revision: nil, quote: nil) + super + @is_revision = is_revision + @quote = quote + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(days_until_due: nil, issuer: nil) + super + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details for the `add_discount` type. + attr_accessor :add_discount + # Details for the `add_item` type. + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + attr_accessor :add_metadata + # Details for the `remove_discount` type. + attr_accessor :remove_discount + # Details for the `remove_item` type. + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + attr_accessor :set_discounts + # Details for the `set_items` type. + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + attr_accessor :set_metadata + # The type of action the quote line performs. + attr_accessor :type + + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ) + super + @add_discount = add_discount + @add_item = add_item + @add_metadata = add_metadata + @remove_discount = remove_discount + @remove_item = remove_item + @remove_metadata = remove_metadata + @set_discounts = set_discounts + @set_items = set_items + @set_metadata = set_metadata + @type = type + end + end + + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + attr_accessor :prorate + + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil) + super + @cancel_at = cancel_at + @invoice_now = invoice_now + @prorate = prorate + end + end + + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + attr_accessor :duration + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class LineEndsAt < Stripe::RequestParams + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # The timestamp the given line ends at. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + attr_accessor :type + + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # An array of operations the quote line performs. + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + attr_accessor :ends_at + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :starts_at + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ) + super + @actions = actions + @applies_to = applies_to + @billing_cycle_anchor = billing_cycle_anchor + @cancel_subscription_schedule = cancel_subscription_schedule + @ends_at = ends_at + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @starts_at = starts_at + @trial_settings = trial_settings + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_accessor :trial_period_days + + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + from_subscription: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ) + super + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @billing_cycle_anchor = billing_cycle_anchor + @description = description + @effective_date = effective_date + @end_behavior = end_behavior + @from_subscription = from_subscription + @metadata = metadata + @prebilling = prebilling + @proration_behavior = proration_behavior + @trial_period_days = trial_period_days + end + end + + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ) + super + @applies_to = applies_to + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @customer = customer + @description = description + @end_behavior = end_behavior + @proration_behavior = proration_behavior + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, amount_percent: nil, destination: nil) + super + @amount = amount + @amount_percent = amount_percent + @destination = destination + end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :description + # The discounts applied to the quote. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :footer + # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + attr_accessor :from_quote + # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + attr_accessor :header + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge. + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + attr_accessor :subscription_data_overrides + # ID of the test clock to attach to the quote. + attr_accessor :test_clock + # The data with which to automatically create a Transfer for each of the invoices. + attr_accessor :transfer_data + + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + from_quote: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + test_clock: nil, + transfer_data: nil + ) + super + @allow_backdated_lines = allow_backdated_lines + @application_fee_amount = application_fee_amount + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @collection_method = collection_method + @customer = customer + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @expires_at = expires_at + @footer = footer + @from_quote = from_quote + @header = header + @invoice_settings = invoice_settings + @line_items = line_items + @lines = lines + @metadata = metadata + @on_behalf_of = on_behalf_of + @subscription_data = subscription_data + @subscription_data_overrides = subscription_data_overrides + @test_clock = test_clock + @transfer_data = transfer_data + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(days_until_due: nil, issuer: nil) + super + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details for the `add_discount` type. + attr_accessor :add_discount + # Details for the `add_item` type. + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + attr_accessor :add_metadata + # Details for the `remove_discount` type. + attr_accessor :remove_discount + # Details for the `remove_item` type. + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + attr_accessor :set_discounts + # Details for the `set_items` type. + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + attr_accessor :set_metadata + # The type of action the quote line performs. + attr_accessor :type + + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ) + super + @add_discount = add_discount + @add_item = add_item + @add_metadata = add_metadata + @remove_discount = remove_discount + @remove_item = remove_item + @remove_metadata = remove_metadata + @set_discounts = set_discounts + @set_items = set_items + @set_metadata = set_metadata + @type = type + end + end + + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + attr_accessor :prorate + + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil) + super + @cancel_at = cancel_at + @invoice_now = invoice_now + @prorate = prorate + end + end + + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + attr_accessor :duration + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # The timestamp the given line ends at. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + attr_accessor :type + + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # An array of operations the quote line performs. + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + attr_accessor :ends_at + # The ID of an existing line on the quote. + attr_accessor :id + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :starts_at + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + id: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ) + super + @actions = actions + @applies_to = applies_to + @billing_cycle_anchor = billing_cycle_anchor + @cancel_subscription_schedule = cancel_subscription_schedule + @ends_at = ends_at + @id = id + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @starts_at = starts_at + @trial_settings = trial_settings + end + end + + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The discounts applied to this line item. + attr_accessor :discounts + # The ID of an existing line item on the quote. + attr_accessor :id + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # The quantity of the line item. + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + attr_accessor :tax_rates + + def initialize( + discounts: nil, + id: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @discounts = discounts + @id = id + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + + def initialize(iterations: nil) + super + @iterations = iterations + end + end + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + attr_accessor :trial_period_days + + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ) + super + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @billing_cycle_anchor = billing_cycle_anchor + @description = description + @effective_date = effective_date + @end_behavior = end_behavior + @metadata = metadata + @prebilling = prebilling + @proration_behavior = proration_behavior + @trial_period_days = trial_period_days + end + end + + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + attr_accessor :new_reference + # The ID of the schedule the line applies to. + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + attr_accessor :type + + def initialize(new_reference: nil, subscription_schedule: nil, type: nil) + super + @new_reference = new_reference + @subscription_schedule = subscription_schedule + @type = type + end + end + + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of a Quote line to start the bill period from. + attr_accessor :line_starts_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + attr_accessor :type + + def initialize(line_starts_at: nil, timestamp: nil, type: nil) + super + @line_starts_at = line_starts_at + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + attr_accessor :index + + def initialize(id: nil, index: nil) + super + @id = id + @index = index + end + end + # Details of the duration over which to bill. + attr_accessor :duration + # Details of a Quote line item from which to bill until. + attr_accessor :line_ends_at + # A precise Unix timestamp. + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + attr_accessor :type + + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil) + super + @duration = duration + @line_ends_at = line_ends_at + @timestamp = timestamp + @type = type + end + end + # The start of the period to bill from when the Quote is accepted. + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + attr_accessor :bill_until + + def initialize(bill_from: nil, bill_until: nil) + super + @bill_from = bill_from + @bill_until = bill_until + end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + attr_accessor :proration_behavior + + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ) + super + @applies_to = applies_to + @bill_on_acceptance = bill_on_acceptance + @billing_behavior = billing_behavior + @customer = customer + @description = description + @end_behavior = end_behavior + @proration_behavior = proration_behavior + end + end + + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount: nil, amount_percent: nil, destination: nil) + super + @amount = amount + @amount_percent = amount_percent + @destination = destination + end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. + attr_accessor :description + # The discounts applied to the quote. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. + attr_accessor :footer + # A header that will be displayed on the quote PDF. + attr_accessor :header + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge. + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + attr_accessor :subscription_data_overrides + # The data with which to automatically create a Transfer for each of the invoices. + attr_accessor :transfer_data + + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + transfer_data: nil + ) + super + @allow_backdated_lines = allow_backdated_lines + @application_fee_amount = application_fee_amount + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @collection_method = collection_method + @customer = customer + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @expires_at = expires_at + @footer = footer + @header = header + @invoice_settings = invoice_settings + @line_items = line_items + @lines = lines + @metadata = metadata + @on_behalf_of = on_behalf_of + @subscription_data = subscription_data + @subscription_data_overrides = subscription_data_overrides + @transfer_data = transfer_data + end + end + + class AcceptParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FinalizeQuoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + attr_accessor :expires_at + + def initialize(expand: nil, expires_at: nil) + super + @expand = expand + @expires_at = expires_at + end + end + + class MarkDraftParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class MarkStaleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Reason the Quote is being marked stale. + attr_accessor :reason + + def initialize(expand: nil, reason: nil) + super + @expand = expand + @reason = reason + end + end + + class ReestimateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListPreviewInvoiceLinesParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Accepts the specified quote. def accept(quote, params = {}, opts = {}) request( diff --git a/lib/stripe/services/radar/early_fraud_warning_service.rb b/lib/stripe/services/radar/early_fraud_warning_service.rb index 12742f2ce..7ba1c70bd 100644 --- a/lib/stripe/services/radar/early_fraud_warning_service.rb +++ b/lib/stripe/services/radar/early_fraud_warning_service.rb @@ -4,6 +4,70 @@ module Stripe module Radar class EarlyFraudWarningService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return early fraud warnings for the charge specified by this charge ID. + attr_accessor :charge + # Only return early fraud warnings that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of early fraud warnings. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/radar/value_list_item_service.rb b/lib/stripe/services/radar/value_list_item_service.rb index 62b260bda..c7a4836d1 100644 --- a/lib/stripe/services/radar/value_list_item_service.rb +++ b/lib/stripe/services/radar/value_list_item_service.rb @@ -4,6 +4,89 @@ module Stripe module Radar class ValueListItemService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return items that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Return items belonging to the parent list whose value matches the specified value (using an "is like" match). + attr_accessor :value + # Identifier for the parent value list this item belongs to. + attr_accessor :value_list + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + value: nil, + value_list: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @value = value + @value_list = value_list + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The value of the item (whose type must match the type of the parent value list). + attr_accessor :value + # The identifier of the value list which the created item will be added to. + attr_accessor :value_list + + def initialize(expand: nil, value: nil, value_list: nil) + super + @expand = expand + @value = value + @value_list = value_list + end + end + # Creates a new ValueListItem object, which is added to the specified parent value list. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/radar/value_list_service.rb b/lib/stripe/services/radar/value_list_service.rb index a910c91ab..b79c2158c 100644 --- a/lib/stripe/services/radar/value_list_service.rb +++ b/lib/stripe/services/radar/value_list_service.rb @@ -4,6 +4,114 @@ module Stripe module Radar class ValueListService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # The name of the value list for use in rules. + attr_accessor :alias + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The human-readable name of the value list. + attr_accessor :name + + def initialize(alias_: nil, expand: nil, metadata: nil, name: nil) + super + @alias = alias_ + @expand = expand + @metadata = metadata + @name = name + end + end + + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # The alias used to reference the value list when writing rules. + attr_accessor :alias + # A value contained within a value list - returns all value lists containing this value. + attr_accessor :contains + # Only return value lists that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + alias_: nil, + contains: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @alias = alias_ + @contains = contains + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # The name of the value list for use in rules. + attr_accessor :alias + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + attr_accessor :item_type + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The human-readable name of the value list. + attr_accessor :name + + def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil) + super + @alias = alias_ + @expand = expand + @item_type = item_type + @metadata = metadata + @name = name + end + end + # Creates a new ValueList object, which can then be referenced in rules. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/refund_service.rb b/lib/stripe/services/refund_service.rb index 9c37ee53f..166d0d825 100644 --- a/lib/stripe/services/refund_service.rb +++ b/lib/stripe/services/refund_service.rb @@ -3,6 +3,149 @@ module Stripe class RefundService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return refunds for the charge specified by this charge ID. + attr_accessor :charge + # Only return refunds that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return refunds for the PaymentIntent specified by this ID. + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ) + super + @charge = charge + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_intent = payment_intent + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Attribute for param field amount + attr_accessor :amount + # The identifier of the charge to refund. + attr_accessor :charge + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Customer whose customer balance to refund from. + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. + attr_accessor :instructions_email + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Origin of the refund + attr_accessor :origin + # The identifier of the PaymentIntent to refund. + attr_accessor :payment_intent + # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + attr_accessor :reason + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + attr_accessor :refund_application_fee + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge. + attr_accessor :reverse_transfer + + def initialize( + amount: nil, + charge: nil, + currency: nil, + customer: nil, + expand: nil, + instructions_email: nil, + metadata: nil, + origin: nil, + payment_intent: nil, + reason: nil, + refund_application_fee: nil, + reverse_transfer: nil + ) + super + @amount = amount + @charge = charge + @currency = currency + @customer = customer + @expand = expand + @instructions_email = instructions_email + @metadata = metadata + @origin = origin + @payment_intent = payment_intent + @reason = reason + @refund_application_fee = refund_application_fee + @reverse_transfer = reverse_transfer + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Cancels a refund with a status of requires_action. # # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state. diff --git a/lib/stripe/services/reporting/report_run_service.rb b/lib/stripe/services/reporting/report_run_service.rb index 0ac406a21..a7efe1390 100644 --- a/lib/stripe/services/reporting/report_run_service.rb +++ b/lib/stripe/services/reporting/report_run_service.rb @@ -4,6 +4,117 @@ module Stripe module Reporting class ReportRunService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return Report Runs that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Parameters < Stripe::RequestParams + # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. + attr_accessor :columns + # Connected account ID to filter for in the report run. + attr_accessor :connected_account + # Currency of objects to be included in the report run. + attr_accessor :currency + # Ending timestamp of data to be included in the report run (exclusive). + attr_accessor :interval_end + # Starting timestamp of data to be included in the report run. + attr_accessor :interval_start + # Payout ID by which to filter the report run. + attr_accessor :payout + # Category of balance transactions to be included in the report run. + attr_accessor :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + attr_accessor :timezone + + def initialize( + columns: nil, + connected_account: nil, + currency: nil, + interval_end: nil, + interval_start: nil, + payout: nil, + reporting_category: nil, + timezone: nil + ) + super + @columns = columns + @connected_account = connected_account + @currency = currency + @interval_end = interval_end + @interval_start = interval_start + @payout = payout + @reporting_category = reporting_category + @timezone = timezone + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + attr_accessor :parameters + # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. + attr_accessor :report_type + + def initialize(expand: nil, parameters: nil, report_type: nil) + super + @expand = expand + @parameters = parameters + @report_type = report_type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/reporting/report_type_service.rb b/lib/stripe/services/reporting/report_type_service.rb index ab5c6ba0a..79c983c89 100644 --- a/lib/stripe/services/reporting/report_type_service.rb +++ b/lib/stripe/services/reporting/report_type_service.rb @@ -4,6 +4,26 @@ module Stripe module Reporting class ReportTypeService < StripeService + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a full list of Report Types. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/review_service.rb b/lib/stripe/services/review_service.rb index 00a6adafc..85dffd649 100644 --- a/lib/stripe/services/review_service.rb +++ b/lib/stripe/services/review_service.rb @@ -3,6 +3,66 @@ module Stripe class ReviewService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return reviews that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(created: nil, ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ApproveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Approves a Review object, closing it and removing it from the list of reviews. def approve(review, params = {}, opts = {}) request( diff --git a/lib/stripe/services/setup_attempt_service.rb b/lib/stripe/services/setup_attempt_service.rb index 30d99d8d6..e18dcc1bf 100644 --- a/lib/stripe/services/setup_attempt_service.rb +++ b/lib/stripe/services/setup_attempt_service.rb @@ -3,6 +3,59 @@ module Stripe class SetupAttemptService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A filter on the list, based on the object `created` field. The value + # can be a string with an integer Unix timestamp or a + # dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return SetupAttempts created by the SetupIntent specified by + # this ID. + attr_accessor :setup_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + setup_intent: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @setup_intent = setup_intent + @starting_after = starting_after + end + end + # Returns a list of SetupAttempts that associate with a provided SetupIntent. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/setup_intent_service.rb b/lib/stripe/services/setup_intent_service.rb index 97464f71d..5f4ab5dd1 100644 --- a/lib/stripe/services/setup_intent_service.rb +++ b/lib/stripe/services/setup_intent_service.rb @@ -3,6 +3,3630 @@ module Stripe class SetupIntentService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_accessor :attach_to_self + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return SetupIntents for the customer specified by this customer ID. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return SetupIntents that associate with the specified payment method. + attr_accessor :payment_method + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + attach_to_self: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_method: nil, + starting_after: nil + ) + super + @attach_to_self = attach_to_self + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @payment_method = payment_method + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + attr_accessor :allow_redirects + # Whether this feature is enabled. + attr_accessor :enabled + + def initialize(allow_redirects: nil, enabled: nil) + super + @allow_redirects = allow_redirects + @enabled = enabled + end + end + + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Bank account verification method. + attr_accessor :verification_method + + def initialize(currency: nil, mandate_options: nil, verification_method: nil) + super + @currency = currency + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class AmazonPay < Stripe::RequestParams + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @currency = currency + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + attr_accessor :three_d_secure + + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ) + super + @mandate_options = mandate_options + @moto = moto + @network = network + @request_three_d_secure = request_three_d_secure + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + + def initialize(persistent_token: nil) + super + @persistent_token = persistent_token + end + end + + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_accessor :billing_agreement_id + # Attribute for param field currency + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil) + super + @billing_agreement_id = billing_agreement_id + @currency = currency + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation. + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @verification_method = verification_method + end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @amazon_pay = amazon_pay + @bacs_debit = bacs_debit + @card = card + @card_present = card_present + @link = link + @paypal = paypal + @payto = payto + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + + class SingleUse < Stripe::RequestParams + # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + + def initialize(amount: nil, currency: nil) + super + @amount = amount + @currency = currency + end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_accessor :attach_to_self + # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. + attr_accessor :automatic_payment_methods + # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. + attr_accessor :confirm + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_accessor :flow_directions + # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Stripe account ID created for this SetupIntent. + attr_accessor :on_behalf_of + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + attr_accessor :return_url + # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + attr_accessor :single_use + # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + attr_accessor :usage + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + attach_to_self: nil, + automatic_payment_methods: nil, + confirm: nil, + confirmation_token: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + mandate_data: nil, + metadata: nil, + on_behalf_of: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + single_use: nil, + usage: nil, + use_stripe_sdk: nil + ) + super + @attach_to_self = attach_to_self + @automatic_payment_methods = automatic_payment_methods + @confirm = confirm + @confirmation_token = confirmation_token + @customer = customer + @description = description + @expand = expand + @flow_directions = flow_directions + @mandate_data = mandate_data + @metadata = metadata + @on_behalf_of = on_behalf_of + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @return_url = return_url + @single_use = single_use + @usage = usage + @use_stripe_sdk = use_stripe_sdk + end + end + + class RetrieveParams < Stripe::RequestParams + # The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(client_secret: nil, expand: nil) + super + @client_secret = client_secret + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Bank account verification method. + attr_accessor :verification_method + + def initialize(currency: nil, mandate_options: nil, verification_method: nil) + super + @currency = currency + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class AmazonPay < Stripe::RequestParams + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @currency = currency + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + attr_accessor :three_d_secure + + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ) + super + @mandate_options = mandate_options + @moto = moto + @network = network + @request_three_d_secure = request_three_d_secure + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + + def initialize(persistent_token: nil) + super + @persistent_token = persistent_token + end + end + + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_accessor :billing_agreement_id + # Attribute for param field currency + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil) + super + @billing_agreement_id = billing_agreement_id + @currency = currency + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation. + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @verification_method = verification_method + end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @amazon_pay = amazon_pay + @bacs_debit = bacs_debit + @card = card + @card_present = card_present + @link = link + @paypal = paypal + @payto = payto + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + attr_accessor :attach_to_self + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + attr_accessor :flow_directions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + attr_accessor :payment_method_types + + def initialize( + attach_to_self: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + metadata: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil + ) + super + @attach_to_self = attach_to_self + @customer = customer + @description = description + @expand = expand + @flow_directions = flow_directions + @metadata = metadata + @payment_method = payment_method + @payment_method_configuration = payment_method_configuration + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + end + end + + class CancelParams < Stripe::RequestParams + # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(cancellation_reason: nil, expand: nil) + super + @cancellation_reason = cancellation_reason + @expand = expand + end + end + + class ConfirmParams < Stripe::RequestParams + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + end + + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + attr_accessor :user_agent + + def initialize(ip_address: nil, user_agent: nil) + super + @ip_address = ip_address + @user_agent = user_agent + end + end + # The time at which the customer accepted the Mandate. + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + attr_accessor :type + + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil) + super + @accepted_at = accepted_at + @offline = offline + @online = online + @type = type + end + end + # This hash contains details about the customer acceptance of the Mandate. + attr_accessor :customer_acceptance + + def initialize(customer_acceptance: nil) + super + @customer_acceptance = customer_acceptance + end + end + + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + attr_accessor :interval_description + # Payment schedule for the mandate. + attr_accessor :payment_schedule + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ) + super + @custom_mandate_url = custom_mandate_url + @default_for = default_for + @interval_description = interval_description + @payment_schedule = payment_schedule + @transaction_type = transaction_type + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Bank account verification method. + attr_accessor :verification_method + + def initialize(currency: nil, mandate_options: nil, verification_method: nil) + super + @currency = currency + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class AmazonPay < Stripe::RequestParams + end + + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + attr_accessor :supported_types + + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ) + super + @amount = amount + @amount_type = amount_type + @currency = currency + @description = description + @end_date = end_date + @interval = interval + @interval_count = interval_count + @reference = reference + @start_date = start_date + @supported_types = supported_types + end + end + + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + attr_accessor :cb_score + + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil) + super + @cb_avalgo = cb_avalgo + @cb_exemption = cb_exemption + @cb_score = cb_score + end + end + # Cartes Bancaires-specific 3DS fields. + attr_accessor :cartes_bancaires + + def initialize(cartes_bancaires: nil) + super + @cartes_bancaires = cartes_bancaires + end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + attr_accessor :version + + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ) + super + @ares_trans_status = ares_trans_status + @cryptogram = cryptogram + @electronic_commerce_indicator = electronic_commerce_indicator + @network_options = network_options + @requestor_challenge_indicator = requestor_challenge_indicator + @transaction_id = transaction_id + @version = version + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + attr_accessor :three_d_secure + + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ) + super + @mandate_options = mandate_options + @moto = moto + @network = network + @request_three_d_secure = request_three_d_secure + @three_d_secure = three_d_secure + end + end + + class CardPresent < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + attr_accessor :persistent_token + + def initialize(persistent_token: nil) + super + @persistent_token = persistent_token + end + end + + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + attr_accessor :billing_agreement_id + # Attribute for param field currency + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + attr_accessor :subsellers + + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil) + super + @billing_agreement_id = billing_agreement_id + @currency = currency + @subsellers = subsellers + end + end + + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + attr_accessor :end_date + # The periodicity at which payments will be collected. + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + attr_accessor :start_date + + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ) + super + @amount = amount + @amount_type = amount_type + @end_date = end_date + @payment_schedule = payment_schedule + @payments_per_period = payments_per_period + @purpose = purpose + @start_date = start_date + end + end + # Additional fields for Mandate creation. + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + attr_accessor :reference_prefix + + def initialize(reference_prefix: nil) + super + @reference_prefix = reference_prefix + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + + def initialize(mandate_options: nil) + super + @mandate_options = mandate_options + end + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + attr_accessor :mode + + def initialize(mode: nil) + super + @mode = mode + end + end + # Provide filters for the linked accounts that the customer can select for the payment method + attr_accessor :filters + # Customize manual entry behavior + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + attr_accessor :return_url + + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ) + super + @filters = filters + @manual_entry = manual_entry + @permissions = permissions + @prefetch = prefetch + @return_url = return_url + end + end + + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + attr_accessor :collection_method + + def initialize(collection_method: nil) + super + @collection_method = collection_method + end + end + + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Additional fields for network related functions + attr_accessor :networks + # Bank account verification method. + attr_accessor :verification_method + + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ) + super + @financial_connections = financial_connections + @mandate_options = mandate_options + @networks = networks + @verification_method = verification_method + end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @amazon_pay = amazon_pay + @bacs_debit = bacs_debit + @card = card + @card_present = card_present + @link = link + @paypal = paypal + @payto = payto + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + attr_accessor :confirmation_token + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Attribute for param field mandate_data + attr_accessor :mandate_data + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + attr_accessor :payment_method + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + attr_accessor :payment_method_options + # The URL to redirect your customer back to after they authenticate on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + attr_accessor :return_url + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + attr_accessor :use_stripe_sdk + + def initialize( + confirmation_token: nil, + expand: nil, + mandate_data: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + return_url: nil, + use_stripe_sdk: nil + ) + super + @confirmation_token = confirmation_token + @expand = expand + @mandate_data = mandate_data + @payment_method = payment_method + @payment_method_data = payment_method_data + @payment_method_options = payment_method_options + @return_url = return_url + @use_stripe_sdk = use_stripe_sdk + end + end + + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(amounts: nil, descriptor_code: nil, expand: nil) + super + @amounts = amounts + @descriptor_code = descriptor_code + @expand = expand + end + end + # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. # # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. diff --git a/lib/stripe/services/shipping_rate_service.rb b/lib/stripe/services/shipping_rate_service.rb index 5fce1b46a..a81fdb4c3 100644 --- a/lib/stripe/services/shipping_rate_service.rb +++ b/lib/stripe/services/shipping_rate_service.rb @@ -3,6 +3,218 @@ module Stripe class ShippingRateService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return shipping rates that are active or inactive. + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # Only return shipping rates for the given currency. + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @created = created + @currency = currency + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + + class Minimum < Stripe::RequestParams + # A unit of time. + attr_accessor :unit + # Must be greater than 0. + attr_accessor :value + + def initialize(unit: nil, value: nil) + super + @unit = unit + @value = value + end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + attr_accessor :minimum + + def initialize(maximum: nil, minimum: nil) + super + @maximum = maximum + @minimum = minimum + end + end + + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(amount: nil, currency: nil, currency_options: nil) + super + @amount = amount + @currency = currency + @currency_options = currency_options + end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + attr_accessor :type + + def initialize( + delivery_estimate: nil, + display_name: nil, + expand: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ) + super + @delivery_estimate = delivery_estimate + @display_name = display_name + @expand = expand + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + @tax_code = tax_code + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(amount: nil, tax_behavior: nil) + super + @amount = amount + @tax_behavior = tax_behavior + end + end + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency_options + + def initialize(currency_options: nil) + super + @currency_options = currency_options + end + end + # Whether the shipping rate can be used for new purchases. Defaults to `true`. + attr_accessor :active + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + attr_accessor :tax_behavior + + def initialize(active: nil, expand: nil, fixed_amount: nil, metadata: nil, tax_behavior: nil) + super + @active = active + @expand = expand + @fixed_amount = fixed_amount + @metadata = metadata + @tax_behavior = tax_behavior + end + end + # Creates a new shipping rate object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/sigma/scheduled_query_run_service.rb b/lib/stripe/services/sigma/scheduled_query_run_service.rb index 4ed5e9fbd..adc96d500 100644 --- a/lib/stripe/services/sigma/scheduled_query_run_service.rb +++ b/lib/stripe/services/sigma/scheduled_query_run_service.rb @@ -4,6 +4,35 @@ module Stripe module Sigma class ScheduledQueryRunService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of scheduled query runs. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/source_service.rb b/lib/stripe/services/source_service.rb index 569a0c0e2..c384834de 100644 --- a/lib/stripe/services/source_service.rb +++ b/lib/stripe/services/source_service.rb @@ -10,6 +10,634 @@ def initialize(requestor) @transactions = Stripe::SourceTransactionService.new(@requestor) end + class DetachParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RetrieveParams < Stripe::RequestParams + # The client secret of the source. Required if a publishable key is used to retrieve the source. + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(client_secret: nil, expand: nil) + super + @client_secret = client_secret + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + attr_accessor :contact_email + + def initialize(contact_email: nil) + super + @contact_email = contact_email + end + end + + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ) + super + @date = date + @ip = ip + @offline = offline + @online = online + @status = status + @type = type + @user_agent = user_agent + end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + attr_accessor :notification_method + + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ) + super + @acceptance = acceptance + @amount = amount + @currency = currency + @interval = interval + @notification_method = notification_method + end + end + + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Owner's address. + attr_accessor :address + # Owner's email address. + attr_accessor :email + # Owner's full name. + attr_accessor :name + # Owner's phone number. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + attr_accessor :amount + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field description + attr_accessor :description + # The ID of the SKU being ordered. + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + attr_accessor :quantity + # Attribute for param field type + attr_accessor :type + + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ) + super + @amount = amount + @currency = currency + @description = description + @parent = parent + @quantity = quantity + @type = type + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # List of items constituting the order. + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + attr_accessor :shipping + + def initialize(items: nil, shipping: nil) + super + @items = items + @shipping = shipping + end + end + # Amount associated with the source. + attr_accessor :amount + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + attr_accessor :mandate + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Information about the owner of the payment instrument that may be used or required by particular source types. + attr_accessor :owner + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + attr_accessor :source_order + + def initialize( + amount: nil, + expand: nil, + mandate: nil, + metadata: nil, + owner: nil, + source_order: nil + ) + super + @amount = amount + @expand = expand + @mandate = mandate + @metadata = metadata + @owner = owner + @source_order = source_order + end + end + + class CreateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + attr_accessor :contact_email + + def initialize(contact_email: nil) + super + @contact_email = contact_email + end + end + + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + attr_accessor :user_agent + + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ) + super + @date = date + @ip = ip + @offline = offline + @online = online + @status = status + @type = type + @user_agent = user_agent + end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + attr_accessor :notification_method + + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ) + super + @acceptance = acceptance + @amount = amount + @currency = currency + @interval = interval + @notification_method = notification_method + end + end + + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Owner's address. + attr_accessor :address + # Owner's email address. + attr_accessor :email + # Owner's full name. + attr_accessor :name + # Owner's phone number. + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Receiver < Stripe::RequestParams + # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. + attr_accessor :refund_attributes_method + + def initialize(refund_attributes_method: nil) + super + @refund_attributes_method = refund_attributes_method + end + end + + class Redirect < Stripe::RequestParams + # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. + attr_accessor :return_url + + def initialize(return_url: nil) + super + @return_url = return_url + end + end + + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + attr_accessor :amount + # Attribute for param field currency + attr_accessor :currency + # Attribute for param field description + attr_accessor :description + # The ID of the SKU being ordered. + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + attr_accessor :quantity + # Attribute for param field type + attr_accessor :type + + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ) + super + @amount = amount + @currency = currency + @description = description + @parent = parent + @quantity = quantity + @type = type + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address. + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + attr_accessor :carrier + # Recipient name. + attr_accessor :name + # Recipient phone (including extension). + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + attr_accessor :tracking_number + + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil) + super + @address = address + @carrier = carrier + @name = name + @phone = phone + @tracking_number = tracking_number + end + end + # List of items constituting the order. + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + attr_accessor :shipping + + def initialize(items: nil, shipping: nil) + super + @items = items + @shipping = shipping + end + end + # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. + attr_accessor :amount + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. + attr_accessor :currency + # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). + attr_accessor :customer + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + attr_accessor :flow + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + attr_accessor :mandate + # Attribute for param field metadata + attr_accessor :metadata + # The source to share. + attr_accessor :original_source + # Information about the owner of the payment instrument that may be used or required by particular source types. + attr_accessor :owner + # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + attr_accessor :receiver + # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + attr_accessor :redirect + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + attr_accessor :source_order + # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. + attr_accessor :statement_descriptor + # An optional token used to create the source. When passed, token properties will override source parameters. + attr_accessor :token + # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) + attr_accessor :type + # Attribute for param field usage + attr_accessor :usage + + def initialize( + amount: nil, + currency: nil, + customer: nil, + expand: nil, + flow: nil, + mandate: nil, + metadata: nil, + original_source: nil, + owner: nil, + receiver: nil, + redirect: nil, + source_order: nil, + statement_descriptor: nil, + token: nil, + type: nil, + usage: nil + ) + super + @amount = amount + @currency = currency + @customer = customer + @expand = expand + @flow = flow + @mandate = mandate + @metadata = metadata + @original_source = original_source + @owner = owner + @receiver = receiver + @redirect = redirect + @source_order = source_order + @statement_descriptor = statement_descriptor + @token = token + @type = type + @usage = usage + end + end + + class VerifyParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The values needed to verify the source. + attr_accessor :values + + def initialize(expand: nil, values: nil) + super + @expand = expand + @values = values + end + end + # Creates a new source object. def create(params = {}, opts = {}) request(method: :post, path: "/v1/sources", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/source_transaction_service.rb b/lib/stripe/services/source_transaction_service.rb index 8d98c66f7..9a7767efc 100644 --- a/lib/stripe/services/source_transaction_service.rb +++ b/lib/stripe/services/source_transaction_service.rb @@ -3,6 +3,25 @@ module Stripe class SourceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # List source transactions for a given source. def list(source, params = {}, opts = {}) request( diff --git a/lib/stripe/services/subscription_item_service.rb b/lib/stripe/services/subscription_item_service.rb index be2522a8f..1b48e5e49 100644 --- a/lib/stripe/services/subscription_item_service.rb +++ b/lib/stripe/services/subscription_item_service.rb @@ -11,6 +11,407 @@ def initialize(requestor) @usage_record_summaries = Stripe::SubscriptionItemUsageRecordSummaryService.new(@requestor) end + class DeleteParams < Stripe::RequestParams + # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. + attr_accessor :clear_usage + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + + def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil) + super + @clear_usage = clear_usage + @proration_behavior = proration_behavior + @proration_date = proration_date + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + attr_accessor :off_session + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + attr_accessor :payment_behavior + # The identifier of the new plan for this subscription item. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + off_session: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @expand = expand + @metadata = metadata + @off_session = off_session + @payment_behavior = payment_behavior + @plan = plan + @price = price + @price_data = price_data + @proration_behavior = proration_behavior + @proration_date = proration_date + @quantity = quantity + @tax_rates = tax_rates + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The ID of the subscription whose items will be retrieved. + attr_accessor :subscription + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + subscription: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @subscription = subscription + end + end + + class CreateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + attr_accessor :payment_behavior + # The identifier of the plan to add to the subscription. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + attr_accessor :quantity + # The identifier of the subscription to modify. + attr_accessor :subscription + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + subscription: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @expand = expand + @metadata = metadata + @payment_behavior = payment_behavior + @plan = plan + @price = price + @price_data = price_data + @proration_behavior = proration_behavior + @proration_date = proration_date + @quantity = quantity + @subscription = subscription + @tax_rates = tax_rates + @trial = trial + end + end + # Adds a new item to an existing subscription. No existing items will be changed or replaced. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/subscription_item_usage_record_service.rb b/lib/stripe/services/subscription_item_usage_record_service.rb index 3b33e0e9e..8d02248ef 100644 --- a/lib/stripe/services/subscription_item_usage_record_service.rb +++ b/lib/stripe/services/subscription_item_usage_record_service.rb @@ -3,6 +3,25 @@ module Stripe class SubscriptionItemUsageRecordService < StripeService + class CreateParams < Stripe::RequestParams + # Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + attr_accessor :action + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The usage quantity for the specified timestamp. + attr_accessor :quantity + # The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. + attr_accessor :timestamp + + def initialize(action: nil, expand: nil, quantity: nil, timestamp: nil) + super + @action = action + @expand = expand + @quantity = quantity + @timestamp = timestamp + end + end + # Creates a usage record for a specified subscription item and date, and fills it with a quantity. # # Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the [metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) plan, Stripe helps you send accurate invoices to your customers. diff --git a/lib/stripe/services/subscription_item_usage_record_summary_service.rb b/lib/stripe/services/subscription_item_usage_record_summary_service.rb index 0d5da8154..1b336f870 100644 --- a/lib/stripe/services/subscription_item_usage_record_summary_service.rb +++ b/lib/stripe/services/subscription_item_usage_record_summary_service.rb @@ -3,6 +3,25 @@ module Stripe class SubscriptionItemUsageRecordSummaryService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September). # # The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends. diff --git a/lib/stripe/services/subscription_schedule_service.rb b/lib/stripe/services/subscription_schedule_service.rb index 214bd461f..f6edcb7c8 100644 --- a/lib/stripe/services/subscription_schedule_service.rb +++ b/lib/stripe/services/subscription_schedule_service.rb @@ -3,6 +3,2163 @@ module Stripe class SubscriptionScheduleService < StripeService + class ListParams < Stripe::RequestParams + class CanceledAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CompletedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class ReleasedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return subscription schedules that were created canceled the given date interval. + attr_accessor :canceled_at + # Only return subscription schedules that completed during the given date interval. + attr_accessor :completed_at + # Only return subscription schedules that were created during the given date interval. + attr_accessor :created + # Only return subscription schedules for the given customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return subscription schedules that were released during the given date interval. + attr_accessor :released_at + # Only return subscription schedules that have not started yet. + attr_accessor :scheduled + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + canceled_at: nil, + completed_at: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + released_at: nil, + scheduled: nil, + starting_after: nil + ) + super + @canceled_at = canceled_at + @completed_at = completed_at + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @released_at = released_at + @scheduled = scheduled + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ) + super + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @default_payment_method = default_payment_method + @description = description + @invoice_settings = invoice_settings + @on_behalf_of = on_behalf_of + @transfer_data = transfer_data + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # The identifier of the customer to create the subscription schedule for. + attr_accessor :customer + # Object representing the subscription schedule's default settings. + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. + attr_accessor :start_date + + def initialize( + billing_behavior: nil, + customer: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + from_subscription: nil, + metadata: nil, + phases: nil, + prebilling: nil, + start_date: nil + ) + super + @billing_behavior = billing_behavior + @customer = customer + @default_settings = default_settings + @end_behavior = end_behavior + @expand = expand + @from_subscription = from_subscription + @metadata = metadata + @phases = phases + @prebilling = prebilling + @start_date = start_date + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ) + super + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @default_payment_method = default_payment_method + @description = description + @invoice_settings = invoice_settings + @on_behalf_of = on_behalf_of + @transfer_data = transfer_data + end + end + + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @days_until_due = days_until_due + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + attr_accessor :end_date + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + attr_accessor :trial_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @collection_method = collection_method + @coupon = coupon + @currency = currency + @default_payment_method = default_payment_method + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @end_date = end_date + @invoice_settings = invoice_settings + @items = items + @iterations = iterations + @metadata = metadata + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @proration_behavior = proration_behavior + @start_date = start_date + @transfer_data = transfer_data + @trial = trial + @trial_continuation = trial_continuation + @trial_end = trial_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + attr_accessor :billing_behavior + # Object representing the subscription schedule's default settings. + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + attr_accessor :proration_behavior + + def initialize( + billing_behavior: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + metadata: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ) + super + @billing_behavior = billing_behavior + @default_settings = default_settings + @end_behavior = end_behavior + @expand = expand + @metadata = metadata + @phases = phases + @prebilling = prebilling + @proration_behavior = proration_behavior + end + end + + class AmendParams < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + attr_accessor :type + + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil) + super + @discount_end = discount_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + attr_accessor :discount + + def initialize(discount: nil) + super + @discount = discount + end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + attr_accessor :amendment_end + # Use the `end` time of a given discount. + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + attr_accessor :type + + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @discount_end = discount_end + @timestamp = timestamp + @type = type + end + end + + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # The coupon code to redeem. + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + attr_accessor :index + # The promotion code to redeem. + attr_accessor :promotion_code + + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @index = index + @promotion_code = promotion_code + end + end + + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @promotion_code = promotion_code + end + end + # Details of the discount to add. + attr_accessor :add + # Details of the discount to remove. + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + attr_accessor :set + # Determines the type of discount action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # Quantity for this item. + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class Remove < Stripe::RequestParams + # ID of a price to remove. + attr_accessor :price + + def initialize(price: nil) + super + @price = price + end + end + + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + attr_accessor :metadata + # The ID of the price object. + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + attr_accessor :trial + + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @discounts = discounts + @metadata = metadata + @price = price + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + attr_accessor :add + # Details of the subscription item to remove. + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + attr_accessor :set + # Determines the type of item action. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + attr_accessor :add + # Keys to remove from schedule phase metadata. + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + attr_accessor :type + + def initialize(add: nil, remove: nil, set: nil, type: nil) + super + @add = add + @remove = remove + @set = set + @type = type + end + end + + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + + def initialize(behavior: nil) + super + @behavior = behavior + end + end + # Details of the pause_collection behavior to apply to the amendment. + attr_accessor :set + # Determines the type of the pause_collection amendment. + attr_accessor :type + + def initialize(set: nil, type: nil) + super + @set = set + @type = type + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + attr_accessor :prorate_up_front + + def initialize(prorate_up_front: nil) + super + @prorate_up_front = prorate_up_front + end + end + # Defines how the subscription should behave when a trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + attr_accessor :item_actions + # Instructions for how to modify phase metadata + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + attr_accessor :set_schedule_end + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ) + super + @amendment_end = amendment_end + @amendment_start = amendment_start + @billing_cycle_anchor = billing_cycle_anchor + @discount_actions = discount_actions + @item_actions = item_actions + @metadata_actions = metadata_actions + @proration_behavior = proration_behavior + @set_pause_collection = set_pause_collection + @set_schedule_end = set_schedule_end + @trial_settings = trial_settings + end + end + + class Prebilling < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class AmendmentStart < Stripe::RequestParams + # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + # Start the prebilled period when a specified amendment begins. + attr_accessor :amendment_start + # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_from` value. + attr_accessor :type + + def initialize(amendment_start: nil, timestamp: nil, type: nil) + super + @amendment_start = amendment_start + @timestamp = timestamp + @type = type + end + end + + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + attr_accessor :index + + def initialize(index: nil) + super + @index = index + end + end + + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # End the prebilled period when a specified amendment ends. + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + attr_accessor :type + + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil) + super + @amendment_end = amendment_end + @duration = duration + @timestamp = timestamp + @type = type + end + end + # The beginning of the prebilled time period. The default value is `now`. + attr_accessor :bill_from + # The end of the prebilled time period. + attr_accessor :bill_until + # When the prebilling invoice should be created. The default value is `now`. + attr_accessor :invoice_at + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil) + super + @bill_from = bill_from + @bill_until = bill_until + @invoice_at = invoice_at + @update_behavior = update_behavior + end + end + + class ScheduleSettings < Stripe::RequestParams + # Behavior of the subscription schedule and underlying subscription when it ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + attr_accessor :amendments + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Provide any time periods to bill in advance. + attr_accessor :prebilling + # In cases where the amendment changes the currently active phase, + # specifies if and how to prorate at the time of the request. + attr_accessor :proration_behavior + # Changes to apply to the subscription schedule. + attr_accessor :schedule_settings + + def initialize( + amendments: nil, + expand: nil, + prebilling: nil, + proration_behavior: nil, + schedule_settings: nil + ) + super + @amendments = amendments + @expand = expand + @prebilling = prebilling + @proration_behavior = proration_behavior + @schedule_settings = schedule_settings + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + attr_accessor :prorate + + def initialize(expand: nil, invoice_now: nil, prorate: nil) + super + @expand = expand + @invoice_now = invoice_now + @prorate = prorate + end + end + + class ReleaseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Keep any cancellation on the subscription that the schedule has set + attr_accessor :preserve_cancel_date + + def initialize(expand: nil, preserve_cancel_date: nil) + super + @expand = expand + @preserve_cancel_date = preserve_cancel_date + end + end + # Amends an existing subscription schedule. def amend(schedule, params = {}, opts = {}) request( diff --git a/lib/stripe/services/subscription_service.rb b/lib/stripe/services/subscription_service.rb index 1ef8fcbb1..15dd6f837 100644 --- a/lib/stripe/services/subscription_service.rb +++ b/lib/stripe/services/subscription_service.rb @@ -3,6 +3,1820 @@ module Stripe class SubscriptionService < StripeService + class CancelParams < Stripe::RequestParams + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + attr_accessor :feedback + + def initialize(comment: nil, feedback: nil) + super + @comment = comment + @feedback = feedback + end + end + # Details about why this subscription was cancelled + attr_accessor :cancellation_details + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. + attr_accessor :invoice_now + # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. + attr_accessor :prorate + + def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil) + super + @cancellation_details = cancellation_details + @expand = expand + @invoice_now = invoice_now + @prorate = prorate + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + attr_accessor :feedback + + def initialize(comment: nil, feedback: nil) + super + @comment = comment + @feedback = feedback + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Subscription item to update. + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ) + super + @billing_thresholds = billing_thresholds + @clear_usage = clear_usage + @deleted = deleted + @discounts = discounts + @id = id + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + attr_accessor :behavior + # The time after which the subscription will resume collecting payments. + attr_accessor :resumes_at + + def initialize(behavior: nil, resumes_at: nil) + super + @behavior = behavior + @resumes_at = resumes_at + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + + def initialize(amount: nil, amount_type: nil, description: nil) + super + @amount = amount + @amount_type = amount_type + @description = description + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil) + super + @mandate_options = mandate_options + @network = network + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + attr_accessor :save_default_payment_method + + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ) + super + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @save_default_payment_method = save_default_payment_method + end + end + + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + attr_accessor :automatic_tax + # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # Details about why this subscription was cancelled + attr_accessor :cancellation_details + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + attr_accessor :pause_collection + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + attr_accessor :proration_date + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_from_plan + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancellation_details: nil, + collection_method: nil, + coupon: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + pause_collection: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + proration_date: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @billing_cycle_anchor = billing_cycle_anchor + @billing_thresholds = billing_thresholds + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @cancellation_details = cancellation_details + @collection_method = collection_method + @coupon = coupon + @days_until_due = days_until_due + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @invoice_settings = invoice_settings + @items = items + @metadata = metadata + @off_session = off_session + @on_behalf_of = on_behalf_of + @pause_collection = pause_collection + @payment_behavior = payment_behavior + @payment_settings = payment_settings + @pending_invoice_item_interval = pending_invoice_item_interval + @prebilling = prebilling + @promotion_code = promotion_code + @proration_behavior = proration_behavior + @proration_date = proration_date + @transfer_data = transfer_data + @trial_end = trial_end + @trial_from_plan = trial_from_plan + @trial_settings = trial_settings + end + end + + class DeleteDiscountParams < Stripe::RequestParams + end + + class ListParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CurrentPeriodEnd < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class CurrentPeriodStart < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Filter subscriptions by their automatic tax settings. + attr_accessor :automatic_tax + # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + attr_accessor :collection_method + # Only return subscriptions that were created during the given date interval. + attr_accessor :created + # Only return subscriptions whose current_period_end falls within the given date interval. + attr_accessor :current_period_end + # Only return subscriptions whose current_period_start falls within the given date interval. + attr_accessor :current_period_start + # The ID of the customer whose subscriptions will be retrieved. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The ID of the plan whose subscriptions will be retrieved. + attr_accessor :plan + # Filter for subscriptions that contain this recurring price ID. + attr_accessor :price + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. + attr_accessor :status + # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. + attr_accessor :test_clock + + def initialize( + automatic_tax: nil, + collection_method: nil, + created: nil, + current_period_end: nil, + current_period_start: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + plan: nil, + price: nil, + starting_after: nil, + status: nil, + test_clock: nil + ) + super + @automatic_tax = automatic_tax + @collection_method = collection_method + @created = created + @current_period_end = current_period_end + @current_period_start = current_period_start + @customer = customer + @ending_before = ending_before + @expand = expand + @limit = limit + @plan = plan + @price = price + @starting_after = starting_after + @status = status + @test_clock = test_clock + end + end + + class CreateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + # The coupons to redeem into discounts for the item. + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + attr_accessor :tax_rates + + def initialize(discounts: nil, price: nil, price_data: nil, quantity: nil, tax_rates: nil) + super + @discounts = discounts + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + end + end + + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + attr_accessor :liability + + def initialize(enabled: nil, liability: nil) + super + @enabled = enabled + @liability = liability + end + end + + class BillingCycleAnchorConfig < Stripe::RequestParams + # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31. + attr_accessor :day_of_month + # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23. + attr_accessor :hour + # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59. + attr_accessor :minute + # The month to start full cycle billing periods. Ranges from 1 to 12. + attr_accessor :month + # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. + attr_accessor :second + + def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil) + super + @day_of_month = day_of_month + @hour = hour + @minute = minute + @month = month + @second = second + end + end + + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + attr_accessor :reset_billing_cycle_anchor + + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil) + super + @amount_gte = amount_gte + @reset_billing_cycle_anchor = reset_billing_cycle_anchor + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + attr_accessor :account + # Type of the account referenced in the request. + attr_accessor :type + + def initialize(account: nil, type: nil) + super + @account = account + @type = type + end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + attr_accessor :issuer + + def initialize(account_tax_ids: nil, issuer: nil) + super + @account_tax_ids = account_tax_ids + @issuer = issuer + end + end + + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + attr_accessor :usage_gte + + def initialize(usage_gte: nil) + super + @usage_gte = usage_gte + end + end + + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Time span for the redeemed discount. + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + attr_accessor :type + + def initialize(duration: nil, timestamp: nil, type: nil) + super + @duration = duration + @timestamp = timestamp + @type = type + end + end + # ID of the coupon to create a new discount for. + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + attr_accessor :discount + # Details to determine how long the discount should be applied for. + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + attr_accessor :promotion_code + + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil) + super + @coupon = coupon + @discount = discount + @discount_end = discount_end + @promotion_code = promotion_code + end + end + + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of the product that this price will belong to. + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + attr_accessor :unit_amount_decimal + + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ) + super + @currency = currency + @product = product + @recurring = recurring + @tax_behavior = tax_behavior + @unit_amount = unit_amount + @unit_amount_decimal = unit_amount_decimal + end + end + + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + attr_accessor :converts_to + # Determines the type of trial for this item. + attr_accessor :type + + def initialize(converts_to: nil, type: nil) + super + @converts_to = converts_to + @type = type + end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Plan ID for this item, as a string. + attr_accessor :plan + # The ID of the price object. + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + attr_accessor :price_data + # Quantity for this item. + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + attr_accessor :tax_rates + # Define options to configure the trial on the subscription item. + attr_accessor :trial + + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ) + super + @billing_thresholds = billing_thresholds + @discounts = discounts + @metadata = metadata + @plan = plan + @price = price + @price_data = price_data + @quantity = quantity + @tax_rates = tax_rates + @trial = trial + end + end + + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + attr_accessor :transaction_type + + def initialize(transaction_type: nil) + super + @transaction_type = transaction_type + end + end + # Additional fields for Mandate creation + attr_accessor :mandate_options + # Verification method for the intent + attr_accessor :verification_method + + def initialize(mandate_options: nil, verification_method: nil) + super + @mandate_options = mandate_options + @verification_method = verification_method + end + end + + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + attr_accessor :preferred_language + + def initialize(preferred_language: nil) + super + @preferred_language = preferred_language + end + end + + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + attr_accessor :description + + def initialize(amount: nil, amount_type: nil, description: nil) + super + @amount = amount + @amount_type = amount_type + @description = description + end + end + # Configuration options for setting up an eMandate for cards issued in India. + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + attr_accessor :request_three_d_secure + + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil) + super + @mandate_options = mandate_options + @network = network + @request_three_d_secure = request_three_d_secure + end + end + + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + # Configuration for eu_bank_transfer funding type. + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + attr_accessor :type + + def initialize(eu_bank_transfer: nil, type: nil) + super + @eu_bank_transfer = eu_bank_transfer + @type = type + end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + attr_accessor :funding_type + + def initialize(bank_transfer: nil, funding_type: nil) + super + @bank_transfer = bank_transfer + @funding_type = funding_type + end + end + + class IdBankTransfer < Stripe::RequestParams + end + + class Konbini < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + attr_accessor :institution + + def initialize(account_subcategories: nil, institution: nil) + super + @account_subcategories = account_subcategories + @institution = institution + end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + attr_accessor :prefetch + + def initialize(filters: nil, permissions: nil, prefetch: nil) + super + @filters = filters + @permissions = permissions + @prefetch = prefetch + end + end + # Additional fields for Financial Connections Session creation + attr_accessor :financial_connections + # Verification method for the intent + attr_accessor :verification_method + + def initialize(financial_connections: nil, verification_method: nil) + super + @financial_connections = financial_connections + @verification_method = verification_method + end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + attr_accessor :us_bank_account + + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ) + super + @acss_debit = acss_debit + @bancontact = bancontact + @card = card + @customer_balance = customer_balance + @id_bank_transfer = id_bank_transfer + @konbini = konbini + @sepa_debit = sepa_debit + @us_bank_account = us_bank_account + end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + attr_accessor :save_default_payment_method + + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ) + super + @payment_method_options = payment_method_options + @payment_method_types = payment_method_types + @save_default_payment_method = save_default_payment_method + end + end + + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + attr_accessor :interval_count + + def initialize(interval: nil, interval_count: nil) + super + @interval = interval + @interval_count = interval_count + end + end + + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + attr_accessor :update_behavior + + def initialize(iterations: nil, update_behavior: nil) + super + @iterations = iterations + @update_behavior = update_behavior + end + end + + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + attr_accessor :destination + + def initialize(amount_percent: nil, destination: nil) + super + @amount_percent = amount_percent + @destination = destination + end + end + + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + attr_accessor :missing_payment_method + + def initialize(missing_payment_method: nil) + super + @missing_payment_method = missing_payment_method + end + end + # Defines how the subscription should behave when the user's free trial ends. + attr_accessor :end_behavior + + def initialize(end_behavior: nil) + super + @end_behavior = end_behavior + end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + attr_accessor :automatic_tax + # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + attr_accessor :backdate_start_date + # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. + attr_accessor :billing_cycle_anchor + # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. + attr_accessor :billing_cycle_anchor_config + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + attr_accessor :cancel_at_period_end + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The identifier of the customer to subscribe. + attr_accessor :customer + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # All invoices will be billed using the specified settings. + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + attr_accessor :on_behalf_of + # Only applies to subscriptions with `collection_method=charge_automatically`. + # + # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + # + # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. + # + # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_from_plan + # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + attr_accessor :trial_period_days + # Settings related to subscription trials. + attr_accessor :trial_settings + + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + backdate_start_date: nil, + billing_cycle_anchor: nil, + billing_cycle_anchor_config: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + collection_method: nil, + coupon: nil, + currency: nil, + customer: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_period_days: nil, + trial_settings: nil + ) + super + @add_invoice_items = add_invoice_items + @application_fee_percent = application_fee_percent + @automatic_tax = automatic_tax + @backdate_start_date = backdate_start_date + @billing_cycle_anchor = billing_cycle_anchor + @billing_cycle_anchor_config = billing_cycle_anchor_config + @billing_thresholds = billing_thresholds + @cancel_at = cancel_at + @cancel_at_period_end = cancel_at_period_end + @collection_method = collection_method + @coupon = coupon + @currency = currency + @customer = customer + @days_until_due = days_until_due + @default_payment_method = default_payment_method + @default_source = default_source + @default_tax_rates = default_tax_rates + @description = description + @discounts = discounts + @expand = expand + @invoice_settings = invoice_settings + @items = items + @metadata = metadata + @off_session = off_session + @on_behalf_of = on_behalf_of + @payment_behavior = payment_behavior + @payment_settings = payment_settings + @pending_invoice_item_interval = pending_invoice_item_interval + @prebilling = prebilling + @promotion_code = promotion_code + @proration_behavior = proration_behavior + @transfer_data = transfer_data + @trial_end = trial_end + @trial_from_plan = trial_from_plan + @trial_period_days = trial_period_days + @trial_settings = trial_settings + end + end + + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + attr_accessor :query + + def initialize(expand: nil, limit: nil, page: nil, query: nil) + super + @expand = expand + @limit = limit + @page = page + @query = query + end + end + + class ResumeParams < Stripe::RequestParams + # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + attr_accessor :billing_cycle_anchor + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + attr_accessor :proration_date + + def initialize( + billing_cycle_anchor: nil, + expand: nil, + proration_behavior: nil, + proration_date: nil + ) + super + @billing_cycle_anchor = billing_cycle_anchor + @expand = expand + @proration_behavior = proration_behavior + @proration_date = proration_date + end + end + # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). # # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. diff --git a/lib/stripe/services/tax/association_service.rb b/lib/stripe/services/tax/association_service.rb index ac108b3aa..8d32bb624 100644 --- a/lib/stripe/services/tax/association_service.rb +++ b/lib/stripe/services/tax/association_service.rb @@ -4,6 +4,19 @@ module Stripe module Tax class AssociationService < StripeService + class FindParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id + attr_accessor :payment_intent + + def initialize(expand: nil, payment_intent: nil) + super + @expand = expand + @payment_intent = payment_intent + end + end + # Finds a tax association object by PaymentIntent id. def find(params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/calculation_line_item_service.rb b/lib/stripe/services/tax/calculation_line_item_service.rb index 20163218a..d4b278eb2 100644 --- a/lib/stripe/services/tax/calculation_line_item_service.rb +++ b/lib/stripe/services/tax/calculation_line_item_service.rb @@ -4,6 +4,25 @@ module Stripe module Tax class CalculationLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. def list(calculation, params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/calculation_service.rb b/lib/stripe/services/tax/calculation_service.rb index 783b3ba4a..da50ec23e 100644 --- a/lib/stripe/services/tax/calculation_service.rb +++ b/lib/stripe/services/tax/calculation_service.rb @@ -11,6 +11,220 @@ def initialize(requestor) @line_items = Stripe::Tax::CalculationLineItemService.new(@requestor) end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(type: nil, value: nil) + super + @type = type + @value = value + end + end + # The customer's postal address (for example, home or business location). + attr_accessor :address + # The type of customer address provided. + attr_accessor :address_source + # The customer's IP address (IPv4 or IPv6). + attr_accessor :ip_address + # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. + attr_accessor :tax_ids + # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. + attr_accessor :taxability_override + + def initialize( + address: nil, + address_source: nil, + ip_address: nil, + tax_ids: nil, + taxability_override: nil + ) + super + @address = address + @address_source = address_source + @ip_address = ip_address + @tax_ids = tax_ids + @taxability_override = taxability_override + end + end + + class LineItem < Stripe::RequestParams + # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + attr_accessor :amount + # If provided, the product's `tax_code` will be used as the line item's `tax_code`. + attr_accessor :product + # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. + attr_accessor :quantity + # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). + attr_accessor :reference + # Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. + attr_accessor :tax_code + + def initialize( + amount: nil, + product: nil, + quantity: nil, + reference: nil, + tax_behavior: nil, + tax_code: nil + ) + super + @amount = amount + @product = product + @quantity = quantity + @reference = reference + @tax_behavior = tax_behavior + @tax_code = tax_code + end + end + + class ShipFromDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The address from which the goods are being shipped from. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + + class ShippingCost < Stripe::RequestParams + # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + attr_accessor :amount + # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. + attr_accessor :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + attr_accessor :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. + attr_accessor :tax_code + + def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil) + super + @amount = amount + @shipping_rate = shipping_rate + @tax_behavior = tax_behavior + @tax_code = tax_code + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. + attr_accessor :customer + # Details about the customer, including address and tax IDs. + attr_accessor :customer_details + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A list of items the customer is purchasing. + attr_accessor :line_items + # Details about the address from which the goods are being shipped. + attr_accessor :ship_from_details + # Shipping cost details to be used for the calculation. + attr_accessor :shipping_cost + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + attr_accessor :tax_date + + def initialize( + currency: nil, + customer: nil, + customer_details: nil, + expand: nil, + line_items: nil, + ship_from_details: nil, + shipping_cost: nil, + tax_date: nil + ) + super + @currency = currency + @customer = customer + @customer_details = customer_details + @expand = expand + @line_items = line_items + @ship_from_details = ship_from_details + @shipping_cost = shipping_cost + @tax_date = tax_date + end + end + # Calculates tax based on the input and returns a Tax Calculation object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/form_service.rb b/lib/stripe/services/tax/form_service.rb index 025e98667..af4dd75d0 100644 --- a/lib/stripe/services/tax/form_service.rb +++ b/lib/stripe/services/tax/form_service.rb @@ -4,6 +4,73 @@ module Stripe module Tax class FormService < StripeService + class ListParams < Stripe::RequestParams + class Payee < Stripe::RequestParams + # The ID of the Stripe account whose forms will be retrieved. + attr_accessor :account + # The external reference to the payee whose forms will be retrieved. + attr_accessor :external_reference + # Specifies the payee type. Either `account` or `external_reference`. + attr_accessor :type + + def initialize(account: nil, external_reference: nil, type: nil) + super + @account = account + @external_reference = external_reference + @type = type + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The payee whose volume is represented on the tax form. + attr_accessor :payee + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. + attr_accessor :type + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + payee: nil, + starting_after: nil, + type: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @payee = payee + @starting_after = starting_after + @type = type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. def list(params = {}, opts = {}) request(method: :get, path: "/v1/tax/forms", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/tax/registration_service.rb b/lib/stripe/services/tax/registration_service.rb index 205c4f378..3b9375d61 100644 --- a/lib/stripe/services/tax/registration_service.rb +++ b/lib/stripe/services/tax/registration_service.rb @@ -4,6 +4,1399 @@ module Stripe module Tax class RegistrationService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # The status of the Tax Registration. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class CountryOptions < Stripe::RequestParams + class Ae < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class At < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Au < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Be < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Bg < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Bh < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class By < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ca < Stripe::RequestParams + class ProvinceStandard < Stripe::RequestParams + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + attr_accessor :province + + def initialize(province: nil) + super + @province = province + end + end + # Options for the provincial tax registration. + attr_accessor :province_standard + # Type of registration to be created in Canada. + attr_accessor :type + + def initialize(province_standard: nil, type: nil) + super + @province_standard = province_standard + @type = type + end + end + + class Ch < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Cl < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Co < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Cr < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Cy < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Cz < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class De < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Dk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Ec < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ee < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Eg < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Es < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Fi < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Fr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Gb < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ge < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Gr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Hr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Hu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Id < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ie < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Is < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class It < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Jp < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ke < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Kr < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Kz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Lt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Lu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Lv < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Ma < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Md < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Mt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Mx < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class My < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ng < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Nl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class No < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Nz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Om < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Pl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Pt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Ro < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Rs < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Ru < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Sa < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Se < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Sg < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Si < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Sk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + attr_accessor :place_of_supply_scheme + + def initialize(place_of_supply_scheme: nil) + super + @place_of_supply_scheme = place_of_supply_scheme + end + end + # Options for the standard registration. + attr_accessor :standard + # Type of registration to be created in an EU country. + attr_accessor :type + + def initialize(standard: nil, type: nil) + super + @standard = standard + @type = type + end + end + + class Th < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Tr < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Tz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Us < Stripe::RequestParams + class LocalAmusementTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). + attr_accessor :jurisdiction + + def initialize(jurisdiction: nil) + super + @jurisdiction = jurisdiction + end + end + + class LocalLeaseTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). + attr_accessor :jurisdiction + + def initialize(jurisdiction: nil) + super + @jurisdiction = jurisdiction + end + end + + class StateSalesTax < Stripe::RequestParams + class Election < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + attr_accessor :jurisdiction + # The type of the election for the state sales tax registration. + attr_accessor :type + + def initialize(jurisdiction: nil, type: nil) + super + @jurisdiction = jurisdiction + @type = type + end + end + # Elections for the state sales tax registration. + attr_accessor :elections + + def initialize(elections: nil) + super + @elections = elections + end + end + # Options for the local amusement tax registration. + attr_accessor :local_amusement_tax + # Options for the local lease tax registration. + attr_accessor :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + attr_accessor :state + # Options for the state sales tax registration. + attr_accessor :state_sales_tax + # Type of registration to be created in the US. + attr_accessor :type + + def initialize( + local_amusement_tax: nil, + local_lease_tax: nil, + state: nil, + state_sales_tax: nil, + type: nil + ) + super + @local_amusement_tax = local_amusement_tax + @local_lease_tax = local_lease_tax + @state = state + @state_sales_tax = state_sales_tax + @type = type + end + end + + class Uz < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Vn < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + + class Za < Stripe::RequestParams + # Type of registration to be created in `country`. + attr_accessor :type + + def initialize(type: nil) + super + @type = type + end + end + # Options for the registration in AE. + attr_accessor :ae + # Options for the registration in AT. + attr_accessor :at + # Options for the registration in AU. + attr_accessor :au + # Options for the registration in BE. + attr_accessor :be + # Options for the registration in BG. + attr_accessor :bg + # Options for the registration in BH. + attr_accessor :bh + # Options for the registration in BY. + attr_accessor :by + # Options for the registration in CA. + attr_accessor :ca + # Options for the registration in CH. + attr_accessor :ch + # Options for the registration in CL. + attr_accessor :cl + # Options for the registration in CO. + attr_accessor :co + # Options for the registration in CR. + attr_accessor :cr + # Options for the registration in CY. + attr_accessor :cy + # Options for the registration in CZ. + attr_accessor :cz + # Options for the registration in DE. + attr_accessor :de + # Options for the registration in DK. + attr_accessor :dk + # Options for the registration in EC. + attr_accessor :ec + # Options for the registration in EE. + attr_accessor :ee + # Options for the registration in EG. + attr_accessor :eg + # Options for the registration in ES. + attr_accessor :es + # Options for the registration in FI. + attr_accessor :fi + # Options for the registration in FR. + attr_accessor :fr + # Options for the registration in GB. + attr_accessor :gb + # Options for the registration in GE. + attr_accessor :ge + # Options for the registration in GR. + attr_accessor :gr + # Options for the registration in HR. + attr_accessor :hr + # Options for the registration in HU. + attr_accessor :hu + # Options for the registration in ID. + attr_accessor :id + # Options for the registration in IE. + attr_accessor :ie + # Options for the registration in IS. + attr_accessor :is + # Options for the registration in IT. + attr_accessor :it + # Options for the registration in JP. + attr_accessor :jp + # Options for the registration in KE. + attr_accessor :ke + # Options for the registration in KR. + attr_accessor :kr + # Options for the registration in KZ. + attr_accessor :kz + # Options for the registration in LT. + attr_accessor :lt + # Options for the registration in LU. + attr_accessor :lu + # Options for the registration in LV. + attr_accessor :lv + # Options for the registration in MA. + attr_accessor :ma + # Options for the registration in MD. + attr_accessor :md + # Options for the registration in MT. + attr_accessor :mt + # Options for the registration in MX. + attr_accessor :mx + # Options for the registration in MY. + attr_accessor :my + # Options for the registration in NG. + attr_accessor :ng + # Options for the registration in NL. + attr_accessor :nl + # Options for the registration in NO. + attr_accessor :no + # Options for the registration in NZ. + attr_accessor :nz + # Options for the registration in OM. + attr_accessor :om + # Options for the registration in PL. + attr_accessor :pl + # Options for the registration in PT. + attr_accessor :pt + # Options for the registration in RO. + attr_accessor :ro + # Options for the registration in RS. + attr_accessor :rs + # Options for the registration in RU. + attr_accessor :ru + # Options for the registration in SA. + attr_accessor :sa + # Options for the registration in SE. + attr_accessor :se + # Options for the registration in SG. + attr_accessor :sg + # Options for the registration in SI. + attr_accessor :si + # Options for the registration in SK. + attr_accessor :sk + # Options for the registration in TH. + attr_accessor :th + # Options for the registration in TR. + attr_accessor :tr + # Options for the registration in TZ. + attr_accessor :tz + # Options for the registration in US. + attr_accessor :us + # Options for the registration in UZ. + attr_accessor :uz + # Options for the registration in VN. + attr_accessor :vn + # Options for the registration in ZA. + attr_accessor :za + + def initialize( + ae: nil, + at: nil, + au: nil, + be: nil, + bg: nil, + bh: nil, + by: nil, + ca: nil, + ch: nil, + cl: nil, + co: nil, + cr: nil, + cy: nil, + cz: nil, + de: nil, + dk: nil, + ec: nil, + ee: nil, + eg: nil, + es: nil, + fi: nil, + fr: nil, + gb: nil, + ge: nil, + gr: nil, + hr: nil, + hu: nil, + id: nil, + ie: nil, + is: nil, + it: nil, + jp: nil, + ke: nil, + kr: nil, + kz: nil, + lt: nil, + lu: nil, + lv: nil, + ma: nil, + md: nil, + mt: nil, + mx: nil, + my: nil, + ng: nil, + nl: nil, + no: nil, + nz: nil, + om: nil, + pl: nil, + pt: nil, + ro: nil, + rs: nil, + ru: nil, + sa: nil, + se: nil, + sg: nil, + si: nil, + sk: nil, + th: nil, + tr: nil, + tz: nil, + us: nil, + uz: nil, + vn: nil, + za: nil + ) + super + @ae = ae + @at = at + @au = au + @be = be + @bg = bg + @bh = bh + @by = by + @ca = ca + @ch = ch + @cl = cl + @co = co + @cr = cr + @cy = cy + @cz = cz + @de = de + @dk = dk + @ec = ec + @ee = ee + @eg = eg + @es = es + @fi = fi + @fr = fr + @gb = gb + @ge = ge + @gr = gr + @hr = hr + @hu = hu + @id = id + @ie = ie + @is = is + @it = it + @jp = jp + @ke = ke + @kr = kr + @kz = kz + @lt = lt + @lu = lu + @lv = lv + @ma = ma + @md = md + @mt = mt + @mx = mx + @my = my + @ng = ng + @nl = nl + @no = no + @nz = nz + @om = om + @pl = pl + @pt = pt + @ro = ro + @rs = rs + @ru = ru + @sa = sa + @se = se + @sg = sg + @si = si + @sk = sk + @th = th + @tr = tr + @tz = tz + @us = us + @uz = uz + @vn = vn + @za = za + end + end + # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. + attr_accessor :active_from + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Specific options for a registration in the specified `country`. + attr_accessor :country_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. + attr_accessor :expires_at + + def initialize( + active_from: nil, + country: nil, + country_options: nil, + expand: nil, + expires_at: nil + ) + super + @active_from = active_from + @country = country + @country_options = country_options + @expand = expand + @expires_at = expires_at + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + attr_accessor :active_from + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + attr_accessor :expires_at + + def initialize(active_from: nil, expand: nil, expires_at: nil) + super + @active_from = active_from + @expand = expand + @expires_at = expires_at + end + end + # Creates a new Tax Registration object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/settings_service.rb b/lib/stripe/services/tax/settings_service.rb index c0aea8601..6bb45df0c 100644 --- a/lib/stripe/services/tax/settings_service.rb +++ b/lib/stripe/services/tax/settings_service.rb @@ -4,6 +4,85 @@ module Stripe module Tax class SettingsService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Defaults < Stripe::RequestParams + # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + attr_accessor :tax_code + + def initialize(tax_behavior: nil, tax_code: nil) + super + @tax_behavior = tax_behavior + @tax_code = tax_code + end + end + + class HeadOffice < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The location of the business for tax purposes. + attr_accessor :address + + def initialize(address: nil) + super + @address = address + end + end + # Default configuration to be used on Stripe Tax calculations. + attr_accessor :defaults + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The place where your business is located. + attr_accessor :head_office + + def initialize(defaults: nil, expand: nil, head_office: nil) + super + @defaults = defaults + @expand = expand + @head_office = head_office + end + end + # Retrieves Tax Settings for a merchant. def retrieve(params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/transaction_line_item_service.rb b/lib/stripe/services/tax/transaction_line_item_service.rb index e3372f8a7..a3ef2ce22 100644 --- a/lib/stripe/services/tax/transaction_line_item_service.rb +++ b/lib/stripe/services/tax/transaction_line_item_service.rb @@ -4,6 +4,25 @@ module Stripe module Tax class TransactionLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + # Retrieves the line items of a committed standalone transaction as a collection. def list(transaction, params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax/transaction_service.rb b/lib/stripe/services/tax/transaction_service.rb index 283044ecf..16ca5f1ef 100644 --- a/lib/stripe/services/tax/transaction_service.rb +++ b/lib/stripe/services/tax/transaction_service.rb @@ -11,6 +11,122 @@ def initialize(requestor) @line_items = Stripe::Tax::TransactionLineItemService.new(@requestor) end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateFromCalculationParams < Stripe::RequestParams + # Tax Calculation ID to be used as input when creating the transaction. + attr_accessor :calculation + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. + attr_accessor :posted_at + # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. + attr_accessor :reference + + def initialize(calculation: nil, expand: nil, metadata: nil, posted_at: nil, reference: nil) + super + @calculation = calculation + @expand = expand + @metadata = metadata + @posted_at = posted_at + @reference = reference + end + end + + class CreateReversalParams < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount_tax + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + attr_accessor :metadata + # The `id` of the line item to reverse in the original transaction. + attr_accessor :original_line_item + # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. + attr_accessor :quantity + # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. + attr_accessor :reference + + def initialize( + amount: nil, + amount_tax: nil, + metadata: nil, + original_line_item: nil, + quantity: nil, + reference: nil + ) + super + @amount = amount + @amount_tax = amount_tax + @metadata = metadata + @original_line_item = original_line_item + @quantity = quantity + @reference = reference + end + end + + class ShippingCost < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + attr_accessor :amount_tax + + def initialize(amount: nil, amount_tax: nil) + super + @amount = amount + @amount_tax = amount_tax + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. + attr_accessor :flat_amount + # The line item amounts to reverse. + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. + attr_accessor :mode + # The ID of the Transaction to partially or fully reverse. + attr_accessor :original_transaction + # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). + attr_accessor :reference + # The shipping cost to reverse. + attr_accessor :shipping_cost + + def initialize( + expand: nil, + flat_amount: nil, + line_items: nil, + metadata: nil, + mode: nil, + original_transaction: nil, + reference: nil, + shipping_cost: nil + ) + super + @expand = expand + @flat_amount = flat_amount + @line_items = line_items + @metadata = metadata + @mode = mode + @original_transaction = original_transaction + @reference = reference + @shipping_cost = shipping_cost + end + end + # Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. def create_from_calculation(params = {}, opts = {}) request( diff --git a/lib/stripe/services/tax_code_service.rb b/lib/stripe/services/tax_code_service.rb index 03b3480d0..ac52e6ee9 100644 --- a/lib/stripe/services/tax_code_service.rb +++ b/lib/stripe/services/tax_code_service.rb @@ -3,6 +3,35 @@ module Stripe class TaxCodeService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. def list(params = {}, opts = {}) request(method: :get, path: "/v1/tax_codes", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/tax_id_service.rb b/lib/stripe/services/tax_id_service.rb index 9a7922542..6acb64685 100644 --- a/lib/stripe/services/tax_id_service.rb +++ b/lib/stripe/services/tax_id_service.rb @@ -3,6 +3,90 @@ module Stripe class TaxIdService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + attr_accessor :customer + # Type of owner referenced. + attr_accessor :type + + def initialize(account: nil, customer: nil, type: nil) + super + @account = account + @customer = customer + @type = type + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + attr_accessor :owner + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, owner: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @owner = owner + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + attr_accessor :customer + # Type of owner referenced. + attr_accessor :type + + def initialize(account: nil, customer: nil, type: nil) + super + @account = account + @customer = customer + @type = type + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + attr_accessor :owner + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + attr_accessor :type + # Value of the tax ID. + attr_accessor :value + + def initialize(expand: nil, owner: nil, type: nil, value: nil) + super + @expand = expand + @owner = owner + @type = type + @value = value + end + end + # Creates a new account or customer tax_id object. def create(params = {}, opts = {}) request(method: :post, path: "/v1/tax_ids", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/tax_rate_service.rb b/lib/stripe/services/tax_rate_service.rb index a586bcb1e..cb5aedf76 100644 --- a/lib/stripe/services/tax_rate_service.rb +++ b/lib/stripe/services/tax_rate_service.rb @@ -3,6 +3,166 @@ module Stripe class TaxRateService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Optional flag to filter by tax rates that are either active or inactive (archived). + attr_accessor :active + # Optional range for filtering created date. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + attr_accessor :inclusive + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + inclusive: nil, + limit: nil, + starting_after: nil + ) + super + @active = active + @created = created + @ending_before = ending_before + @expand = expand + @inclusive = inclusive + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # This specifies if the tax rate is inclusive or exclusive. + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # This represents the tax rate percent out of 100. + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + inclusive: nil, + jurisdiction: nil, + metadata: nil, + percentage: nil, + state: nil, + tax_type: nil + ) + super + @active = active + @country = country + @description = description + @display_name = display_name + @expand = expand + @inclusive = inclusive + @jurisdiction = jurisdiction + @metadata = metadata + @percentage = percentage + @state = state + @tax_type = tax_type + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + attr_accessor :tax_type + + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + jurisdiction: nil, + metadata: nil, + state: nil, + tax_type: nil + ) + super + @active = active + @country = country + @description = description + @display_name = display_name + @expand = expand + @jurisdiction = jurisdiction + @metadata = metadata + @state = state + @tax_type = tax_type + end + end + # Creates a new tax rate. def create(params = {}, opts = {}) request(method: :post, path: "/v1/tax_rates", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/terminal/configuration_service.rb b/lib/stripe/services/terminal/configuration_service.rb index 3329ef177..3694ae3cb 100644 --- a/lib/stripe/services/terminal/configuration_service.rb +++ b/lib/stripe/services/terminal/configuration_service.rb @@ -4,6 +4,845 @@ module Stripe module Terminal class ConfigurationService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + attr_accessor :start_hour + + def initialize(end_hour: nil, start_hour: nil) + super + @end_hour = end_hour + @start_hour = start_hour + end + end + + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + # Tipping configuration for AUD + attr_accessor :aud + # Tipping configuration for CAD + attr_accessor :cad + # Tipping configuration for CHF + attr_accessor :chf + # Tipping configuration for CZK + attr_accessor :czk + # Tipping configuration for DKK + attr_accessor :dkk + # Tipping configuration for EUR + attr_accessor :eur + # Tipping configuration for GBP + attr_accessor :gbp + # Tipping configuration for HKD + attr_accessor :hkd + # Tipping configuration for MYR + attr_accessor :myr + # Tipping configuration for NOK + attr_accessor :nok + # Tipping configuration for NZD + attr_accessor :nzd + # Tipping configuration for PLN + attr_accessor :pln + # Tipping configuration for SEK + attr_accessor :sek + # Tipping configuration for SGD + attr_accessor :sgd + # Tipping configuration for USD + attr_accessor :usd + + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ) + super + @aud = aud + @cad = cad + @chf = chf + @czk = czk + @dkk = dkk + @eur = eur + @gbp = gbp + @hkd = hkd + @myr = myr + @nok = nok + @nzd = nzd + @pln = pln + @sek = sek + @sgd = sgd + @usd = usd + end + end + + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Name of the configuration + attr_accessor :name + # Configurations for collecting transactions offline. + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + attr_accessor :verifone_p400 + + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ) + super + @bbpos_wisepos_e = bbpos_wisepos_e + @expand = expand + @name = name + @offline = offline + @reboot_window = reboot_window + @stripe_s700 = stripe_s700 + @tipping = tipping + @verifone_p400 = verifone_p400 + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # if present, only return the account default or non-default configurations. + attr_accessor :is_account_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize( + ending_before: nil, + expand: nil, + is_account_default: nil, + limit: nil, + starting_after: nil + ) + super + @ending_before = ending_before + @expand = expand + @is_account_default = is_account_default + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + attr_accessor :enabled + + def initialize(enabled: nil) + super + @enabled = enabled + end + end + + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + attr_accessor :start_hour + + def initialize(end_hour: nil, start_hour: nil) + super + @end_hour = end_hour + @start_hour = start_hour + end + end + + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + attr_accessor :smart_tip_threshold + + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil) + super + @fixed_amounts = fixed_amounts + @percentages = percentages + @smart_tip_threshold = smart_tip_threshold + end + end + # Tipping configuration for AUD + attr_accessor :aud + # Tipping configuration for CAD + attr_accessor :cad + # Tipping configuration for CHF + attr_accessor :chf + # Tipping configuration for CZK + attr_accessor :czk + # Tipping configuration for DKK + attr_accessor :dkk + # Tipping configuration for EUR + attr_accessor :eur + # Tipping configuration for GBP + attr_accessor :gbp + # Tipping configuration for HKD + attr_accessor :hkd + # Tipping configuration for MYR + attr_accessor :myr + # Tipping configuration for NOK + attr_accessor :nok + # Tipping configuration for NZD + attr_accessor :nzd + # Tipping configuration for PLN + attr_accessor :pln + # Tipping configuration for SEK + attr_accessor :sek + # Tipping configuration for SGD + attr_accessor :sgd + # Tipping configuration for USD + attr_accessor :usd + + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ) + super + @aud = aud + @cad = cad + @chf = chf + @czk = czk + @dkk = dkk + @eur = eur + @gbp = gbp + @hkd = hkd + @myr = myr + @nok = nok + @nzd = nzd + @pln = pln + @sek = sek + @sgd = sgd + @usd = usd + end + end + + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + attr_accessor :splashscreen + + def initialize(splashscreen: nil) + super + @splashscreen = splashscreen + end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Name of the configuration + attr_accessor :name + # Configurations for collecting transactions offline. + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + attr_accessor :verifone_p400 + + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ) + super + @bbpos_wisepos_e = bbpos_wisepos_e + @expand = expand + @name = name + @offline = offline + @reboot_window = reboot_window + @stripe_s700 = stripe_s700 + @tipping = tipping + @verifone_p400 = verifone_p400 + end + end + # Creates a new Configuration object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/terminal/connection_token_service.rb b/lib/stripe/services/terminal/connection_token_service.rb index f3978c4b5..07874b244 100644 --- a/lib/stripe/services/terminal/connection_token_service.rb +++ b/lib/stripe/services/terminal/connection_token_service.rb @@ -4,6 +4,19 @@ module Stripe module Terminal class ConnectionTokenService < StripeService + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + attr_accessor :location + + def initialize(expand: nil, location: nil) + super + @expand = expand + @location = location + end + end + # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/terminal/location_service.rb b/lib/stripe/services/terminal/location_service.rb index 0def76a76..82e1e0c2b 100644 --- a/lib/stripe/services/terminal/location_service.rb +++ b/lib/stripe/services/terminal/location_service.rb @@ -4,6 +4,156 @@ module Stripe module Terminal class LocationService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + attr_accessor :configuration_overrides + # A name for the location. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ) + super + @address = address + @configuration_overrides = configuration_overrides + @display_name = display_name + @expand = expand + @metadata = metadata + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # The full address of the location. + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + attr_accessor :configuration_overrides + # A name for the location. Maximum length is 1000 characters. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ) + super + @address = address + @configuration_overrides = configuration_overrides + @display_name = display_name + @expand = expand + @metadata = metadata + end + end + # Creates a new Location object. # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. def create(params = {}, opts = {}) diff --git a/lib/stripe/services/terminal/reader_collected_data_service.rb b/lib/stripe/services/terminal/reader_collected_data_service.rb index 65ff02ece..2419a500e 100644 --- a/lib/stripe/services/terminal/reader_collected_data_service.rb +++ b/lib/stripe/services/terminal/reader_collected_data_service.rb @@ -4,6 +4,16 @@ module Stripe module Terminal class ReaderCollectedDataService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieve data collected using Reader hardware. def retrieve(reader_collected_data, params = {}, opts = {}) request( diff --git a/lib/stripe/services/terminal/reader_service.rb b/lib/stripe/services/terminal/reader_service.rb index 25e2effbe..fe0083ef4 100644 --- a/lib/stripe/services/terminal/reader_service.rb +++ b/lib/stripe/services/terminal/reader_service.rb @@ -4,6 +4,441 @@ module Stripe module Terminal class ReaderService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The new label of the reader. + attr_accessor :label + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, label: nil, metadata: nil) + super + @expand = expand + @label = label + @metadata = metadata + end + end + + class ListParams < Stripe::RequestParams + # Filters readers by device type + attr_accessor :device_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A location ID to filter the response list to only readers at the specific location + attr_accessor :location + # Filters readers by serial number + attr_accessor :serial_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # A status filter to filter readers to only offline or online readers + attr_accessor :status + + def initialize( + device_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + location: nil, + serial_number: nil, + starting_after: nil, + status: nil + ) + super + @device_type = device_type + @ending_before = ending_before + @expand = expand + @limit = limit + @location = location + @serial_number = serial_number + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + attr_accessor :label + # The location to assign the reader to. + attr_accessor :location + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # A code generated by the reader used for registering to an account. + attr_accessor :registration_code + + def initialize( + expand: nil, + label: nil, + location: nil, + metadata: nil, + registration_code: nil + ) + super + @expand = expand + @label = label + @location = location + @metadata = metadata + @registration_code = registration_code + end + end + + class CancelActionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CollectInputsParams < Stripe::RequestParams + class Input < Stripe::RequestParams + class CustomText < Stripe::RequestParams + # The description which will be displayed when collecting this input + attr_accessor :description + # The skip button text + attr_accessor :skip_button + # The submit button text + attr_accessor :submit_button + # The title which will be displayed when collecting this input + attr_accessor :title + + def initialize(description: nil, skip_button: nil, submit_button: nil, title: nil) + super + @description = description + @skip_button = skip_button + @submit_button = submit_button + @title = title + end + end + + class Selection < Stripe::RequestParams + class Choice < Stripe::RequestParams + # The style of the button which will be shown for this choice + attr_accessor :style + # The text which will be shown on the button for this choice + attr_accessor :value + + def initialize(style: nil, value: nil) + super + @style = style + @value = value + end + end + # List of choices for the `selection` input + attr_accessor :choices + + def initialize(choices: nil) + super + @choices = choices + end + end + + class Toggle < Stripe::RequestParams + # The default value of the toggle + attr_accessor :default_value + # The description which will be displayed for the toggle + attr_accessor :description + # The title which will be displayed for the toggle + attr_accessor :title + + def initialize(default_value: nil, description: nil, title: nil) + super + @default_value = default_value + @description = description + @title = title + end + end + # Customize the text which will be displayed while collecting this input + attr_accessor :custom_text + # Indicate that this input is required, disabling the skip button + attr_accessor :required + # Options for the `selection` input + attr_accessor :selection + # List of toggles to be displayed and customization for the toggles + attr_accessor :toggles + # The type of input to collect + attr_accessor :type + + def initialize(custom_text: nil, required: nil, selection: nil, toggles: nil, type: nil) + super + @custom_text = custom_text + @required = required + @selection = selection + @toggles = toggles + @type = type + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # List of inputs to be collected using the Reader + attr_accessor :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, inputs: nil, metadata: nil) + super + @expand = expand + @inputs = inputs + @metadata = metadata + end + end + + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_accessor :amount_eligible + + def initialize(amount_eligible: nil) + super + @amount_eligible = amount_eligible + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + attr_accessor :tipping + + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ) + super + @allow_redisplay = allow_redisplay + @enable_customer_cancellation = enable_customer_cancellation + @skip_tipping = skip_tipping + @tipping = tipping + end + end + # Configuration overrides + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID + attr_accessor :payment_intent + + def initialize(collect_config: nil, expand: nil, payment_intent: nil) + super + @collect_config = collect_config + @expand = expand + @payment_intent = payment_intent + end + end + + class ConfirmPaymentIntentParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID + attr_accessor :payment_intent + + def initialize(expand: nil, payment_intent: nil) + super + @expand = expand + @payment_intent = payment_intent + end + end + + class ProcessPaymentIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + attr_accessor :amount_eligible + + def initialize(amount_eligible: nil) + super + @amount_eligible = amount_eligible + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + attr_accessor :tipping + + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ) + super + @allow_redisplay = allow_redisplay + @enable_customer_cancellation = enable_customer_cancellation + @skip_tipping = skip_tipping + @tipping = tipping + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # PaymentIntent ID + attr_accessor :payment_intent + # Configuration overrides + attr_accessor :process_config + + def initialize(expand: nil, payment_intent: nil, process_config: nil) + super + @expand = expand + @payment_intent = payment_intent + @process_config = process_config + end + end + + class ProcessSetupIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + + def initialize(enable_customer_cancellation: nil) + super + @enable_customer_cancellation = enable_customer_cancellation + end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + attr_accessor :allow_redisplay + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Configuration overrides + attr_accessor :process_config + # SetupIntent ID + attr_accessor :setup_intent + + def initialize(allow_redisplay: nil, expand: nil, process_config: nil, setup_intent: nil) + super + @allow_redisplay = allow_redisplay + @expand = expand + @process_config = process_config + @setup_intent = setup_intent + end + end + + class RefundPaymentParams < Stripe::RequestParams + class RefundPaymentConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + attr_accessor :enable_customer_cancellation + + def initialize(enable_customer_cancellation: nil) + super + @enable_customer_cancellation = enable_customer_cancellation + end + end + # A positive integer in __cents__ representing how much of this charge to refund. + attr_accessor :amount + # ID of the Charge to refund. + attr_accessor :charge + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # ID of the PaymentIntent to refund. + attr_accessor :payment_intent + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + attr_accessor :refund_application_fee + # Configuration overrides + attr_accessor :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + attr_accessor :reverse_transfer + + def initialize( + amount: nil, + charge: nil, + expand: nil, + metadata: nil, + payment_intent: nil, + refund_application_fee: nil, + refund_payment_config: nil, + reverse_transfer: nil + ) + super + @amount = amount + @charge = charge + @expand = expand + @metadata = metadata + @payment_intent = payment_intent + @refund_application_fee = refund_application_fee + @refund_payment_config = refund_payment_config + @reverse_transfer = reverse_transfer + end + end + + class SetReaderDisplayParams < Stripe::RequestParams + class Cart < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The price of the item in cents. + attr_accessor :amount + # The description or name of the item. + attr_accessor :description + # The quantity of the line item being purchased. + attr_accessor :quantity + + def initialize(amount: nil, description: nil, quantity: nil) + super + @amount = amount + @description = description + @quantity = quantity + end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Array of line items that were purchased. + attr_accessor :line_items + # The amount of tax in cents. + attr_accessor :tax + # Total balance of cart due in cents. + attr_accessor :total + + def initialize(currency: nil, line_items: nil, tax: nil, total: nil) + super + @currency = currency + @line_items = line_items + @tax = tax + @total = total + end + end + # Cart + attr_accessor :cart + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Type + attr_accessor :type + + def initialize(cart: nil, expand: nil, type: nil) + super + @cart = cart + @expand = expand + @type = type + end + end + # Cancels the current reader action. def cancel_action(reader, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/confirmation_token_service.rb b/lib/stripe/services/test_helpers/confirmation_token_service.rb index 716817ad8..d4dee6d6a 100644 --- a/lib/stripe/services/test_helpers/confirmation_token_service.rb +++ b/lib/stripe/services/test_helpers/confirmation_token_service.rb @@ -4,6 +4,704 @@ module Stripe module TestHelpers class ConfirmationTokenService < StripeService + class CreateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + attr_accessor :account_number + # Institution number of the customer's bank. + attr_accessor :institution_number + # Transit number of the customer's bank. + attr_accessor :transit_number + + def initialize(account_number: nil, institution_number: nil, transit_number: nil) + super + @account_number = account_number + @institution_number = institution_number + @transit_number = transit_number + end + end + + class Affirm < Stripe::RequestParams + end + + class AfterpayClearpay < Stripe::RequestParams + end + + class Alipay < Stripe::RequestParams + end + + class Alma < Stripe::RequestParams + end + + class AmazonPay < Stripe::RequestParams + end + + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + + def initialize(account_number: nil, bsb_number: nil) + super + @account_number = account_number + @bsb_number = bsb_number + end + end + + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + attr_accessor :sort_code + + def initialize(account_number: nil, sort_code: nil) + super + @account_number = account_number + @sort_code = sort_code + end + end + + class Bancontact < Stripe::RequestParams + end + + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class Blik < Stripe::RequestParams + end + + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + attr_accessor :tax_id + + def initialize(tax_id: nil) + super + @tax_id = tax_id + end + end + + class Cashapp < Stripe::RequestParams + end + + class CustomerBalance < Stripe::RequestParams + end + + class Eps < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + attr_accessor :account_holder_type + # The customer's bank. + attr_accessor :bank + + def initialize(account_holder_type: nil, bank: nil) + super + @account_holder_type = account_holder_type + @bank = bank + end + end + + class Giropay < Stripe::RequestParams + end + + class Gopay < Stripe::RequestParams + end + + class Grabpay < Stripe::RequestParams + end + + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class InteracPresent < Stripe::RequestParams + end + + class KakaoPay < Stripe::RequestParams + end + + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class Konbini < Stripe::RequestParams + end + + class KrCard < Stripe::RequestParams + end + + class Link < Stripe::RequestParams + end + + class MbWay < Stripe::RequestParams + end + + class Mobilepay < Stripe::RequestParams + end + + class Multibanco < Stripe::RequestParams + end + + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + attr_accessor :funding + + def initialize(funding: nil) + super + @funding = funding + end + end + + class Oxxo < Stripe::RequestParams + end + + class P24 < Stripe::RequestParams + # The customer's bank. + attr_accessor :bank + + def initialize(bank: nil) + super + @bank = bank + end + end + + class Payco < Stripe::RequestParams + end + + class Paynow < Stripe::RequestParams + end + + class Paypal < Stripe::RequestParams + end + + class Payto < Stripe::RequestParams + # The account number for the bank account. + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + attr_accessor :bsb_number + # The PayID alias for the bank account. + attr_accessor :pay_id + + def initialize(account_number: nil, bsb_number: nil, pay_id: nil) + super + @account_number = account_number + @bsb_number = bsb_number + @pay_id = pay_id + end + end + + class Pix < Stripe::RequestParams + end + + class Promptpay < Stripe::RequestParams + end + + class Qris < Stripe::RequestParams + end + + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + attr_accessor :session + + def initialize(session: nil) + super + @session = session + end + end + + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + # Customer's date of birth + attr_accessor :dob + + def initialize(dob: nil) + super + @dob = dob + end + end + + class RevolutPay < Stripe::RequestParams + end + + class SamsungPay < Stripe::RequestParams + end + + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + attr_accessor :iban + + def initialize(iban: nil) + super + @iban = iban + end + end + + class Shopeepay < Stripe::RequestParams + end + + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + attr_accessor :country + + def initialize(country: nil) + super + @country = country + end + end + + class Swish < Stripe::RequestParams + end + + class Twint < Stripe::RequestParams + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + + class WechatPay < Stripe::RequestParams + end + + class Zip < Stripe::RequestParams + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + attr_accessor :zip + + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ) + super + @acss_debit = acss_debit + @affirm = affirm + @afterpay_clearpay = afterpay_clearpay + @alipay = alipay + @allow_redisplay = allow_redisplay + @alma = alma + @amazon_pay = amazon_pay + @au_becs_debit = au_becs_debit + @bacs_debit = bacs_debit + @bancontact = bancontact + @billing_details = billing_details + @blik = blik + @boleto = boleto + @cashapp = cashapp + @customer_balance = customer_balance + @eps = eps + @fpx = fpx + @giropay = giropay + @gopay = gopay + @grabpay = grabpay + @id_bank_transfer = id_bank_transfer + @ideal = ideal + @interac_present = interac_present + @kakao_pay = kakao_pay + @klarna = klarna + @konbini = konbini + @kr_card = kr_card + @link = link + @mb_way = mb_way + @metadata = metadata + @mobilepay = mobilepay + @multibanco = multibanco + @naver_pay = naver_pay + @oxxo = oxxo + @p24 = p24 + @payco = payco + @paynow = paynow + @paypal = paypal + @payto = payto + @pix = pix + @promptpay = promptpay + @qris = qris + @radar_options = radar_options + @rechnung = rechnung + @revolut_pay = revolut_pay + @samsung_pay = samsung_pay + @sepa_debit = sepa_debit + @shopeepay = shopeepay + @sofort = sofort + @swish = swish + @twint = twint + @type = type + @us_bank_account = us_bank_account + @wechat_pay = wechat_pay + @zip = zip + end + end + + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Shipping address + attr_accessor :address + # Recipient name. + attr_accessor :name + # Recipient phone (including extension) + attr_accessor :phone + + def initialize(address: nil, name: nil, phone: nil) + super + @address = address + @name = name + @phone = phone + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # ID of an existing PaymentMethod. + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. + attr_accessor :payment_method_data + # Return URL used to confirm the Intent. + attr_accessor :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. + # + # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + attr_accessor :setup_future_usage + # Shipping information for this ConfirmationToken. + attr_accessor :shipping + + def initialize( + expand: nil, + payment_method: nil, + payment_method_data: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil + ) + super + @expand = expand + @payment_method = payment_method + @payment_method_data = payment_method_data + @return_url = return_url + @setup_future_usage = setup_future_usage + @shipping = shipping + end + end + # Creates a test mode Confirmation Token server side for your integration tests. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/customer_service.rb b/lib/stripe/services/test_helpers/customer_service.rb index a79c77c48..cc94f3d3a 100644 --- a/lib/stripe/services/test_helpers/customer_service.rb +++ b/lib/stripe/services/test_helpers/customer_service.rb @@ -4,6 +4,25 @@ module Stripe module TestHelpers class CustomerService < StripeService + class FundCashBalanceParams < Stripe::RequestParams + # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + attr_accessor :reference + + def initialize(amount: nil, currency: nil, expand: nil, reference: nil) + super + @amount = amount + @currency = currency + @expand = expand + @reference = reference + end + end + # Create an incoming testmode bank transfer def fund_cash_balance(customer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/issuing/authorization_service.rb b/lib/stripe/services/test_helpers/issuing/authorization_service.rb index 45c620db9..89601dfca 100644 --- a/lib/stripe/services/test_helpers/issuing/authorization_service.rb +++ b/lib/stripe/services/test_helpers/issuing/authorization_service.rb @@ -5,6 +5,790 @@ module Stripe module TestHelpers module Issuing class AuthorizationService < StripeService + class CreateParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + # The ATM withdrawal fee. + attr_accessor :atm_fee + # The amount of cash requested by the cardholder. + attr_accessor :cashback_amount + + def initialize(atm_fee: nil, cashback_amount: nil) + super + @atm_fee = atm_fee + @cashback_amount = cashback_amount + end + end + + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_accessor :category + # City where the seller is located + attr_accessor :city + # Country where the seller is located + attr_accessor :country + # Name of the seller + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_accessor :network_id + # Postal code where the seller is located + attr_accessor :postal_code + # State where the seller is located + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + attr_accessor :url + + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ) + super + @category = category + @city = city + @country = country + @name = name + @network_id = network_id + @postal_code = postal_code + @state = state + @terminal_id = terminal_id + @url = url + end + end + + class NetworkData < Stripe::RequestParams + # Identifier assigned to the acquirer by the card network. + attr_accessor :acquiring_institution_id + + def initialize(acquiring_institution_id: nil) + super + @acquiring_institution_id = acquiring_institution_id + end + end + + class VerificationData < Stripe::RequestParams + class AuthenticationExemption < Stripe::RequestParams + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. + attr_accessor :claimed_by + # The specific exemption claimed for this authorization. + attr_accessor :type + + def initialize(claimed_by: nil, type: nil) + super + @claimed_by = claimed_by + @type = type + end + end + + class ThreeDSecure < Stripe::RequestParams + # The outcome of the 3D Secure authentication request. + attr_accessor :result + + def initialize(result: nil) + super + @result = result + end + end + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + attr_accessor :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + attr_accessor :address_postal_code_check + # The exemption applied to this authorization. + attr_accessor :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. + attr_accessor :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. + attr_accessor :expiry_check + # 3D Secure details. + attr_accessor :three_d_secure + + def initialize( + address_line1_check: nil, + address_postal_code_check: nil, + authentication_exemption: nil, + cvc_check: nil, + expiry_check: nil, + three_d_secure: nil + ) + super + @address_line1_check = address_line1_check + @address_postal_code_check = address_postal_code_check + @authentication_exemption = authentication_exemption + @cvc_check = cvc_check + @expiry_check = expiry_check + @three_d_secure = three_d_secure + end + end + # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount_details + # How the card details were provided. Defaults to online. + attr_accessor :authorization_method + # Card associated with this authorization. + attr_accessor :card + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Fleet-specific information for authorizations using Fleet cards. + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + attr_accessor :is_amount_controllable + # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :merchant_amount + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :merchant_currency + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + attr_accessor :merchant_data + # Details about the authorization, such as identifiers, set by the card network. + attr_accessor :network_data + # Verifications that Stripe performed on information that the cardholder provided to the merchant. + attr_accessor :verification_data + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + attr_accessor :wallet + + def initialize( + amount: nil, + amount_details: nil, + authorization_method: nil, + card: nil, + currency: nil, + expand: nil, + fleet: nil, + fuel: nil, + is_amount_controllable: nil, + merchant_amount: nil, + merchant_currency: nil, + merchant_data: nil, + network_data: nil, + verification_data: nil, + wallet: nil + ) + super + @amount = amount + @amount_details = amount_details + @authorization_method = authorization_method + @card = card + @currency = currency + @expand = expand + @fleet = fleet + @fuel = fuel + @is_amount_controllable = is_amount_controllable + @merchant_amount = merchant_amount + @merchant_currency = merchant_currency + @merchant_data = merchant_data + @network_data = network_data + @verification_data = verification_data + @wallet = wallet + end + end + + class CaptureParams < Stripe::RequestParams + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + attr_accessor :arrival_airport_code + # The airline carrier code. + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + attr_accessor :departure_airport_code + # The flight number. + attr_accessor :flight_number + # The flight's service class. + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + attr_accessor :stopover_allowed + + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ) + super + @arrival_airport_code = arrival_airport_code + @carrier = carrier + @departure_airport_code = departure_airport_code + @flight_number = flight_number + @service_class = service_class + @stopover_allowed = stopover_allowed + end + end + # The time that the flight departed. + attr_accessor :departure_at + # The name of the passenger. + attr_accessor :passenger_name + # Whether the ticket is refundable. + attr_accessor :refundable + # The legs of the trip. + attr_accessor :segments + # The travel agency that issued the ticket. + attr_accessor :travel_agency + + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ) + super + @departure_at = departure_at + @passenger_name = passenger_name + @refundable = refundable + @segments = segments + @travel_agency = travel_agency + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + attr_accessor :nights + + def initialize(check_in_at: nil, nights: nil) + super + @check_in_at = check_in_at + @nights = nights + end + end + + class Receipt < Stripe::RequestParams + # Attribute for param field description + attr_accessor :description + # Attribute for param field quantity + attr_accessor :quantity + # Attribute for param field total + attr_accessor :total + # Attribute for param field unit_cost + attr_accessor :unit_cost + + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) + super + @description = description + @quantity = quantity + @total = total + @unit_cost = unit_cost + end + end + # Fleet-specific information for transactions using Fleet cards. + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + attr_accessor :lodging + # The line items in the purchase. + attr_accessor :receipt + # A merchant-specific order number. + attr_accessor :reference + + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ) + super + @fleet = fleet + @flight = flight + @fuel = fuel + @lodging = lodging + @receipt = receipt + @reference = reference + end + end + # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :capture_amount + # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + attr_accessor :close_authorization + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Additional purchase information that is optionally provided by the merchant. + attr_accessor :purchase_details + + def initialize( + capture_amount: nil, + close_authorization: nil, + expand: nil, + purchase_details: nil + ) + super + @capture_amount = capture_amount + @close_authorization = close_authorization + @expand = expand + @purchase_details = purchase_details + end + end + + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FinalizeAmountParams < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :final_amount + # Fleet-specific information for authorizations using Fleet cards. + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + + def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil) + super + @expand = expand + @final_amount = final_amount + @fleet = fleet + @fuel = fuel + end + end + + class RespondParams < Stripe::RequestParams + # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + attr_accessor :confirmed + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(confirmed: nil, expand: nil) + super + @confirmed = confirmed + @expand = expand + end + end + + class IncrementParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :increment_amount + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + attr_accessor :is_amount_controllable + + def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil) + super + @expand = expand + @increment_amount = increment_amount + @is_amount_controllable = is_amount_controllable + end + end + + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :reverse_amount + + def initialize(expand: nil, reverse_amount: nil) + super + @expand = expand + @reverse_amount = reverse_amount + end + end + # Capture a test-mode authorization. def capture(authorization, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/issuing/card_service.rb b/lib/stripe/services/test_helpers/issuing/card_service.rb index 00f655124..7e618335a 100644 --- a/lib/stripe/services/test_helpers/issuing/card_service.rb +++ b/lib/stripe/services/test_helpers/issuing/card_service.rb @@ -5,6 +5,56 @@ module Stripe module TestHelpers module Issuing class CardService < StripeService + class DeliverCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class FailCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReturnCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ShipCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SubmitCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Updates the shipping status of the specified Issuing Card object to delivered. def deliver_card(card, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb b/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb index cebb3fc9e..6902a2bdf 100644 --- a/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb +++ b/lib/stripe/services/test_helpers/issuing/personalization_design_service.rb @@ -5,6 +5,51 @@ module Stripe module TestHelpers module Issuing class PersonalizationDesignService < StripeService + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class RejectParams < Stripe::RequestParams + class RejectionReasons < Stripe::RequestParams + # The reason(s) the card logo was rejected. + attr_accessor :card_logo + # The reason(s) the carrier text was rejected. + attr_accessor :carrier_text + + def initialize(card_logo: nil, carrier_text: nil) + super + @card_logo = card_logo + @carrier_text = carrier_text + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The reason(s) the personalization design was rejected. + attr_accessor :rejection_reasons + + def initialize(expand: nil, rejection_reasons: nil) + super + @expand = expand + @rejection_reasons = rejection_reasons + end + end + # Updates the status of the specified testmode personalization design object to active. def activate(personalization_design, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/issuing/transaction_service.rb b/lib/stripe/services/test_helpers/issuing/transaction_service.rb index 021d133d0..df26cc76f 100644 --- a/lib/stripe/services/test_helpers/issuing/transaction_service.rb +++ b/lib/stripe/services/test_helpers/issuing/transaction_service.rb @@ -5,6 +5,667 @@ module Stripe module TestHelpers module Issuing class TransactionService < StripeService + class RefundParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :refund_amount + + def initialize(expand: nil, refund_amount: nil) + super + @expand = expand + @refund_amount = refund_amount + end + end + + class CreateForceCaptureParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_accessor :category + # City where the seller is located + attr_accessor :city + # Country where the seller is located + attr_accessor :country + # Name of the seller + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_accessor :network_id + # Postal code where the seller is located + attr_accessor :postal_code + # State where the seller is located + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + attr_accessor :url + + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ) + super + @category = category + @city = city + @country = country + @name = name + @network_id = network_id + @postal_code = postal_code + @state = state + @terminal_id = terminal_id + @url = url + end + end + + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + attr_accessor :arrival_airport_code + # The airline carrier code. + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + attr_accessor :departure_airport_code + # The flight number. + attr_accessor :flight_number + # The flight's service class. + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + attr_accessor :stopover_allowed + + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ) + super + @arrival_airport_code = arrival_airport_code + @carrier = carrier + @departure_airport_code = departure_airport_code + @flight_number = flight_number + @service_class = service_class + @stopover_allowed = stopover_allowed + end + end + # The time that the flight departed. + attr_accessor :departure_at + # The name of the passenger. + attr_accessor :passenger_name + # Whether the ticket is refundable. + attr_accessor :refundable + # The legs of the trip. + attr_accessor :segments + # The travel agency that issued the ticket. + attr_accessor :travel_agency + + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ) + super + @departure_at = departure_at + @passenger_name = passenger_name + @refundable = refundable + @segments = segments + @travel_agency = travel_agency + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + attr_accessor :nights + + def initialize(check_in_at: nil, nights: nil) + super + @check_in_at = check_in_at + @nights = nights + end + end + + class Receipt < Stripe::RequestParams + # Attribute for param field description + attr_accessor :description + # Attribute for param field quantity + attr_accessor :quantity + # Attribute for param field total + attr_accessor :total + # Attribute for param field unit_cost + attr_accessor :unit_cost + + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) + super + @description = description + @quantity = quantity + @total = total + @unit_cost = unit_cost + end + end + # Fleet-specific information for transactions using Fleet cards. + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + attr_accessor :lodging + # The line items in the purchase. + attr_accessor :receipt + # A merchant-specific order number. + attr_accessor :reference + + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ) + super + @fleet = fleet + @flight = flight + @fuel = fuel + @lodging = lodging + @receipt = receipt + @reference = reference + end + end + # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Card associated with this transaction. + attr_accessor :card + # The currency of the capture. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + attr_accessor :purchase_details + + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ) + super + @amount = amount + @card = card + @currency = currency + @expand = expand + @merchant_data = merchant_data + @purchase_details = purchase_details + end + end + + class CreateUnlinkedRefundParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + attr_accessor :category + # City where the seller is located + attr_accessor :city + # Country where the seller is located + attr_accessor :country + # Name of the seller + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + attr_accessor :network_id + # Postal code where the seller is located + attr_accessor :postal_code + # State where the seller is located + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + attr_accessor :url + + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ) + super + @category = category + @city = city + @country = country + @name = name + @network_id = network_id + @postal_code = postal_code + @state = state + @terminal_id = terminal_id + @url = url + end + end + + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + attr_accessor :driver_id + # Odometer reading. + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + attr_accessor :unspecified_id + # User ID. + attr_accessor :user_id + # Vehicle number. + attr_accessor :vehicle_number + + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ) + super + @driver_id = driver_id + @odometer = odometer + @unspecified_id = unspecified_id + @user_id = user_id + @vehicle_number = vehicle_number + end + end + + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + attr_accessor :gross_amount_decimal + + def initialize(gross_amount_decimal: nil) + super + @gross_amount_decimal = gross_amount_decimal + end + end + + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + attr_accessor :national_amount_decimal + + def initialize(local_amount_decimal: nil, national_amount_decimal: nil) + super + @local_amount_decimal = local_amount_decimal + @national_amount_decimal = national_amount_decimal + end + end + # Breakdown of fuel portion of the purchase. + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + attr_accessor :non_fuel + # Information about tax included in this transaction. + attr_accessor :tax + + def initialize(fuel: nil, non_fuel: nil, tax: nil) + super + @fuel = fuel + @non_fuel = non_fuel + @tax = tax + end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + attr_accessor :service_type + + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ) + super + @cardholder_prompt_data = cardholder_prompt_data + @purchase_type = purchase_type + @reported_breakdown = reported_breakdown + @service_type = service_type + end + end + + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + attr_accessor :arrival_airport_code + # The airline carrier code. + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + attr_accessor :departure_airport_code + # The flight number. + attr_accessor :flight_number + # The flight's service class. + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + attr_accessor :stopover_allowed + + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ) + super + @arrival_airport_code = arrival_airport_code + @carrier = carrier + @departure_airport_code = departure_airport_code + @flight_number = flight_number + @service_class = service_class + @stopover_allowed = stopover_allowed + end + end + # The time that the flight departed. + attr_accessor :departure_at + # The name of the passenger. + attr_accessor :passenger_name + # Whether the ticket is refundable. + attr_accessor :refundable + # The legs of the trip. + attr_accessor :segments + # The travel agency that issued the ticket. + attr_accessor :travel_agency + + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ) + super + @departure_at = departure_at + @passenger_name = passenger_name + @refundable = refundable + @segments = segments + @travel_agency = travel_agency + end + end + + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + attr_accessor :unit_cost_decimal + + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ) + super + @industry_product_code = industry_product_code + @quantity_decimal = quantity_decimal + @type = type + @unit = unit + @unit_cost_decimal = unit_cost_decimal + end + end + + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + attr_accessor :nights + + def initialize(check_in_at: nil, nights: nil) + super + @check_in_at = check_in_at + @nights = nights + end + end + + class Receipt < Stripe::RequestParams + # Attribute for param field description + attr_accessor :description + # Attribute for param field quantity + attr_accessor :quantity + # Attribute for param field total + attr_accessor :total + # Attribute for param field unit_cost + attr_accessor :unit_cost + + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil) + super + @description = description + @quantity = quantity + @total = total + @unit_cost = unit_cost + end + end + # Fleet-specific information for transactions using Fleet cards. + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + attr_accessor :lodging + # The line items in the purchase. + attr_accessor :receipt + # A merchant-specific order number. + attr_accessor :reference + + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ) + super + @fleet = fleet + @flight = flight + @fuel = fuel + @lodging = lodging + @receipt = receipt + @reference = reference + end + end + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + attr_accessor :amount + # Card associated with this unlinked refund transaction. + attr_accessor :card + # The currency of the unlinked refund. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + attr_accessor :purchase_details + + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ) + super + @amount = amount + @card = card + @currency = currency + @expand = expand + @merchant_data = merchant_data + @purchase_details = purchase_details + end + end + # Allows the user to capture an arbitrary amount, also known as a forced capture. def create_force_capture(params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/refund_service.rb b/lib/stripe/services/test_helpers/refund_service.rb index 0811af646..0f370a6ae 100644 --- a/lib/stripe/services/test_helpers/refund_service.rb +++ b/lib/stripe/services/test_helpers/refund_service.rb @@ -4,6 +4,16 @@ module Stripe module TestHelpers class RefundService < StripeService + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Expire a refund with a status of requires_action. def expire(refund, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/terminal/reader_service.rb b/lib/stripe/services/test_helpers/terminal/reader_service.rb index eef9a3da6..76433e8d9 100644 --- a/lib/stripe/services/test_helpers/terminal/reader_service.rb +++ b/lib/stripe/services/test_helpers/terminal/reader_service.rb @@ -5,6 +5,53 @@ module Stripe module TestHelpers module Terminal class ReaderService < StripeService + class PresentPaymentMethodParams < Stripe::RequestParams + class CardPresent < Stripe::RequestParams + # The card number, as a string without any separators. + attr_accessor :number + + def initialize(number: nil) + super + @number = number + end + end + + class InteracPresent < Stripe::RequestParams + # Card Number + attr_accessor :number + + def initialize(number: nil) + super + @number = number + end + end + # Simulated on-reader tip amount. + attr_accessor :amount_tip + # Simulated data for the card_present payment method. + attr_accessor :card_present + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Simulated data for the interac_present payment method. + attr_accessor :interac_present + # Simulated payment type. + attr_accessor :type + + def initialize( + amount_tip: nil, + card_present: nil, + expand: nil, + interac_present: nil, + type: nil + ) + super + @amount_tip = amount_tip + @card_present = card_present + @expand = expand + @interac_present = interac_present + @type = type + end + end + # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. def present_payment_method(reader, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/test_clock_service.rb b/lib/stripe/services/test_helpers/test_clock_service.rb index 36b663809..43acbe7fe 100644 --- a/lib/stripe/services/test_helpers/test_clock_service.rb +++ b/lib/stripe/services/test_helpers/test_clock_service.rb @@ -4,6 +4,67 @@ module Stripe module TestHelpers class TestClockService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The initial frozen time for this test clock. + attr_accessor :frozen_time + # The name for this test clock. + attr_accessor :name + + def initialize(expand: nil, frozen_time: nil, name: nil) + super + @expand = expand + @frozen_time = frozen_time + @name = name + end + end + + class AdvanceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + attr_accessor :frozen_time + + def initialize(expand: nil, frozen_time: nil) + super + @expand = expand + @frozen_time = frozen_time + end + end + # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. def advance(test_clock, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb b/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb index ac85f223b..35d470716 100644 --- a/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb +++ b/lib/stripe/services/test_helpers/treasury/inbound_transfer_service.rb @@ -5,6 +5,48 @@ module Stripe module TestHelpers module Treasury class InboundTransferService < StripeService + class FailParams < Stripe::RequestParams + class FailureDetails < Stripe::RequestParams + # Reason for the failure. + attr_accessor :code + + def initialize(code: nil) + super + @code = code + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about a failed InboundTransfer. + attr_accessor :failure_details + + def initialize(expand: nil, failure_details: nil) + super + @expand = expand + @failure_details = failure_details + end + end + + class ReturnInboundTransferParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class SucceedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. def fail(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb b/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb index fd4fcd44b..87f5904ca 100644 --- a/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb +++ b/lib/stripe/services/test_helpers/treasury/outbound_payment_service.rb @@ -5,6 +5,101 @@ module Stripe module TestHelpers module Treasury class OutboundPaymentService < StripeService + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + attr_accessor :trace_id + + def initialize(trace_id: nil) + super + @trace_id = trace_id + end + end + + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :omad + + def initialize(chips: nil, imad: nil, omad: nil) + super + @chips = chips + @imad = imad + @omad = omad + end + end + # ACH network tracking details. + attr_accessor :ach + # The US bank account network used to send funds. + attr_accessor :type + # US domestic wire network tracking details. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, type: nil, us_domestic_wire: nil) + super + @ach = ach + @type = type + @us_domestic_wire = us_domestic_wire + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about network-specific tracking information. + attr_accessor :tracking_details + + def initialize(expand: nil, tracking_details: nil) + super + @expand = expand + @tracking_details = tracking_details + end + end + + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReturnOutboundPaymentParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # The return code to be set on the OutboundPayment object. + attr_accessor :code + + def initialize(code: nil) + super + @code = code + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Optional hash to set the return code. + attr_accessor :returned_details + + def initialize(expand: nil, returned_details: nil) + super + @expand = expand + @returned_details = returned_details + end + end + # Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. def fail(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb b/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb index c5716bd97..18a1925d5 100644 --- a/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb +++ b/lib/stripe/services/test_helpers/treasury/outbound_transfer_service.rb @@ -5,6 +5,101 @@ module Stripe module TestHelpers module Treasury class OutboundTransferService < StripeService + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + attr_accessor :trace_id + + def initialize(trace_id: nil) + super + @trace_id = trace_id + end + end + + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + attr_accessor :omad + + def initialize(chips: nil, imad: nil, omad: nil) + super + @chips = chips + @imad = imad + @omad = omad + end + end + # ACH network tracking details. + attr_accessor :ach + # The US bank account network used to send funds. + attr_accessor :type + # US domestic wire network tracking details. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, type: nil, us_domestic_wire: nil) + super + @ach = ach + @type = type + @us_domestic_wire = us_domestic_wire + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about network-specific tracking information. + attr_accessor :tracking_details + + def initialize(expand: nil, tracking_details: nil) + super + @expand = expand + @tracking_details = tracking_details + end + end + + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class ReturnOutboundTransferParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # Reason for the return. + attr_accessor :code + + def initialize(code: nil) + super + @code = code + end + end + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Details about a returned OutboundTransfer. + attr_accessor :returned_details + + def initialize(expand: nil, returned_details: nil) + super + @expand = expand + @returned_details = returned_details + end + end + # Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. def fail(outbound_transfer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/treasury/received_credit_service.rb b/lib/stripe/services/test_helpers/treasury/received_credit_service.rb index f5a033aa9..f06d5dd53 100644 --- a/lib/stripe/services/test_helpers/treasury/received_credit_service.rb +++ b/lib/stripe/services/test_helpers/treasury/received_credit_service.rb @@ -5,6 +5,95 @@ module Stripe module TestHelpers module Treasury class ReceivedCreditService < StripeService + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + attr_accessor :account_holder_name + # The bank account number. + attr_accessor :account_number + # The bank account's routing number. + attr_accessor :routing_number + + def initialize(account_holder_name: nil, account_number: nil, routing_number: nil) + super + @account_holder_name = account_holder_name + @account_number = account_number + @routing_number = routing_number + end + end + # The source type. + attr_accessor :type + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(type: nil, us_bank_account: nil) + super + @type = type + @us_bank_account = us_bank_account + end + end + + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH Addenda record + attr_accessor :addenda + + def initialize(addenda: nil) + super + @addenda = addenda + end + end + # Optional fields for `ach`. + attr_accessor :ach + # The type of flow that originated the ReceivedCredit. + attr_accessor :type + + def initialize(ach: nil, type: nil) + super + @ach = ach + @type = type + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to send funds to. + attr_accessor :financial_account + # Initiating payment method details for the object. + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + # Details about the network used for the ReceivedCredit. + attr_accessor :network_details + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @financial_account = financial_account + @initiating_payment_method_details = initiating_payment_method_details + @network = network + @network_details = network_details + end + end + # Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/test_helpers/treasury/received_debit_service.rb b/lib/stripe/services/test_helpers/treasury/received_debit_service.rb index cf0ca97c5..8d3109b54 100644 --- a/lib/stripe/services/test_helpers/treasury/received_debit_service.rb +++ b/lib/stripe/services/test_helpers/treasury/received_debit_service.rb @@ -5,6 +5,95 @@ module Stripe module TestHelpers module Treasury class ReceivedDebitService < StripeService + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + attr_accessor :account_holder_name + # The bank account number. + attr_accessor :account_number + # The bank account's routing number. + attr_accessor :routing_number + + def initialize(account_holder_name: nil, account_number: nil, routing_number: nil) + super + @account_holder_name = account_holder_name + @account_number = account_number + @routing_number = routing_number + end + end + # The source type. + attr_accessor :type + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(type: nil, us_bank_account: nil) + super + @type = type + @us_bank_account = us_bank_account + end + end + + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this ReceivedDebit. + attr_accessor :addenda + + def initialize(addenda: nil) + super + @addenda = addenda + end + end + # Optional fields for `ach`. + attr_accessor :ach + # The type of flow that originated the ReceivedDebit. + attr_accessor :type + + def initialize(ach: nil, type: nil) + super + @ach = ach + @type = type + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to pull funds from. + attr_accessor :financial_account + # Initiating payment method details for the object. + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + # Details about the network used for the ReceivedDebit. + attr_accessor :network_details + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @financial_account = financial_account + @initiating_payment_method_details = initiating_payment_method_details + @network = network + @network_details = network_details + end + end + # Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/token_service.rb b/lib/stripe/services/token_service.rb index 49994a745..a04750b93 100644 --- a/lib/stripe/services/token_service.rb +++ b/lib/stripe/services/token_service.rb @@ -3,6 +3,1164 @@ module Stripe class TokenService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CreateParams < Stripe::RequestParams + class Account < Stripe::RequestParams + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document verifying the business. + attr_accessor :document + + def initialize(document: nil) + super + @document = document + end + end + # The company's primary address. + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + attr_accessor :export_purpose_code + # The company's legal name. + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + attr_accessor :ownership_declaration + # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. + attr_accessor :ownership_declaration_shown_and_signed + # The company's phone number (used for verification). + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + attr_accessor :tax_id_registrar + # The VAT number of the company. + attr_accessor :vat_id + # Information on the verification state of the company. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + ownership_declaration_shown_and_signed: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @directors_provided = directors_provided + @executives_provided = executives_provided + @export_license_id = export_license_id + @export_purpose_code = export_purpose_code + @name = name + @name_kana = name_kana + @name_kanji = name_kanji + @owners_provided = owners_provided + @ownership_declaration = ownership_declaration + @ownership_declaration_shown_and_signed = ownership_declaration_shown_and_signed + @phone = phone + @registration_number = registration_number + @structure = structure + @tax_id = tax_id + @tax_id_registrar = tax_id_registrar + @vat_id = vat_id + @verification = verification + end + end + + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ) + super + @director = director + @executive = executive + @owner = owner + @percent_ownership = percent_ownership + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # The individual's primary address. + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + attr_accessor :address_kanji + # The individual's date of birth. + attr_accessor :dob + # The individual's email address. + attr_accessor :email + # The individual's first name. + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + attr_accessor :full_name_aliases + # The individual's gender + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The individual's last name. + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + attr_accessor :last_name_kanji + # The individual's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The individual's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The individual's registered address. + attr_accessor :registered_address + # Describes the person’s relationship to the account. + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + attr_accessor :ssn_last_4 + # The individual's verification document information. + attr_accessor :verification + + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + # The business type. + attr_accessor :business_type + # Information about the company or business. + attr_accessor :company + # Information about the person represented by the account. + attr_accessor :individual + # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + attr_accessor :tos_shown_and_accepted + + def initialize( + business_type: nil, + company: nil, + individual: nil, + tos_shown_and_accepted: nil + ) + super + @business_type = business_type + @company = company + @individual = individual + @tos_shown_and_accepted = tos_shown_and_accepted + end + end + + class BankAccount < Stripe::RequestParams + # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + attr_accessor :account_number + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + attr_accessor :account_type + # The country in which the bank account is located. + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) + attr_accessor :currency + # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. + attr_accessor :payment_method + # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + attr_accessor :routing_number + + def initialize( + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + account_type: nil, + country: nil, + currency: nil, + payment_method: nil, + routing_number: nil + ) + super + @account_holder_name = account_holder_name + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @country = country + @currency = currency + @payment_method = payment_method + @routing_number = routing_number + end + end + + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + attr_accessor :preferred + + def initialize(preferred: nil) + super + @preferred = preferred + end + end + # City / District / Suburb / Town / Village. + attr_accessor :address_city + # Billing address country, if provided. + attr_accessor :address_country + # Address line 1 (Street address / PO Box / Company name). + attr_accessor :address_line1 + # Address line 2 (Apartment / Suite / Unit / Building). + attr_accessor :address_line2 + # State / County / Province / Region. + attr_accessor :address_state + # ZIP or postal code. + attr_accessor :address_zip + # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. + attr_accessor :currency + # Card security code. Highly recommended to always include this value. + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + attr_accessor :exp_month + # Two- or four-digit number representing the card's expiration year. + attr_accessor :exp_year + # Cardholder's full name. + attr_accessor :name + # Contains information about card networks used to process the payment. + attr_accessor :networks + # The card number, as a string without any separators. + attr_accessor :number + + def initialize( + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + networks: nil, + number: nil + ) + super + @address_city = address_city + @address_country = address_country + @address_line1 = address_line1 + @address_line2 = address_line2 + @address_state = address_state + @address_zip = address_zip + @currency = currency + @cvc = cvc + @exp_month = exp_month + @exp_year = exp_year + @name = name + @networks = networks + @number = number + end + end + + class CvcUpdate < Stripe::RequestParams + # The CVC value, in string form. + attr_accessor :cvc + + def initialize(cvc: nil) + super + @cvc = cvc + end + end + + class Person < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + attr_accessor :user_agent + + def initialize(date: nil, ip: nil, user_agent: nil) + super + @date = date + @ip = ip + @user_agent = user_agent + end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + attr_accessor :account + + def initialize(account: nil) + super + @account = account + end + end + + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class AddressKana < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class AddressKanji < Stripe::RequestParams + # City or ward. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Block or building number. + attr_accessor :line1 + # Building details. + attr_accessor :line2 + # Postal code. + attr_accessor :postal_code + # Prefecture. + attr_accessor :state + # Town or cho-me. + attr_accessor :town + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + @town = town + end + end + + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + attr_accessor :day + # The month of birth, between 1 and 12. + attr_accessor :month + # The four-digit year of birth. + attr_accessor :year + + def initialize(day: nil, month: nil, year: nil) + super + @day = day + @month = month + @year = year + end + end + + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + attr_accessor :files + + def initialize(files: nil) + super + @files = files + end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + attr_accessor :visa + + def initialize(company_authorization: nil, passport: nil, visa: nil) + super + @company_authorization = company_authorization + @passport = passport + @visa = visa + end + end + + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + attr_accessor :title + + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ) + super + @authorizer = authorizer + @director = director + @executive = executive + @legal_guardian = legal_guardian + @owner = owner + @percent_ownership = percent_ownership + @representative = representative + @title = title + end + end + + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + attr_accessor :front + + def initialize(back: nil, front: nil) + super + @back = back + @front = front + end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + attr_accessor :document + + def initialize(additional_document: nil, document: nil) + super + @additional_document = additional_document + @document = document + end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + attr_accessor :additional_tos_acceptances + # The person's address. + attr_accessor :address + # The Kana variation of the person's address (Japan only). + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + attr_accessor :address_kanji + # The person's date of birth. + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + attr_accessor :documents + # The person's email address. + attr_accessor :email + # The person's first name. + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + attr_accessor :id_number_secondary + # The person's last name. + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + attr_accessor :last_name_kanji + # The person's maiden name. + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + attr_accessor :nationality + # The person's phone number. + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + attr_accessor :political_exposure + # The person's registered address. + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + attr_accessor :ssn_last_4 + # The person's verification status. + attr_accessor :verification + + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ) + super + @additional_tos_acceptances = additional_tos_acceptances + @address = address + @address_kana = address_kana + @address_kanji = address_kanji + @dob = dob + @documents = documents + @email = email + @first_name = first_name + @first_name_kana = first_name_kana + @first_name_kanji = first_name_kanji + @full_name_aliases = full_name_aliases + @gender = gender + @id_number = id_number + @id_number_secondary = id_number_secondary + @last_name = last_name + @last_name_kana = last_name_kana + @last_name_kanji = last_name_kanji + @maiden_name = maiden_name + @metadata = metadata + @nationality = nationality + @phone = phone + @political_exposure = political_exposure + @registered_address = registered_address + @relationship = relationship + @ssn_last_4 = ssn_last_4 + @verification = verification + end + end + + class Pii < Stripe::RequestParams + # The `id_number` for the PII, in string form. + attr_accessor :id_number + + def initialize(id_number: nil) + super + @id_number = id_number + end + end + # Information for the account this token represents. + attr_accessor :account + # The bank account this token will represent. + attr_accessor :bank_account + # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. + attr_accessor :card + # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + attr_accessor :customer + # The updated CVC value this token represents. + attr_accessor :cvc_update + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Information for the person this token represents. + attr_accessor :person + # The PII this token represents. + attr_accessor :pii + + def initialize( + account: nil, + bank_account: nil, + card: nil, + customer: nil, + cvc_update: nil, + expand: nil, + person: nil, + pii: nil + ) + super + @account = account + @bank_account = bank_account + @card = card + @customer = customer + @cvc_update = cvc_update + @expand = expand + @person = person + @pii = pii + end + end + # Creates a single-use token that represents a bank account's details. # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. def create(params = {}, opts = {}) diff --git a/lib/stripe/services/topup_service.rb b/lib/stripe/services/topup_service.rb index cafa677fa..592b8d43a 100644 --- a/lib/stripe/services/topup_service.rb +++ b/lib/stripe/services/topup_service.rb @@ -3,6 +3,155 @@ module Stripe class TopupService < StripeService + class ListParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # A positive integer representing how much to transfer. + attr_accessor :amount + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + attr_accessor :status + + def initialize( + amount: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @amount = amount + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer representing how much to transfer. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + attr_accessor :source + # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + attr_accessor :statement_descriptor + # A string that identifies this top-up as part of a group. + attr_accessor :transfer_group + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + metadata: nil, + source: nil, + statement_descriptor: nil, + transfer_group: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @metadata = metadata + @source = source + @statement_descriptor = statement_descriptor + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Cancels a top-up. Only pending top-ups can be canceled. def cancel(topup, params = {}, opts = {}) request( diff --git a/lib/stripe/services/transfer_reversal_service.rb b/lib/stripe/services/transfer_reversal_service.rb index 4f3000863..380ab44a3 100644 --- a/lib/stripe/services/transfer_reversal_service.rb +++ b/lib/stripe/services/transfer_reversal_service.rb @@ -3,6 +3,76 @@ module Stripe class TransferReversalService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. + attr_accessor :amount + # An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. + attr_accessor :refund_application_fee + + def initialize( + amount: nil, + description: nil, + expand: nil, + metadata: nil, + refund_application_fee: nil + ) + super + @amount = amount + @description = description + @expand = expand + @metadata = metadata + @refund_application_fee = refund_application_fee + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(expand: nil, metadata: nil) + super + @expand = expand + @metadata = metadata + end + end + # When you create a new reversal, you must specify a transfer to create it on. # # When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. diff --git a/lib/stripe/services/transfer_service.rb b/lib/stripe/services/transfer_service.rb index 3c7cdc698..4f7423d76 100644 --- a/lib/stripe/services/transfer_service.rb +++ b/lib/stripe/services/transfer_service.rb @@ -10,6 +10,130 @@ def initialize(requestor) @reversals = Stripe::TransferReversalService.new(@requestor) end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return transfers that were created during the given date interval. + attr_accessor :created + # Only return transfers for the destination specified by this account ID. + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return transfers with the specified transfer group. + attr_accessor :transfer_group + + def initialize( + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ) + super + @created = created + @destination = destination + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + @transfer_group = transfer_group + end + end + + class CreateParams < Stripe::RequestParams + # A positive integer in cents (or local equivalent) representing how much to transfer. + attr_accessor :amount + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The ID of a connected Stripe account. See the Connect documentation for details. + attr_accessor :destination + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. + attr_accessor :source_transaction + # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + attr_accessor :source_type + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + attr_accessor :transfer_group + + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + source_transaction: nil, + source_type: nil, + transfer_group: nil + ) + super + @amount = amount + @currency = currency + @description = description + @destination = destination + @expand = expand + @metadata = metadata + @source_transaction = source_transaction + @source_type = source_type + @transfer_group = transfer_group + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + + def initialize(description: nil, expand: nil, metadata: nil) + super + @description = description + @expand = expand + @metadata = metadata + end + end + # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. def create(params = {}, opts = {}) request(method: :post, path: "/v1/transfers", params: params, opts: opts, base_address: :api) diff --git a/lib/stripe/services/treasury/credit_reversal_service.rb b/lib/stripe/services/treasury/credit_reversal_service.rb index 1ae6aafab..49e9d25c4 100644 --- a/lib/stripe/services/treasury/credit_reversal_service.rb +++ b/lib/stripe/services/treasury/credit_reversal_service.rb @@ -4,6 +4,68 @@ module Stripe module Treasury class CreditReversalService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return CreditReversals for the ReceivedCredit ID. + attr_accessor :received_credit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return CreditReversals for a given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_credit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @received_credit = received_credit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ReceivedCredit to reverse. + attr_accessor :received_credit + + def initialize(expand: nil, metadata: nil, received_credit: nil) + super + @expand = expand + @metadata = metadata + @received_credit = received_credit + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Reverses a ReceivedCredit and creates a CreditReversal object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/debit_reversal_service.rb b/lib/stripe/services/treasury/debit_reversal_service.rb index 03cfc39f5..99369323e 100644 --- a/lib/stripe/services/treasury/debit_reversal_service.rb +++ b/lib/stripe/services/treasury/debit_reversal_service.rb @@ -4,6 +4,72 @@ module Stripe module Treasury class DebitReversalService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return DebitReversals for the ReceivedDebit ID. + attr_accessor :received_debit + # Only return DebitReversals for a given resolution. + attr_accessor :resolution + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return DebitReversals for a given status. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_debit: nil, + resolution: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @received_debit = received_debit + @resolution = resolution + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The ReceivedDebit to reverse. + attr_accessor :received_debit + + def initialize(expand: nil, metadata: nil, received_debit: nil) + super + @expand = expand + @metadata = metadata + @received_debit = received_debit + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Reverses a ReceivedDebit and creates a DebitReversal object. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/financial_account_features_service.rb b/lib/stripe/services/treasury/financial_account_features_service.rb index 5255a1ecd..ca9383dc8 100644 --- a/lib/stripe/services/treasury/financial_account_features_service.rb +++ b/lib/stripe/services/treasury/financial_account_features_service.rb @@ -4,6 +4,190 @@ module Stripe module Treasury class FinancialAccountFeaturesService < StripeService + class UpdateParams < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(bank: nil, requested: nil) + super + @bank = bank + @requested = requested + end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + attr_accessor :aba + + def initialize(aba: nil) + super + @aba = aba + end + end + + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH Debits via the InboundTransfers API. + attr_accessor :ach + + def initialize(ach: nil) + super + @ach = ach + end + end + + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundPayments API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundTransfers API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + attr_accessor :deposit_insurance + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Contains Features that add FinancialAddresses to the FinancialAccount. + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + attr_accessor :outbound_transfers + + def initialize( + card_issuing: nil, + deposit_insurance: nil, + expand: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ) + super + @card_issuing = card_issuing + @deposit_insurance = deposit_insurance + @expand = expand + @financial_addresses = financial_addresses + @inbound_transfers = inbound_transfers + @intra_stripe_flows = intra_stripe_flows + @outbound_payments = outbound_payments + @outbound_transfers = outbound_transfers + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves Features information associated with the FinancialAccount. def retrieve(financial_account, params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/financial_account_service.rb b/lib/stripe/services/treasury/financial_account_service.rb index d38719ab1..70b340bae 100644 --- a/lib/stripe/services/treasury/financial_account_service.rb +++ b/lib/stripe/services/treasury/financial_account_service.rb @@ -11,6 +11,486 @@ def initialize(requestor) @features = Stripe::Treasury::FinancialAccountFeaturesService.new(@requestor) end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return FinancialAccounts that were created during the given date interval. + attr_accessor :created + # An object ID cursor for use in pagination. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit ranging from 1 to 100 (defaults to 10). + attr_accessor :limit + # An object ID cursor for use in pagination. + attr_accessor :starting_after + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(bank: nil, requested: nil) + super + @bank = bank + @requested = requested + end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + attr_accessor :aba + + def initialize(aba: nil) + super + @aba = aba + end + end + + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH Debits via the InboundTransfers API. + attr_accessor :ach + + def initialize(ach: nil) + super + @ach = ach + end + end + + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundPayments API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundTransfers API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + attr_accessor :outbound_transfers + + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ) + super + @card_issuing = card_issuing + @deposit_insurance = deposit_insurance + @financial_addresses = financial_addresses + @inbound_transfers = inbound_transfers + @intra_stripe_flows = intra_stripe_flows + @outbound_payments = outbound_payments + @outbound_transfers = outbound_transfers + end + end + + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + attr_accessor :inbound_flows + # Restricts all outbound money movement. + attr_accessor :outbound_flows + + def initialize(inbound_flows: nil, outbound_flows: nil) + super + @inbound_flows = inbound_flows + @outbound_flows = outbound_flows + end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + attr_accessor :platform_restrictions + # The currencies the FinancialAccount can hold a balance in. + attr_accessor :supported_currencies + + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil, + supported_currencies: nil + ) + super + @display_name = display_name + @expand = expand + @features = features + @metadata = metadata + @platform_restrictions = platform_restrictions + @supported_currencies = supported_currencies + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(bank: nil, requested: nil) + super + @bank = bank + @requested = requested + end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + attr_accessor :aba + + def initialize(aba: nil) + super + @aba = aba + end + end + + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH Debits via the InboundTransfers API. + attr_accessor :ach + + def initialize(ach: nil) + super + @ach = ach + end + end + + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundPayments API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + attr_accessor :requested + + def initialize(requested: nil) + super + @requested = requested + end + end + # Enables ACH transfers via the OutboundTransfers API. + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + attr_accessor :us_domestic_wire + + def initialize(ach: nil, us_domestic_wire: nil) + super + @ach = ach + @us_domestic_wire = us_domestic_wire + end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + attr_accessor :outbound_transfers + + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ) + super + @card_issuing = card_issuing + @deposit_insurance = deposit_insurance + @financial_addresses = financial_addresses + @inbound_transfers = inbound_transfers + @intra_stripe_flows = intra_stripe_flows + @outbound_payments = outbound_payments + @outbound_transfers = outbound_transfers + end + end + + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + attr_accessor :inbound_flows + # Restricts all outbound money movement. + attr_accessor :outbound_flows + + def initialize(inbound_flows: nil, outbound_flows: nil) + super + @inbound_flows = inbound_flows + @outbound_flows = outbound_flows + end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + attr_accessor :platform_restrictions + + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil + ) + super + @display_name = display_name + @expand = expand + @features = features + @metadata = metadata + @platform_restrictions = platform_restrictions + end + end + # Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/inbound_transfer_service.rb b/lib/stripe/services/treasury/inbound_transfer_service.rb index f1737e281..bd09b96f3 100644 --- a/lib/stripe/services/treasury/inbound_transfer_service.rb +++ b/lib/stripe/services/treasury/inbound_transfer_service.rb @@ -4,6 +4,98 @@ module Stripe module Treasury class InboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to send funds to. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The origin payment method to be debited for the InboundTransfer. + attr_accessor :origin_payment_method + # The complete description that appears on your customers' statements. Maximum 10 characters. + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + metadata: nil, + origin_payment_method: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @description = description + @expand = expand + @financial_account = financial_account + @metadata = metadata + @origin_payment_method = origin_payment_method + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Cancels an InboundTransfer. def cancel(inbound_transfer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/outbound_payment_service.rb b/lib/stripe/services/treasury/outbound_payment_service.rb index 9f1c21f5c..d854ed78e 100644 --- a/lib/stripe/services/treasury/outbound_payment_service.rb +++ b/lib/stripe/services/treasury/outbound_payment_service.rb @@ -4,6 +4,276 @@ module Stripe module Treasury class OutboundPaymentService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return OutboundPayments that were created during the given date interval. + attr_accessor :created + # Only return OutboundPayments sent to this customer. + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + attr_accessor :status + + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @created = created + @customer = customer + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodData < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + attr_accessor :line2 + # ZIP or postal code. + attr_accessor :postal_code + # State, county, province, or region. + attr_accessor :state + + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ) + super + @city = city + @country = country + @line1 = line1 + @line2 = line2 + @postal_code = postal_code + @state = state + end + end + # Billing address. + attr_accessor :address + # Email address. + attr_accessor :email + # Full name. + attr_accessor :name + # Billing phone number (including extension). + attr_accessor :phone + + def initialize(address: nil, email: nil, name: nil, phone: nil) + super + @address = address + @email = email + @name = name + @phone = phone + end + end + + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + attr_accessor :account_holder_type + # Account number of the bank account. + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + attr_accessor :financial_connections_account + # Routing number of the bank account. + attr_accessor :routing_number + + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ) + super + @account_holder_type = account_holder_type + @account_number = account_number + @account_type = account_type + @financial_connections_account = financial_connections_account + @routing_number = routing_number + end + end + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + attr_accessor :billing_details + # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + attr_accessor :type + # Required hash if type is set to `us_bank_account`. + attr_accessor :us_bank_account + + def initialize( + billing_details: nil, + financial_account: nil, + metadata: nil, + type: nil, + us_bank_account: nil + ) + super + @billing_details = billing_details + @financial_account = financial_account + @metadata = metadata + @type = type + @us_bank_account = us_bank_account + end + end + + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + + def initialize(network: nil) + super + @network = network + end + end + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(us_bank_account: nil) + super + @us_bank_account = us_bank_account + end + end + + class EndUserDetails < Stripe::RequestParams + # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. + attr_accessor :ip_address + # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + attr_accessor :present + + def initialize(ip_address: nil, present: nil) + super + @ip_address = ip_address + @present = present + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + attr_accessor :destination_payment_method + # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + attr_accessor :destination_payment_method_data + # Payment method-specific configuration for this OutboundPayment. + attr_accessor :destination_payment_method_options + # End user details. + attr_accessor :end_user_details + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to pull funds from. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_data: nil, + destination_payment_method_options: nil, + end_user_details: nil, + expand: nil, + financial_account: nil, + metadata: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @customer = customer + @description = description + @destination_payment_method = destination_payment_method + @destination_payment_method_data = destination_payment_method_data + @destination_payment_method_options = destination_payment_method_options + @end_user_details = end_user_details + @expand = expand + @financial_account = financial_account + @metadata = metadata + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Cancel an OutboundPayment. def cancel(id, params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/outbound_transfer_service.rb b/lib/stripe/services/treasury/outbound_transfer_service.rb index 1fa42438a..25cb77857 100644 --- a/lib/stripe/services/treasury/outbound_transfer_service.rb +++ b/lib/stripe/services/treasury/outbound_transfer_service.rb @@ -4,6 +4,146 @@ module Stripe module Treasury class OutboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + attr_accessor :network + + def initialize(network: nil) + super + @network = network + end + end + # Optional fields for `us_bank_account`. + attr_accessor :us_bank_account + + def initialize(us_bank_account: nil) + super + @us_bank_account = us_bank_account + end + end + + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this OutboundTransfer. + attr_accessor :addenda + + def initialize(addenda: nil) + super + @addenda = addenda + end + end + # Optional fields for `ach`. + attr_accessor :ach + # The type of flow that originated the OutboundTransfer. + attr_accessor :type + + def initialize(ach: nil, type: nil) + super + @ach = ach + @type = type + end + end + # Amount (in cents) to be transferred. + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundTransfer. + attr_accessor :destination_payment_method + # Hash describing payment method configuration details. + attr_accessor :destination_payment_method_options + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount to pull funds from. + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # Details about the network used for the OutboundTransfer. + attr_accessor :network_details + # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". + attr_accessor :statement_descriptor + + def initialize( + amount: nil, + currency: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_options: nil, + expand: nil, + financial_account: nil, + metadata: nil, + network_details: nil, + statement_descriptor: nil + ) + super + @amount = amount + @currency = currency + @description = description + @destination_payment_method = destination_payment_method + @destination_payment_method_options = destination_payment_method_options + @expand = expand + @financial_account = financial_account + @metadata = metadata + @network_details = network_details + @statement_descriptor = statement_descriptor + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # An OutboundTransfer can be canceled if the funds have not yet been paid out. def cancel(outbound_transfer, params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/received_credit_service.rb b/lib/stripe/services/treasury/received_credit_service.rb index 8d8d4e233..0b15b2f0f 100644 --- a/lib/stripe/services/treasury/received_credit_service.rb +++ b/lib/stripe/services/treasury/received_credit_service.rb @@ -4,6 +4,61 @@ module Stripe module Treasury class ReceivedCreditService < StripeService + class ListParams < Stripe::RequestParams + class LinkedFlows < Stripe::RequestParams + # The source flow type. + attr_accessor :source_flow_type + + def initialize(source_flow_type: nil) + super + @source_flow_type = source_flow_type + end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount that received the funds. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # Only return ReceivedCredits described by the flow. + attr_accessor :linked_flows + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return ReceivedCredits that have the given status: `succeeded` or `failed`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + linked_flows: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @linked_flows = linked_flows + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of ReceivedCredits. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/received_debit_service.rb b/lib/stripe/services/treasury/received_debit_service.rb index 204b6f200..2983f8ac5 100644 --- a/lib/stripe/services/treasury/received_debit_service.rb +++ b/lib/stripe/services/treasury/received_debit_service.rb @@ -4,6 +4,48 @@ module Stripe module Treasury class ReceivedDebitService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # The FinancialAccount that funds were pulled from. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + attr_accessor :status + + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ) + super + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @starting_after = starting_after + @status = status + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Returns a list of ReceivedDebits. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/transaction_entry_service.rb b/lib/stripe/services/treasury/transaction_entry_service.rb index 342bafa22..3707579c7 100644 --- a/lib/stripe/services/treasury/transaction_entry_service.rb +++ b/lib/stripe/services/treasury/transaction_entry_service.rb @@ -4,6 +4,97 @@ module Stripe module Treasury class TransactionEntryService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class EffectiveAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Only return TransactionEntries that were created during the given date interval. + attr_accessor :created + # Attribute for param field effective_at + attr_accessor :effective_at + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return TransactionEntries associated with this Transaction. + attr_accessor :transaction + + def initialize( + created: nil, + effective_at: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + transaction: nil + ) + super + @created = created + @effective_at = effective_at + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @order_by = order_by + @starting_after = starting_after + @transaction = transaction + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves a list of TransactionEntry objects. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/treasury/transaction_service.rb b/lib/stripe/services/treasury/transaction_service.rb index 4f684eb79..050f5370e 100644 --- a/lib/stripe/services/treasury/transaction_service.rb +++ b/lib/stripe/services/treasury/transaction_service.rb @@ -4,6 +4,106 @@ module Stripe module Treasury class TransactionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + + class StatusTransitions < Stripe::RequestParams + class PostedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + attr_accessor :gt + # Minimum value to filter by (inclusive) + attr_accessor :gte + # Maximum value to filter by (exclusive) + attr_accessor :lt + # Maximum value to filter by (inclusive) + attr_accessor :lte + + def initialize(gt: nil, gte: nil, lt: nil, lte: nil) + super + @gt = gt + @gte = gte + @lt = lt + @lte = lte + end + end + # Returns Transactions with `posted_at` within the specified range. + attr_accessor :posted_at + + def initialize(posted_at: nil) + super + @posted_at = posted_at + end + end + # Only return Transactions that were created during the given date interval. + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + # Only return Transactions that have the given status: `open`, `posted`, or `void`. + attr_accessor :status + # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. + attr_accessor :status_transitions + + def initialize( + created: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + status: nil, + status_transitions: nil + ) + super + @created = created + @ending_before = ending_before + @expand = expand + @financial_account = financial_account + @limit = limit + @order_by = order_by + @starting_after = starting_after + @status = status + @status_transitions = status_transitions + end + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + # Retrieves a list of Transaction objects. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb b/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb index 6d9f5f801..299dbcfa3 100644 --- a/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb +++ b/lib/stripe/services/v2/billing/meter_event_adjustment_service.rb @@ -5,6 +5,31 @@ module Stripe module V2 module Billing class MeterEventAdjustmentService < StripeService + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + attr_accessor :identifier + + def initialize(identifier: nil) + super + @identifier = identifier + end + end + # Specifies which event to cancel. + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + attr_accessor :type + + def initialize(cancel: nil, event_name: nil, type: nil) + super + @cancel = cancel + @event_name = event_name + @type = type + end + end + # Creates a meter event adjustment to cancel a previously sent meter event. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/billing/meter_event_service.rb b/lib/stripe/services/v2/billing/meter_event_service.rb index 1fbf17d40..2765576b0 100644 --- a/lib/stripe/services/v2/billing/meter_event_service.rb +++ b/lib/stripe/services/v2/billing/meter_event_service.rb @@ -5,6 +5,32 @@ module Stripe module V2 module Billing class MeterEventService < StripeService + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # A unique identifier for the event. If not provided, one will be generated. + # We recommend using a globally unique identifier for this. We’ll enforce + # uniqueness within a rolling 24 hour period. + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about + # the + # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + attr_accessor :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + attr_accessor :timestamp + + def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil) + super + @event_name = event_name + @identifier = identifier + @payload = payload + @timestamp = timestamp + end + end + # Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/billing/meter_event_session_service.rb b/lib/stripe/services/v2/billing/meter_event_session_service.rb index 3ab5e3236..adf6a500f 100644 --- a/lib/stripe/services/v2/billing/meter_event_session_service.rb +++ b/lib/stripe/services/v2/billing/meter_event_session_service.rb @@ -5,6 +5,9 @@ module Stripe module V2 module Billing class MeterEventSessionService < StripeService + class CreateParams < Stripe::RequestParams + end + # Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/billing/meter_event_stream_service.rb b/lib/stripe/services/v2/billing/meter_event_stream_service.rb index 7c3068606..d65371753 100644 --- a/lib/stripe/services/v2/billing/meter_event_stream_service.rb +++ b/lib/stripe/services/v2/billing/meter_event_stream_service.rb @@ -5,6 +5,41 @@ module Stripe module V2 module Billing class MeterEventStreamService < StripeService + class CreateParams < Stripe::RequestParams + class Event < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + attr_accessor :event_name + # A unique identifier for the event. If not provided, one will be generated. + # We recommend using a globally unique identifier for this. We’ll enforce + # uniqueness within a rolling 24 hour period. + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about + # the + # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + attr_accessor :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + attr_accessor :timestamp + + def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil) + super + @event_name = event_name + @identifier = identifier + @payload = payload + @timestamp = timestamp + end + end + # List of meter events to include in the request. + attr_accessor :events + + def initialize(events: nil) + super + @events = events + end + end + # Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales. # # ** raises TemporarySessionExpiredError diff --git a/lib/stripe/services/v2/core/event_destination_service.rb b/lib/stripe/services/v2/core/event_destination_service.rb index 11dd45c9a..dc97fdcd1 100644 --- a/lib/stripe/services/v2/core/event_destination_service.rb +++ b/lib/stripe/services/v2/core/event_destination_service.rb @@ -5,6 +5,159 @@ module Stripe module V2 module Core class EventDestinationService < StripeService + class CreateParams < Stripe::RequestParams + class AmazonEventbridge < Stripe::RequestParams + # The AWS account ID. + attr_accessor :aws_account_id + # The region of the AWS event source. + attr_accessor :aws_region + + def initialize(aws_account_id: nil, aws_region: nil) + super + @aws_account_id = aws_account_id + @aws_region = aws_region + end + end + + class WebhookEndpoint < Stripe::RequestParams + # The URL of the webhook endpoint. + attr_accessor :url + + def initialize(url: nil) + super + @url = url + end + end + # An optional description of what the event destination is used for. + attr_accessor :description + # The list of events to enable for this endpoint. + attr_accessor :enabled_events + # Payload type of events being subscribed to. + attr_accessor :event_payload + # Where events should be routed from. + attr_accessor :events_from + # Additional fields to include in the response. + attr_accessor :include + # Metadata. + attr_accessor :metadata + # Event destination name. + attr_accessor :name + # If using the snapshot event payload, the API version events are rendered as. + attr_accessor :snapshot_api_version + # Event destination type. + attr_accessor :type + # Amazon EventBridge configuration. + attr_accessor :amazon_eventbridge + # Webhook endpoint configuration. + attr_accessor :webhook_endpoint + + def initialize( + description: nil, + enabled_events: nil, + event_payload: nil, + events_from: nil, + include: nil, + metadata: nil, + name: nil, + snapshot_api_version: nil, + type: nil, + amazon_eventbridge: nil, + webhook_endpoint: nil + ) + super + @description = description + @enabled_events = enabled_events + @event_payload = event_payload + @events_from = events_from + @include = include + @metadata = metadata + @name = name + @snapshot_api_version = snapshot_api_version + @type = type + @amazon_eventbridge = amazon_eventbridge + @webhook_endpoint = webhook_endpoint + end + end + + class DeleteParams < Stripe::RequestParams + end + + class DisableParams < Stripe::RequestParams + end + + class EnableParams < Stripe::RequestParams + end + + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + attr_accessor :include + # The page size. + attr_accessor :limit + # The requested page. + attr_accessor :page + + def initialize(include: nil, limit: nil, page: nil) + super + @include = include + @limit = limit + @page = page + end + end + + class PingParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Additional fields to include in the response. + attr_accessor :include + + def initialize(include: nil) + super + @include = include + end + end + + class UpdateParams < Stripe::RequestParams + class WebhookEndpoint < Stripe::RequestParams + # The URL of the webhook endpoint. + attr_accessor :url + + def initialize(url: nil) + super + @url = url + end + end + # An optional description of what the event destination is used for. + attr_accessor :description + # The list of events to enable for this endpoint. + attr_accessor :enabled_events + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + attr_accessor :include + # Metadata. + attr_accessor :metadata + # Event destination name. + attr_accessor :name + # Webhook endpoint configuration. + attr_accessor :webhook_endpoint + + def initialize( + description: nil, + enabled_events: nil, + include: nil, + metadata: nil, + name: nil, + webhook_endpoint: nil + ) + super + @description = description + @enabled_events = enabled_events + @include = include + @metadata = metadata + @name = name + @webhook_endpoint = webhook_endpoint + end + end + # Create a new event destination. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/services/v2/core/event_service.rb b/lib/stripe/services/v2/core/event_service.rb index 86b96bcec..f6f41fdef 100644 --- a/lib/stripe/services/v2/core/event_service.rb +++ b/lib/stripe/services/v2/core/event_service.rb @@ -5,6 +5,25 @@ module Stripe module V2 module Core class EventService < StripeService + class ListParams < Stripe::RequestParams + # The page size. + attr_accessor :limit + # Primary object ID used to retrieve related events. + attr_accessor :object_id + # The requested page. + attr_accessor :page + + def initialize(limit: nil, object_id: nil, page: nil) + super + @limit = limit + @object_id = object_id + @page = page + end + end + + class RetrieveParams < Stripe::RequestParams + end + # List events, going back up to 30 days. def list(params = {}, opts = {}) request( diff --git a/lib/stripe/services/webhook_endpoint_service.rb b/lib/stripe/services/webhook_endpoint_service.rb index 222b745b6..a186292b4 100644 --- a/lib/stripe/services/webhook_endpoint_service.rb +++ b/lib/stripe/services/webhook_endpoint_service.rb @@ -3,6 +3,106 @@ module Stripe class WebhookEndpointService < StripeService + class DeleteParams < Stripe::RequestParams + end + + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + attr_accessor :expand + + def initialize(expand: nil) + super + @expand = expand + end + end + + class UpdateParams < Stripe::RequestParams + # An optional description of what the webhook is used for. + attr_accessor :description + # Disable the webhook endpoint if set to true. + attr_accessor :disabled + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The URL of the webhook endpoint. + attr_accessor :url + + def initialize( + description: nil, + disabled: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ) + super + @description = description + @disabled = disabled + @enabled_events = enabled_events + @expand = expand + @metadata = metadata + @url = url + end + end + + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + attr_accessor :starting_after + + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil) + super + @ending_before = ending_before + @expand = expand + @limit = limit + @starting_after = starting_after + end + end + + class CreateParams < Stripe::RequestParams + # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + attr_accessor :api_version + # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + attr_accessor :connect + # An optional description of what the webhook is used for. + attr_accessor :description + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + attr_accessor :metadata + # The URL of the webhook endpoint. + attr_accessor :url + + def initialize( + api_version: nil, + connect: nil, + description: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ) + super + @api_version = api_version + @connect = connect + @description = description + @enabled_events = enabled_events + @expand = expand + @metadata = metadata + @url = url + end + end + # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. def create(params = {}, opts = {}) request( diff --git a/lib/stripe/stripe_client.rb b/lib/stripe/stripe_client.rb index 27f95afcb..f9702fd78 100644 --- a/lib/stripe/stripe_client.rb +++ b/lib/stripe/stripe_client.rb @@ -11,7 +11,7 @@ class StripeClient # attr_readers: The end of the section generated from our OpenAPI spec # Initializes a new StripeClient - def initialize(api_key, # rubocop:todo Metrics/ParameterLists + def initialize(api_key, stripe_account: nil, stripe_context: nil, stripe_version: nil, diff --git a/rbi/stripe/resources/account.rbi b/rbi/stripe/resources/account.rbi index 031d7b4bd..757abbfd9 100644 --- a/rbi/stripe/resources/account.rbi +++ b/rbi/stripe/resources/account.rbi @@ -18,652 +18,5058 @@ module Stripe class Account < APIResource class BusinessProfile < Stripe::StripeObject class AnnualRevenue < Stripe::StripeObject + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. sig { returns(T.nilable(String)) } attr_reader :fiscal_year_end end class MonthlyEstimatedRevenue < Stripe::StripeObject + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end class SupportAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # The applicant's gross annual revenue for its preceding fiscal year. sig { returns(T.nilable(AnnualRevenue)) } attr_reader :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. sig { returns(T.nilable(Integer)) } attr_reader :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. sig { returns(T.nilable(String)) } attr_reader :mcc + # Attribute for field monthly_estimated_revenue sig { returns(MonthlyEstimatedRevenue) } attr_reader :monthly_estimated_revenue + # The customer-facing business name. sig { returns(T.nilable(String)) } attr_reader :name + # Internal-only description of the product sold or service provided by the business. It's used by Stripe for risk and underwriting purposes. sig { returns(T.nilable(String)) } attr_reader :product_description + # A publicly available mailing address for sending support issues to. sig { returns(T.nilable(SupportAddress)) } attr_reader :support_address + # A publicly available email address for sending support issues to. sig { returns(T.nilable(String)) } attr_reader :support_email + # A publicly available phone number to call with support issues. sig { returns(T.nilable(String)) } attr_reader :support_phone + # A publicly available website for handling support issues. sig { returns(T.nilable(String)) } attr_reader :support_url + # The business's publicly available website. sig { returns(T.nilable(String)) } attr_reader :url end class Capabilities < Stripe::StripeObject + # The status of the Canadian pre-authorized debits payments capability of the account, or whether the account can directly process Canadian pre-authorized debits charges. sig { returns(String) } attr_reader :acss_debit_payments + # The status of the Affirm capability of the account, or whether the account can directly process Affirm charges. sig { returns(String) } attr_reader :affirm_payments + # The status of the Afterpay Clearpay capability of the account, or whether the account can directly process Afterpay Clearpay charges. sig { returns(String) } attr_reader :afterpay_clearpay_payments + # The status of the Alma capability of the account, or whether the account can directly process Alma payments. sig { returns(String) } attr_reader :alma_payments + # The status of the AmazonPay capability of the account, or whether the account can directly process AmazonPay payments. sig { returns(String) } attr_reader :amazon_pay_payments + # The status of the BECS Direct Debit (AU) payments capability of the account, or whether the account can directly process BECS Direct Debit (AU) charges. sig { returns(String) } attr_reader :au_becs_debit_payments + # The status of the automatic_indirect_tax capability of the account. sig { returns(String) } attr_reader :automatic_indirect_tax + # The status of the Bacs Direct Debits payments capability of the account, or whether the account can directly process Bacs Direct Debits charges. sig { returns(String) } attr_reader :bacs_debit_payments + # The status of the Bancontact payments capability of the account, or whether the account can directly process Bancontact charges. sig { returns(String) } attr_reader :bancontact_payments + # The status of the customer_balance payments capability of the account, or whether the account can directly process customer_balance charges. sig { returns(String) } attr_reader :bank_transfer_payments + # The status of the blik payments capability of the account, or whether the account can directly process blik charges. sig { returns(String) } attr_reader :blik_payments + # The status of the boleto payments capability of the account, or whether the account can directly process boleto charges. sig { returns(String) } attr_reader :boleto_payments + # The status of the card issuing capability of the account, or whether you can use Issuing to distribute funds on cards sig { returns(String) } attr_reader :card_issuing + # The status of the card payments capability of the account, or whether the account can directly process credit and debit card charges. sig { returns(String) } attr_reader :card_payments + # The status of the Cartes Bancaires payments capability of the account, or whether the account can directly process Cartes Bancaires card charges in EUR currency. sig { returns(String) } attr_reader :cartes_bancaires_payments + # The status of the Cash App Pay capability of the account, or whether the account can directly process Cash App Pay payments. sig { returns(String) } attr_reader :cashapp_payments + # The status of the EPS payments capability of the account, or whether the account can directly process EPS charges. sig { returns(String) } attr_reader :eps_payments + # The status of the FPX payments capability of the account, or whether the account can directly process FPX charges. sig { returns(String) } attr_reader :fpx_payments + # The status of the GB customer_balance payments (GBP currency) capability of the account, or whether the account can directly process GB customer_balance charges. sig { returns(String) } attr_reader :gb_bank_transfer_payments + # The status of the giropay payments capability of the account, or whether the account can directly process giropay charges. sig { returns(String) } attr_reader :giropay_payments + # The status of the Gopay capability of the account, or whether the account can directly process Gopay payments. sig { returns(String) } attr_reader :gopay_payments + # The status of the GrabPay payments capability of the account, or whether the account can directly process GrabPay charges. sig { returns(String) } attr_reader :grabpay_payments + # The status of the Indonesia Bank Transfer payments capability of the account, or whether the account can directly process Indonesia Bank Transfer charges. sig { returns(String) } attr_reader :id_bank_transfer_payments + # The status of Bank BCA onboarding of the account. sig { returns(String) } attr_reader :id_bank_transfer_payments_bca + # The status of the iDEAL payments capability of the account, or whether the account can directly process iDEAL charges. sig { returns(String) } attr_reader :ideal_payments + # The status of the india_international_payments capability of the account, or whether the account can process international charges (non INR) in India. sig { returns(String) } attr_reader :india_international_payments + # The status of the JCB payments capability of the account, or whether the account (Japan only) can directly process JCB credit card charges in JPY currency. sig { returns(String) } attr_reader :jcb_payments + # The status of the Japanese customer_balance payments (JPY currency) capability of the account, or whether the account can directly process Japanese customer_balance charges. sig { returns(String) } attr_reader :jp_bank_transfer_payments + # The status of the KakaoPay capability of the account, or whether the account can directly process KakaoPay payments. sig { returns(String) } attr_reader :kakao_pay_payments + # The status of the Klarna payments capability of the account, or whether the account can directly process Klarna charges. sig { returns(String) } attr_reader :klarna_payments + # The status of the konbini payments capability of the account, or whether the account can directly process konbini charges. sig { returns(String) } attr_reader :konbini_payments + # The status of the KrCard capability of the account, or whether the account can directly process KrCard payments. sig { returns(String) } attr_reader :kr_card_payments + # The status of the legacy payments capability of the account. sig { returns(String) } attr_reader :legacy_payments + # The status of the link_payments capability of the account, or whether the account can directly process Link charges. sig { returns(String) } attr_reader :link_payments + # The status of the MB WAY payments capability of the account, or whether the account can directly process MB WAY charges. sig { returns(String) } attr_reader :mb_way_payments + # The status of the MobilePay capability of the account, or whether the account can directly process MobilePay charges. sig { returns(String) } attr_reader :mobilepay_payments + # The status of the Multibanco payments capability of the account, or whether the account can directly process Multibanco charges. sig { returns(String) } attr_reader :multibanco_payments + # The status of the Mexican customer_balance payments (MXN currency) capability of the account, or whether the account can directly process Mexican customer_balance charges. sig { returns(String) } attr_reader :mx_bank_transfer_payments + # The status of the NaverPay capability of the account, or whether the account can directly process NaverPay payments. sig { returns(String) } attr_reader :naver_pay_payments + # The status of the OXXO payments capability of the account, or whether the account can directly process OXXO charges. sig { returns(String) } attr_reader :oxxo_payments + # The status of the P24 payments capability of the account, or whether the account can directly process P24 charges. sig { returns(String) } attr_reader :p24_payments + # The status of the Payco capability of the account, or whether the account can directly process Payco payments. sig { returns(String) } attr_reader :payco_payments + # The status of the paynow payments capability of the account, or whether the account can directly process paynow charges. sig { returns(String) } attr_reader :paynow_payments + # The status of the PayPal payments capability of the account, or whether the account can directly process PayPal charges. sig { returns(String) } attr_reader :paypal_payments + # The status of the PayTo capability of the account, or whether the account can directly process PayTo charges. sig { returns(String) } attr_reader :payto_payments + # The status of the promptpay payments capability of the account, or whether the account can directly process promptpay charges. sig { returns(String) } attr_reader :promptpay_payments + # The status of the Qris capability of the account, or whether the account can directly process Qris payments. sig { returns(String) } attr_reader :qris_payments + # The status of the Rechnung capability of the account, or whether the account can directly process Rechnung payments. sig { returns(String) } attr_reader :rechnung_payments + # The status of the RevolutPay capability of the account, or whether the account can directly process RevolutPay payments. sig { returns(String) } attr_reader :revolut_pay_payments + # The status of the SamsungPay capability of the account, or whether the account can directly process SamsungPay payments. sig { returns(String) } attr_reader :samsung_pay_payments + # The status of the SEPA customer_balance payments (EUR currency) capability of the account, or whether the account can directly process SEPA customer_balance charges. sig { returns(String) } attr_reader :sepa_bank_transfer_payments + # The status of the SEPA Direct Debits payments capability of the account, or whether the account can directly process SEPA Direct Debits charges. sig { returns(String) } attr_reader :sepa_debit_payments + # The status of the ShopeePay capability of the account, or whether the account can directly process ShopeePay payments. sig { returns(String) } attr_reader :shopeepay_payments + # The status of the Sofort payments capability of the account, or whether the account can directly process Sofort charges. sig { returns(String) } attr_reader :sofort_payments + # The status of the Swish capability of the account, or whether the account can directly process Swish payments. sig { returns(String) } attr_reader :swish_payments + # The status of the tax reporting 1099-K (US) capability of the account. sig { returns(String) } attr_reader :tax_reporting_us_1099_k + # The status of the tax reporting 1099-MISC (US) capability of the account. sig { returns(String) } attr_reader :tax_reporting_us_1099_misc + # The status of the transfers capability of the account, or whether your platform can transfer funds to the account. sig { returns(String) } attr_reader :transfers + # The status of the banking capability, or whether the account can have bank accounts. sig { returns(String) } attr_reader :treasury + # The status of the treasury_evolve capability of the account. sig { returns(String) } attr_reader :treasury_evolve + # The status of the treasury_fifth_third capability of the account. sig { returns(String) } attr_reader :treasury_fifth_third + # The status of the treasury_goldman_sachs capability of the account. sig { returns(String) } attr_reader :treasury_goldman_sachs + # The status of the TWINT capability of the account, or whether the account can directly process TWINT charges. sig { returns(String) } attr_reader :twint_payments + # The status of the US bank account ACH payments capability of the account, or whether the account can directly process US bank account charges. sig { returns(String) } attr_reader :us_bank_account_ach_payments + # The status of the US customer_balance payments (USD currency) capability of the account, or whether the account can directly process US customer_balance charges. sig { returns(String) } attr_reader :us_bank_transfer_payments + # The status of the Zip capability of the account, or whether the account can directly process Zip charges. sig { returns(String) } attr_reader :zip_payments end class Company < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressKana < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class AddressKanji < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class OwnershipDeclaration < Stripe::StripeObject + # The Unix timestamp marking when the beneficial owner attestation was made. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the beneficial owner attestation was made. sig { returns(T.nilable(String)) } attr_reader :ip + # The user-agent string from the browser where the beneficial owner attestation was made. sig { returns(T.nilable(String)) } attr_reader :user_agent end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # A user-displayable string describing the verification state of this document. sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_corrupt`, `document_expired`, `document_failed_copy`, `document_failed_greyscale`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_not_readable`, `document_not_uploaded`, `document_type_not_supported`, or `document_too_large`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end + # Attribute for field document sig { returns(Document) } attr_reader :document end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The Kana variation of the company's primary address (Japan only). sig { returns(T.nilable(AddressKana)) } attr_reader :address_kana + # The Kanji variation of the company's primary address (Japan only). sig { returns(T.nilable(AddressKanji)) } attr_reader :address_kanji + # Whether the company's directors have been provided. This Boolean will be `true` if you've manually indicated that all directors are provided via [the `directors_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-directors_provided). sig { returns(T::Boolean) } attr_reader :directors_provided + # Whether the company's executives have been provided. This Boolean will be `true` if you've manually indicated that all executives are provided via [the `executives_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-executives_provided), or if Stripe determined that sufficient executives were provided. sig { returns(T::Boolean) } attr_reader :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). sig { returns(String) } attr_reader :export_license_id + # The purpose code to use for export transactions (India only). sig { returns(String) } attr_reader :export_purpose_code + # The company's legal name. sig { returns(T.nilable(String)) } attr_reader :name + # The Kana variation of the company's legal name (Japan only). sig { returns(T.nilable(String)) } attr_reader :name_kana + # The Kanji variation of the company's legal name (Japan only). sig { returns(T.nilable(String)) } attr_reader :name_kanji + # Whether the company's owners have been provided. This Boolean will be `true` if you've manually indicated that all owners are provided via [the `owners_provided` parameter](https://stripe.com/docs/api/accounts/update#update_account-company-owners_provided), or if Stripe determined that sufficient owners were provided. Stripe determines ownership requirements using both the number of owners provided and their total percent ownership (calculated by adding the `percent_ownership` of each owner together). sig { returns(T::Boolean) } attr_reader :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. sig { returns(T.nilable(OwnershipDeclaration)) } attr_reader :ownership_declaration + # The company's phone number (used for verification). sig { returns(T.nilable(String)) } attr_reader :phone + # The category identifying the legal structure of the company or legal entity. See [Business structure](https://stripe.com/docs/connect/identity-verification#business-structure) for more details. sig { returns(String) } attr_reader :structure + # Whether the company's business ID number was provided. sig { returns(T::Boolean) } attr_reader :tax_id_provided + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). sig { returns(String) } attr_reader :tax_id_registrar + # Whether the company's business VAT number was provided. sig { returns(T::Boolean) } attr_reader :vat_id_provided + # Information on the verification state of the company. sig { returns(T.nilable(Verification)) } attr_reader :verification end class Controller < Stripe::StripeObject class Application < Stripe::StripeObject + # `true` if the Connect application is responsible for negative balances and should manage credit and fraud risk on the account. sig { returns(T::Boolean) } attr_reader :loss_liable + # `true` if the Connect application is responsible for onboarding the account. sig { returns(T::Boolean) } attr_reader :onboarding_owner + # `true` if the Connect application is responsible for paying Stripe fees on pricing-control eligible products. sig { returns(T::Boolean) } attr_reader :pricing_controls end class Dashboard < Stripe::StripeObject + # Whether this account has access to the full Stripe dashboard (`full`), to the Express dashboard (`express`), or to no dashboard (`none`). sig { returns(String) } attr_reader :type end class Fees < Stripe::StripeObject + # A value indicating the responsible payer of a bundle of Stripe fees for pricing-control eligible products on this account. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). sig { returns(String) } attr_reader :payer end class Losses < Stripe::StripeObject + # A value indicating who is liable when this account can't pay back negative balances from payments. sig { returns(String) } attr_reader :payments end class StripeDashboard < Stripe::StripeObject + # A value indicating the Stripe dashboard this account has access to independent of the Connect application. sig { returns(String) } attr_reader :type end + # Attribute for field application sig { returns(Application) } attr_reader :application + # Attribute for field dashboard sig { returns(Dashboard) } attr_reader :dashboard + # Attribute for field fees sig { returns(Fees) } attr_reader :fees + # `true` if the Connect application retrieving the resource controls the account and can therefore exercise [platform controls](https://stripe.com/docs/connect/platform-controls-for-standard-accounts). Otherwise, this field is null. sig { returns(T::Boolean) } attr_reader :is_controller + # Attribute for field losses sig { returns(Losses) } attr_reader :losses + # A value indicating responsibility for collecting requirements on this account. Only returned when the Connect application retrieving the resource controls the account. sig { returns(String) } attr_reader :requirement_collection + # Attribute for field stripe_dashboard sig { returns(StripeDashboard) } attr_reader :stripe_dashboard + # The controller type. Can be `application`, if a Connect application controls the account, or `account`, if the account controls itself. sig { returns(String) } attr_reader :type end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on its enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. sig { returns(T.nilable(T::Array[String])) } attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class Groups < Stripe::StripeObject + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. sig { returns(T.nilable(String)) } attr_reader :payments_pricing end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the account enabled. These fields may disable the account sooner if the next threshold is reached before they are collected. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # If the account is disabled, this enum describes why. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. sig { returns(T.nilable(T::Array[String])) } attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class RiskControls < Stripe::StripeObject class Charges < Stripe::StripeObject + # Whether a pause of the risk control has been requested. sig { returns(T::Boolean) } attr_reader :pause_requested end class Payouts < Stripe::StripeObject + # Whether a pause of the risk control has been requested. sig { returns(T::Boolean) } attr_reader :pause_requested end + # Attribute for field charges sig { returns(Charges) } attr_reader :charges + # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts end class Settings < Stripe::StripeObject class BacsDebitPayments < Stripe::StripeObject + # The Bacs Direct Debit display name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. The fee appears 5 business days after requesting Bacs. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. sig { returns(T.nilable(String)) } attr_reader :display_name + # The Bacs Direct Debit Service user number for this account. For payments made with Bacs Direct Debit, this number is a unique identifier of the account with our banking partners. sig { returns(T.nilable(String)) } attr_reader :service_user_number end class BankBcaOnboarding < Stripe::StripeObject + # Bank BCA business account holder name. sig { returns(String) } attr_reader :account_holder_name + # Bank BCA business account number. sig { returns(String) } attr_reader :business_account_number end class Branding < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :logo + # A CSS hex color value representing the primary branding color for this account sig { returns(T.nilable(String)) } attr_reader :primary_color + # A CSS hex color value representing the secondary branding color for this account sig { returns(T.nilable(String)) } attr_reader :secondary_color end class Capital < Stripe::StripeObject + # Per-currency mapping of user-selected destination accounts used to pay out loans. sig { returns(T::Hash[String, String]) } attr_reader :payout_destination + # Per-currency mapping of all destination accounts eligible to receive loan payouts. sig { returns(T::Hash[String, T::Array[String]]) } attr_reader :payout_destination_selector end class CardIssuing < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the account representative accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the account representative accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. sig { returns(String) } attr_reader :user_agent end + # Attribute for field tos_acceptance sig { returns(TosAcceptance) } attr_reader :tos_acceptance end class CardPayments < Stripe::StripeObject class DeclineOn < Stripe::StripeObject + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. sig { returns(T::Boolean) } attr_reader :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. sig { returns(T::Boolean) } attr_reader :cvc_failure end + # Attribute for field decline_on sig { returns(DeclineOn) } attr_reader :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kanji end class Dashboard < Stripe::StripeObject + # The display name for this account. This is used on the Stripe Dashboard to differentiate between accounts. sig { returns(T.nilable(String)) } attr_reader :display_name + # The timezone used in the Stripe Dashboard for this account. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). sig { returns(T.nilable(String)) } attr_reader :timezone end class Invoices < Stripe::StripeObject + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :default_account_tax_ids end class Payments < Stripe::StripeObject + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_kanji + # The Kana variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kana + # The Kanji variation of `statement_descriptor_prefix` used for card charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_prefix_kanji end class Payouts < Stripe::StripeObject class Schedule < Stripe::StripeObject + # The number of days charges for the account will be held before being paid out. sig { returns(Integer) } attr_reader :delay_days + # How frequently funds will be paid out. One of `manual` (payouts only created via API call), `daily`, `weekly`, or `monthly`. sig { returns(String) } attr_reader :interval + # The day of the month funds will be paid out. Only shown if `interval` is monthly. Payouts scheduled between the 29th and 31st of the month are sent on the last day of shorter months. sig { returns(Integer) } attr_reader :monthly_anchor + # The day of the week funds will be paid out, of the style 'monday', 'tuesday', etc. Only shown if `interval` is weekly. sig { returns(String) } attr_reader :weekly_anchor end + # A Boolean indicating if Stripe should try to reclaim negative balances from an attached bank account. See [Understanding Connect account balances](/connect/account-balances) for details. The default value is `false` when [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, otherwise `true`. sig { returns(T::Boolean) } attr_reader :debit_negative_balances + # Attribute for field schedule sig { returns(Schedule) } attr_reader :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class SepaDebitPayments < Stripe::StripeObject + # SEPA creditor identifier that identifies the company making the payment. sig { returns(String) } attr_reader :creditor_id end class TaxForms < Stripe::StripeObject + # Whether the account opted out of receiving their tax forms by postal delivery. sig { returns(T::Boolean) } attr_reader :consented_to_paperless_delivery end class Treasury < Stripe::StripeObject class TosAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the account representative accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the account representative accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the account representative accepted the service agreement. sig { returns(String) } attr_reader :user_agent end + # Attribute for field tos_acceptance sig { returns(TosAcceptance) } attr_reader :tos_acceptance end + # Attribute for field bacs_debit_payments sig { returns(BacsDebitPayments) } attr_reader :bacs_debit_payments + # Attribute for field bank_bca_onboarding sig { returns(BankBcaOnboarding) } attr_reader :bank_bca_onboarding + # Attribute for field branding sig { returns(Branding) } attr_reader :branding + # Attribute for field capital sig { returns(Capital) } attr_reader :capital + # Attribute for field card_issuing sig { returns(CardIssuing) } attr_reader :card_issuing + # Attribute for field card_payments sig { returns(CardPayments) } attr_reader :card_payments + # Attribute for field dashboard sig { returns(Dashboard) } attr_reader :dashboard + # Attribute for field invoices sig { returns(Invoices) } attr_reader :invoices + # Attribute for field payments sig { returns(Payments) } attr_reader :payments + # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts + # Attribute for field sepa_debit_payments sig { returns(SepaDebitPayments) } attr_reader :sepa_debit_payments + # Attribute for field tax_forms sig { returns(TaxForms) } attr_reader :tax_forms + # Attribute for field treasury sig { returns(Treasury) } attr_reader :treasury end class TosAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the account representative accepted their service agreement sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the account representative accepted their service agreement sig { returns(T.nilable(String)) } attr_reader :ip + # The user's service agreement type sig { returns(String) } attr_reader :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement sig { returns(T.nilable(String)) } attr_reader :user_agent end - sig { returns(T.nilable(BusinessProfile)) } # Business information about the account. + sig { returns(T.nilable(BusinessProfile)) } attr_reader :business_profile - sig { returns(T.nilable(String)) } # The business type. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property is only returned for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(String)) } attr_reader :business_type - sig { returns(Capabilities) } # Attribute for field capabilities + sig { returns(Capabilities) } attr_reader :capabilities - sig { returns(T::Boolean) } # Whether the account can process charges. + sig { returns(T::Boolean) } attr_reader :charges_enabled - sig { returns(Company) } # Attribute for field company + sig { returns(Company) } attr_reader :company - sig { returns(Controller) } # Attribute for field controller + sig { returns(Controller) } attr_reader :controller - sig { returns(String) } # The account's country. + sig { returns(String) } attr_reader :country - sig { returns(Integer) } # Time at which the account was connected. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://stripe.com/docs/payouts). + sig { returns(String) } attr_reader :default_currency - sig { returns(T::Boolean) } # Whether account details have been submitted. Accounts with Stripe Dashboard access, which includes Standard accounts, cannot receive payouts before this is true. Accounts where this is false should be directed to [an onboarding flow](/connect/onboarding) to finish submitting account details. + sig { returns(T::Boolean) } attr_reader :details_submitted - sig { returns(T.nilable(String)) } # An email address associated with the account. It's not used for authentication and Stripe doesn't market to this field without explicit approval from the platform. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(Stripe::ListObject) } # External accounts (bank accounts and debit cards) currently attached to this account. External accounts are only returned for requests where `controller[is_controller]` is true. + sig { returns(Stripe::ListObject) } attr_reader :external_accounts - sig { returns(FutureRequirements) } # Attribute for field future_requirements + sig { returns(FutureRequirements) } attr_reader :future_requirements - sig { returns(T.nilable(Groups)) } # The groups associated with the account. + sig { returns(T.nilable(Groups)) } attr_reader :groups - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Stripe::Person) } # This is an object representing a person associated with a Stripe account. # # A platform cannot access a person for an account where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `stripe`, which includes Standard and Express accounts, after creating an Account Link or Account Session to start Connect onboarding. # # See the [Standard onboarding](/connect/standard-accounts) or [Express onboarding](/connect/express-accounts) documentation for information about prefilling information and account onboarding steps. Learn more about [handling identity verification with the API](/connect/handling-api-verification#person-information). + sig { returns(Stripe::Person) } attr_reader :individual - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Whether the funds in this account can be paid out. + sig { returns(T::Boolean) } attr_reader :payouts_enabled - sig { returns(Requirements) } # Attribute for field requirements + sig { returns(Requirements) } attr_reader :requirements - sig { returns(RiskControls) } # Attribute for field risk_controls + sig { returns(RiskControls) } attr_reader :risk_controls - sig { returns(T.nilable(Settings)) } # Options for customizing how the account functions within Stripe. + sig { returns(T.nilable(Settings)) } attr_reader :settings - sig { returns(TosAcceptance) } # Attribute for field tos_acceptance + sig { returns(TosAcceptance) } attr_reader :tos_acceptance - sig { returns(String) } # The Stripe account type. Can be `standard`, `express`, `custom`, or `none`. + sig { returns(String) } attr_reader :type - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(object: String, account_holder_name: String, account_holder_type: String, account_number: String, country: String, currency: String, routing_number: String).void + } + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ); end + end + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + sig { returns(String) } + attr_accessor :fiscal_year_end + sig { params(amount: Integer, currency: String, fiscal_year_end: String).void } + def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end + end + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The applicant's gross annual revenue for its preceding fiscal year. + sig { returns(::Stripe::Account::UpdateParams::BusinessProfile::AnnualRevenue) } + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + sig { returns(Integer) } + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + sig { returns(String) } + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + sig { returns(::Stripe::Account::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue) } + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + sig { returns(String) } + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + sig { returns(String) } + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + sig { returns(::Stripe::Account::UpdateParams::BusinessProfile::SupportAddress) } + attr_accessor :support_address + # A publicly available email address for sending support issues to. + sig { returns(String) } + attr_accessor :support_email + # A publicly available phone number to call with support issues. + sig { returns(String) } + attr_accessor :support_phone + # A publicly available website for handling support issues. + sig { returns(T.nilable(String)) } + attr_accessor :support_url + # The business's publicly available website. + sig { returns(String) } + attr_accessor :url + sig { + params(annual_revenue: ::Stripe::Account::UpdateParams::BusinessProfile::AnnualRevenue, estimated_worker_count: Integer, mcc: String, monthly_estimated_revenue: ::Stripe::Account::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue, name: String, product_description: String, support_address: ::Stripe::Account::UpdateParams::BusinessProfile::SupportAddress, support_email: String, support_phone: String, support_url: T.nilable(String), url: String).void + } + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ); end + end + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # The acss_debit_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AcssDebitPayments) } + attr_accessor :acss_debit_payments + # The affirm_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AffirmPayments) } + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AfterpayClearpayPayments) } + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AlmaPayments) } + attr_accessor :alma_payments + # The amazon_pay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AmazonPayPayments) } + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AuBecsDebitPayments) } + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::AutomaticIndirectTax) } + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::BancontactPayments) } + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::BankTransferPayments) } + attr_accessor :bank_transfer_payments + # The blik_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::BlikPayments) } + attr_accessor :blik_payments + # The boleto_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::BoletoPayments) } + attr_accessor :boleto_payments + # The card_issuing capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::CardIssuing) } + attr_accessor :card_issuing + # The card_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::CardPayments) } + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::CartesBancairesPayments) } + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::CashappPayments) } + attr_accessor :cashapp_payments + # The eps_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::EpsPayments) } + attr_accessor :eps_payments + # The fpx_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::FpxPayments) } + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::GbBankTransferPayments) } + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::GiropayPayments) } + attr_accessor :giropay_payments + # The gopay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::GopayPayments) } + attr_accessor :gopay_payments + # The grabpay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::GrabpayPayments) } + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::IdBankTransferPayments) } + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::IdBankTransferPaymentsBca) } + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::IdealPayments) } + attr_accessor :ideal_payments + # The india_international_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::IndiaInternationalPayments) } + attr_accessor :india_international_payments + # The jcb_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::JcbPayments) } + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::JpBankTransferPayments) } + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::KakaoPayPayments) } + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::KlarnaPayments) } + attr_accessor :klarna_payments + # The konbini_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::KonbiniPayments) } + attr_accessor :konbini_payments + # The kr_card_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::KrCardPayments) } + attr_accessor :kr_card_payments + # The legacy_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::LegacyPayments) } + attr_accessor :legacy_payments + # The link_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::LinkPayments) } + attr_accessor :link_payments + # The mb_way_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::MbWayPayments) } + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::MobilepayPayments) } + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::MultibancoPayments) } + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::MxBankTransferPayments) } + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::NaverPayPayments) } + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::OxxoPayments) } + attr_accessor :oxxo_payments + # The p24_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::P24Payments) } + attr_accessor :p24_payments + # The payco_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::PaycoPayments) } + attr_accessor :payco_payments + # The paynow_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::PaynowPayments) } + attr_accessor :paynow_payments + # The paypal_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::PaypalPayments) } + attr_accessor :paypal_payments + # The payto_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::PaytoPayments) } + attr_accessor :payto_payments + # The promptpay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::PromptpayPayments) } + attr_accessor :promptpay_payments + # The qris_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::QrisPayments) } + attr_accessor :qris_payments + # The rechnung_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::RechnungPayments) } + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::RevolutPayPayments) } + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::SamsungPayPayments) } + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::SepaBankTransferPayments) } + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::SepaDebitPayments) } + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::ShopeepayPayments) } + attr_accessor :shopeepay_payments + # The sofort_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::SofortPayments) } + attr_accessor :sofort_payments + # The swish_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::SwishPayments) } + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099K) } + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099Misc) } + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::Transfers) } + attr_accessor :transfers + # The treasury capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::Treasury) } + attr_accessor :treasury + # The treasury_evolve capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::TreasuryEvolve) } + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::TreasuryFifthThird) } + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::TreasuryGoldmanSachs) } + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::TwintPayments) } + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::UsBankAccountAchPayments) } + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::UsBankTransferPayments) } + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + sig { returns(::Stripe::Account::UpdateParams::Capabilities::ZipPayments) } + attr_accessor :zip_payments + sig { + params(acss_debit_payments: ::Stripe::Account::UpdateParams::Capabilities::AcssDebitPayments, affirm_payments: ::Stripe::Account::UpdateParams::Capabilities::AffirmPayments, afterpay_clearpay_payments: ::Stripe::Account::UpdateParams::Capabilities::AfterpayClearpayPayments, alma_payments: ::Stripe::Account::UpdateParams::Capabilities::AlmaPayments, amazon_pay_payments: ::Stripe::Account::UpdateParams::Capabilities::AmazonPayPayments, au_becs_debit_payments: ::Stripe::Account::UpdateParams::Capabilities::AuBecsDebitPayments, automatic_indirect_tax: ::Stripe::Account::UpdateParams::Capabilities::AutomaticIndirectTax, bacs_debit_payments: ::Stripe::Account::UpdateParams::Capabilities::BacsDebitPayments, bancontact_payments: ::Stripe::Account::UpdateParams::Capabilities::BancontactPayments, bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::BankTransferPayments, blik_payments: ::Stripe::Account::UpdateParams::Capabilities::BlikPayments, boleto_payments: ::Stripe::Account::UpdateParams::Capabilities::BoletoPayments, card_issuing: ::Stripe::Account::UpdateParams::Capabilities::CardIssuing, card_payments: ::Stripe::Account::UpdateParams::Capabilities::CardPayments, cartes_bancaires_payments: ::Stripe::Account::UpdateParams::Capabilities::CartesBancairesPayments, cashapp_payments: ::Stripe::Account::UpdateParams::Capabilities::CashappPayments, eps_payments: ::Stripe::Account::UpdateParams::Capabilities::EpsPayments, fpx_payments: ::Stripe::Account::UpdateParams::Capabilities::FpxPayments, gb_bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::GbBankTransferPayments, giropay_payments: ::Stripe::Account::UpdateParams::Capabilities::GiropayPayments, gopay_payments: ::Stripe::Account::UpdateParams::Capabilities::GopayPayments, grabpay_payments: ::Stripe::Account::UpdateParams::Capabilities::GrabpayPayments, id_bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::IdBankTransferPayments, id_bank_transfer_payments_bca: ::Stripe::Account::UpdateParams::Capabilities::IdBankTransferPaymentsBca, ideal_payments: ::Stripe::Account::UpdateParams::Capabilities::IdealPayments, india_international_payments: ::Stripe::Account::UpdateParams::Capabilities::IndiaInternationalPayments, jcb_payments: ::Stripe::Account::UpdateParams::Capabilities::JcbPayments, jp_bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::JpBankTransferPayments, kakao_pay_payments: ::Stripe::Account::UpdateParams::Capabilities::KakaoPayPayments, klarna_payments: ::Stripe::Account::UpdateParams::Capabilities::KlarnaPayments, konbini_payments: ::Stripe::Account::UpdateParams::Capabilities::KonbiniPayments, kr_card_payments: ::Stripe::Account::UpdateParams::Capabilities::KrCardPayments, legacy_payments: ::Stripe::Account::UpdateParams::Capabilities::LegacyPayments, link_payments: ::Stripe::Account::UpdateParams::Capabilities::LinkPayments, mb_way_payments: ::Stripe::Account::UpdateParams::Capabilities::MbWayPayments, mobilepay_payments: ::Stripe::Account::UpdateParams::Capabilities::MobilepayPayments, multibanco_payments: ::Stripe::Account::UpdateParams::Capabilities::MultibancoPayments, mx_bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::MxBankTransferPayments, naver_pay_payments: ::Stripe::Account::UpdateParams::Capabilities::NaverPayPayments, oxxo_payments: ::Stripe::Account::UpdateParams::Capabilities::OxxoPayments, p24_payments: ::Stripe::Account::UpdateParams::Capabilities::P24Payments, payco_payments: ::Stripe::Account::UpdateParams::Capabilities::PaycoPayments, paynow_payments: ::Stripe::Account::UpdateParams::Capabilities::PaynowPayments, paypal_payments: ::Stripe::Account::UpdateParams::Capabilities::PaypalPayments, payto_payments: ::Stripe::Account::UpdateParams::Capabilities::PaytoPayments, promptpay_payments: ::Stripe::Account::UpdateParams::Capabilities::PromptpayPayments, qris_payments: ::Stripe::Account::UpdateParams::Capabilities::QrisPayments, rechnung_payments: ::Stripe::Account::UpdateParams::Capabilities::RechnungPayments, revolut_pay_payments: ::Stripe::Account::UpdateParams::Capabilities::RevolutPayPayments, samsung_pay_payments: ::Stripe::Account::UpdateParams::Capabilities::SamsungPayPayments, sepa_bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::SepaBankTransferPayments, sepa_debit_payments: ::Stripe::Account::UpdateParams::Capabilities::SepaDebitPayments, shopeepay_payments: ::Stripe::Account::UpdateParams::Capabilities::ShopeepayPayments, sofort_payments: ::Stripe::Account::UpdateParams::Capabilities::SofortPayments, swish_payments: ::Stripe::Account::UpdateParams::Capabilities::SwishPayments, tax_reporting_us_1099_k: ::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099K, tax_reporting_us_1099_misc: ::Stripe::Account::UpdateParams::Capabilities::TaxReportingUs1099Misc, transfers: ::Stripe::Account::UpdateParams::Capabilities::Transfers, treasury: ::Stripe::Account::UpdateParams::Capabilities::Treasury, treasury_evolve: ::Stripe::Account::UpdateParams::Capabilities::TreasuryEvolve, treasury_fifth_third: ::Stripe::Account::UpdateParams::Capabilities::TreasuryFifthThird, treasury_goldman_sachs: ::Stripe::Account::UpdateParams::Capabilities::TreasuryGoldmanSachs, twint_payments: ::Stripe::Account::UpdateParams::Capabilities::TwintPayments, us_bank_account_ach_payments: ::Stripe::Account::UpdateParams::Capabilities::UsBankAccountAchPayments, us_bank_transfer_payments: ::Stripe::Account::UpdateParams::Capabilities::UsBankTransferPayments, zip_payments: ::Stripe::Account::UpdateParams::Capabilities::ZipPayments).void + } + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ); end + end + class Card < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field address_city + sig { returns(String) } + attr_accessor :address_city + # Attribute for param field address_country + sig { returns(String) } + attr_accessor :address_country + # Attribute for param field address_line1 + sig { returns(String) } + attr_accessor :address_line1 + # Attribute for param field address_line2 + sig { returns(String) } + attr_accessor :address_line2 + # Attribute for param field address_state + sig { returns(String) } + attr_accessor :address_state + # Attribute for param field address_zip + sig { returns(String) } + attr_accessor :address_zip + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field cvc + sig { returns(String) } + attr_accessor :cvc + # Attribute for param field exp_month + sig { returns(Integer) } + attr_accessor :exp_month + # Attribute for param field exp_year + sig { returns(Integer) } + attr_accessor :exp_year + # Attribute for param field name + sig { returns(String) } + attr_accessor :name + # Attribute for param field number + sig { returns(String) } + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Attribute for param field default_for_currency + sig { returns(T::Boolean) } + attr_accessor :default_for_currency + sig { + params(object: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: Integer, exp_year: Integer, name: String, number: String, metadata: T::Hash[String, String], default_for_currency: T::Boolean).void + } + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ); end + end + class CardToken < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field token + sig { returns(String) } + attr_accessor :token + sig { params(object: String, currency: String, token: String).void } + def initialize(object: nil, currency: nil, token: nil); end + end + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document verifying the business. + sig { returns(::Stripe::Account::UpdateParams::Company::Verification::Document) } + attr_accessor :document + sig { + params(document: ::Stripe::Account::UpdateParams::Company::Verification::Document).void + } + def initialize(document: nil); end + end + # The company's primary address. + sig { returns(::Stripe::Account::UpdateParams::Company::Address) } + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + sig { returns(::Stripe::Account::UpdateParams::Company::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + sig { returns(::Stripe::Account::UpdateParams::Company::AddressKanji) } + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + sig { returns(T::Boolean) } + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + sig { returns(T::Boolean) } + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + sig { returns(String) } + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + sig { returns(String) } + attr_accessor :export_purpose_code + # The company's legal name. + sig { returns(String) } + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + sig { returns(T::Boolean) } + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + sig { returns(::Stripe::Account::UpdateParams::Company::OwnershipDeclaration) } + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + sig { returns(String) } + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + sig { returns(String) } + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + sig { returns(T.nilable(String)) } + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + sig { returns(String) } + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + sig { returns(String) } + attr_accessor :tax_id_registrar + # The VAT number of the company. + sig { returns(String) } + attr_accessor :vat_id + # Information on the verification state of the company. + sig { returns(::Stripe::Account::UpdateParams::Company::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::Account::UpdateParams::Company::Address, address_kana: ::Stripe::Account::UpdateParams::Company::AddressKana, address_kanji: ::Stripe::Account::UpdateParams::Company::AddressKanji, directors_provided: T::Boolean, executives_provided: T::Boolean, export_license_id: String, export_purpose_code: String, name: String, name_kana: String, name_kanji: String, owners_provided: T::Boolean, ownership_declaration: ::Stripe::Account::UpdateParams::Company::OwnershipDeclaration, phone: String, registration_number: String, structure: T.nilable(String), tax_id: String, tax_id_registrar: String, vat_id: String, verification: ::Stripe::Account::UpdateParams::Company::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ); end + end + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + sig { + returns(::Stripe::Account::UpdateParams::Documents::BankAccountOwnershipVerification) + } + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + sig { returns(::Stripe::Account::UpdateParams::Documents::CompanyLicense) } + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + sig { returns(::Stripe::Account::UpdateParams::Documents::CompanyMemorandumOfAssociation) } + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + sig { returns(::Stripe::Account::UpdateParams::Documents::CompanyMinisterialDecree) } + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + sig { returns(::Stripe::Account::UpdateParams::Documents::CompanyRegistrationVerification) } + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + sig { returns(::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification) } + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + sig { returns(::Stripe::Account::UpdateParams::Documents::ProofOfRegistration) } + attr_accessor :proof_of_registration + sig { + params(bank_account_ownership_verification: ::Stripe::Account::UpdateParams::Documents::BankAccountOwnershipVerification, company_license: ::Stripe::Account::UpdateParams::Documents::CompanyLicense, company_memorandum_of_association: ::Stripe::Account::UpdateParams::Documents::CompanyMemorandumOfAssociation, company_ministerial_decree: ::Stripe::Account::UpdateParams::Documents::CompanyMinisterialDecree, company_registration_verification: ::Stripe::Account::UpdateParams::Documents::CompanyRegistrationVerification, company_tax_id_verification: ::Stripe::Account::UpdateParams::Documents::CompanyTaxIdVerification, proof_of_registration: ::Stripe::Account::UpdateParams::Documents::ProofOfRegistration).void + } + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ); end + end + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + sig { returns(T.nilable(String)) } + attr_accessor :payments_pricing + sig { params(payments_pricing: T.nilable(String)).void } + def initialize(payments_pricing: nil); end + end + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(director: T::Boolean, executive: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), title: String).void + } + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::Account::UpdateParams::Individual::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { returns(::Stripe::Account::UpdateParams::Individual::Verification::Document) } + attr_accessor :document + sig { + params(additional_document: ::Stripe::Account::UpdateParams::Individual::Verification::AdditionalDocument, document: ::Stripe::Account::UpdateParams::Individual::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # The individual's primary address. + sig { returns(::Stripe::Account::UpdateParams::Individual::Address) } + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + sig { returns(::Stripe::Account::UpdateParams::Individual::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + sig { returns(::Stripe::Account::UpdateParams::Individual::AddressKanji) } + attr_accessor :address_kanji + # The individual's date of birth. + sig { returns(T.nilable(::Stripe::Account::UpdateParams::Individual::Dob)) } + attr_accessor :dob + # The individual's email address. + sig { returns(String) } + attr_accessor :email + # The individual's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The individual's gender + sig { returns(String) } + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The individual's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The individual's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The individual's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The individual's registered address. + sig { returns(::Stripe::Account::UpdateParams::Individual::RegisteredAddress) } + attr_accessor :registered_address + # Describes the person’s relationship to the account. + sig { returns(::Stripe::Account::UpdateParams::Individual::Relationship) } + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The individual's verification document information. + sig { returns(::Stripe::Account::UpdateParams::Individual::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::Account::UpdateParams::Individual::Address, address_kana: ::Stripe::Account::UpdateParams::Individual::AddressKana, address_kanji: ::Stripe::Account::UpdateParams::Individual::AddressKanji, dob: T.nilable(::Stripe::Account::UpdateParams::Individual::Dob), email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), phone: String, political_exposure: String, registered_address: ::Stripe::Account::UpdateParams::Individual::RegisteredAddress, relationship: ::Stripe::Account::UpdateParams::Individual::Relationship, ssn_last_4: String, verification: ::Stripe::Account::UpdateParams::Individual::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::Account::UpdateParams::RiskControls::Charges) } + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::Account::UpdateParams::RiskControls::Payouts) } + attr_accessor :payouts + sig { + params(charges: ::Stripe::Account::UpdateParams::RiskControls::Charges, payouts: ::Stripe::Account::UpdateParams::RiskControls::Payouts).void + } + def initialize(charges: nil, payouts: nil); end + end + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + sig { returns(String) } + attr_accessor :display_name + sig { params(display_name: String).void } + def initialize(display_name: nil); end + end + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + sig { returns(String) } + attr_accessor :account_holder_name + # Bank BCA business account number + sig { returns(String) } + attr_accessor :business_account_number + sig { params(account_holder_name: String, business_account_number: String).void } + def initialize(account_holder_name: nil, business_account_number: nil); end + end + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + sig { returns(String) } + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + sig { returns(String) } + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + sig { returns(String) } + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + sig { returns(String) } + attr_accessor :secondary_color + sig { + params(icon: String, logo: String, primary_color: String, secondary_color: String).void + } + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end + end + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + sig { returns(T::Hash[String, String]) } + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + sig { returns(T::Hash[String, T::Array[String]]) } + attr_accessor :payout_destination_selector + sig { + params(payout_destination: T::Hash[String, String], payout_destination_selector: T::Hash[String, T::Array[String]]).void + } + def initialize(payout_destination: nil, payout_destination_selector: nil); end + end + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + sig { returns(::Stripe::Account::UpdateParams::Settings::CardIssuing::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::Account::UpdateParams::Settings::CardIssuing::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + sig { returns(T::Boolean) } + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + sig { returns(T::Boolean) } + attr_accessor :cvc_failure + sig { params(avs_failure: T::Boolean, cvc_failure: T::Boolean).void } + def initialize(avs_failure: nil, cvc_failure: nil); end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + sig { returns(::Stripe::Account::UpdateParams::Settings::CardPayments::DeclineOn) } + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(String) } + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kanji + sig { + params(decline_on: ::Stripe::Account::UpdateParams::Settings::CardPayments::DeclineOn, statement_descriptor_prefix: String, statement_descriptor_prefix_kana: T.nilable(String), statement_descriptor_prefix_kanji: T.nilable(String)).void + } + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ); end + end + class Invoices < Stripe::RequestParams + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_account_tax_ids + sig { params(default_account_tax_ids: T.nilable(T::Array[String])).void } + def initialize(default_account_tax_ids: nil); end + end + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kanji + sig { + params(statement_descriptor: String, statement_descriptor_kana: String, statement_descriptor_kanji: String).void + } + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ); end + end + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + sig { returns(T.any(String, Integer)) } + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + sig { returns(String) } + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + sig { returns(Integer) } + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + sig { returns(String) } + attr_accessor :weekly_anchor + sig { + params(delay_days: T.any(String, Integer), interval: String, monthly_anchor: Integer, weekly_anchor: String).void + } + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + weekly_anchor: nil + ); end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + sig { returns(T::Boolean) } + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + sig { returns(::Stripe::Account::UpdateParams::Settings::Payouts::Schedule) } + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(debit_negative_balances: T::Boolean, schedule: ::Stripe::Account::UpdateParams::Settings::Payouts::Schedule, statement_descriptor: String).void + } + def initialize( + debit_negative_balances: nil, + schedule: nil, + statement_descriptor: nil + ); end + end + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + sig { returns(T::Boolean) } + attr_accessor :consented_to_paperless_delivery + sig { params(consented_to_paperless_delivery: T::Boolean).void } + def initialize(consented_to_paperless_delivery: nil); end + end + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + sig { returns(::Stripe::Account::UpdateParams::Settings::Treasury::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::Account::UpdateParams::Settings::Treasury::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + # Settings specific to Bacs Direct Debit payments. + sig { returns(::Stripe::Account::UpdateParams::Settings::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + sig { returns(::Stripe::Account::UpdateParams::Settings::BankBcaOnboarding) } + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + sig { returns(::Stripe::Account::UpdateParams::Settings::Branding) } + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + sig { returns(::Stripe::Account::UpdateParams::Settings::Capital) } + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + sig { returns(::Stripe::Account::UpdateParams::Settings::CardIssuing) } + attr_accessor :card_issuing + # Settings specific to card charging on the account. + sig { returns(::Stripe::Account::UpdateParams::Settings::CardPayments) } + attr_accessor :card_payments + # Settings specific to the account's use of Invoices. + sig { returns(::Stripe::Account::UpdateParams::Settings::Invoices) } + attr_accessor :invoices + # Settings that apply across payment methods for charging on the account. + sig { returns(::Stripe::Account::UpdateParams::Settings::Payments) } + attr_accessor :payments + # Settings specific to the account's payouts. + sig { returns(::Stripe::Account::UpdateParams::Settings::Payouts) } + attr_accessor :payouts + # Settings specific to the account's tax forms. + sig { returns(::Stripe::Account::UpdateParams::Settings::TaxForms) } + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + sig { returns(::Stripe::Account::UpdateParams::Settings::Treasury) } + attr_accessor :treasury + sig { + params(bacs_debit_payments: ::Stripe::Account::UpdateParams::Settings::BacsDebitPayments, bank_bca_onboarding: ::Stripe::Account::UpdateParams::Settings::BankBcaOnboarding, branding: ::Stripe::Account::UpdateParams::Settings::Branding, capital: ::Stripe::Account::UpdateParams::Settings::Capital, card_issuing: ::Stripe::Account::UpdateParams::Settings::CardIssuing, card_payments: ::Stripe::Account::UpdateParams::Settings::CardPayments, invoices: ::Stripe::Account::UpdateParams::Settings::Invoices, payments: ::Stripe::Account::UpdateParams::Settings::Payments, payouts: ::Stripe::Account::UpdateParams::Settings::Payouts, tax_forms: ::Stripe::Account::UpdateParams::Settings::TaxForms, treasury: ::Stripe::Account::UpdateParams::Settings::Treasury).void + } + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + invoices: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ); end + end + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :ip + # The user's service agreement type. + sig { returns(String) } + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, service_agreement: String, user_agent: String).void + } + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + sig { returns(String) } + attr_accessor :account_token + # Business information about the account. + sig { returns(::Stripe::Account::UpdateParams::BusinessProfile) } + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(String) } + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + sig { returns(::Stripe::Account::UpdateParams::Capabilities) } + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::Account::UpdateParams::Company) } + attr_accessor :company + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + sig { returns(String) } + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::Account::UpdateParams::Documents) } + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { + returns(T.nilable(T.any(String, ::Stripe::Account::UpdateParams::BankAccount, ::Stripe::Account::UpdateParams::Card, ::Stripe::Account::UpdateParams::CardToken))) + } + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + sig { returns(::Stripe::Account::UpdateParams::Groups) } + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::Account::UpdateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::Account::UpdateParams::RiskControls) } + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + sig { returns(::Stripe::Account::UpdateParams::Settings) } + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + sig { returns(::Stripe::Account::UpdateParams::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(account_token: String, business_profile: ::Stripe::Account::UpdateParams::BusinessProfile, business_type: String, capabilities: ::Stripe::Account::UpdateParams::Capabilities, company: ::Stripe::Account::UpdateParams::Company, default_currency: String, documents: ::Stripe::Account::UpdateParams::Documents, email: String, expand: T::Array[String], external_account: T.nilable(T.any(String, ::Stripe::Account::UpdateParams::BankAccount, ::Stripe::Account::UpdateParams::Card, ::Stripe::Account::UpdateParams::CardToken)), groups: ::Stripe::Account::UpdateParams::Groups, individual: ::Stripe::Account::UpdateParams::Individual, metadata: T.nilable(T::Hash[String, String]), risk_controls: ::Stripe::Account::UpdateParams::RiskControls, settings: ::Stripe::Account::UpdateParams::Settings, tos_acceptance: ::Stripe::Account::UpdateParams::TosAcceptance).void + } + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return connected accounts that were created during the given date interval. + sig { returns(T.any(::Stripe::Account::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Account::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(object: String, account_holder_name: String, account_holder_type: String, account_number: String, country: String, currency: String, routing_number: String).void + } + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ); end + end + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + sig { returns(String) } + attr_accessor :fiscal_year_end + sig { params(amount: Integer, currency: String, fiscal_year_end: String).void } + def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end + end + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The applicant's gross annual revenue for its preceding fiscal year. + sig { returns(::Stripe::Account::CreateParams::BusinessProfile::AnnualRevenue) } + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + sig { returns(Integer) } + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + sig { returns(String) } + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + sig { returns(::Stripe::Account::CreateParams::BusinessProfile::MonthlyEstimatedRevenue) } + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + sig { returns(String) } + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + sig { returns(String) } + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + sig { returns(::Stripe::Account::CreateParams::BusinessProfile::SupportAddress) } + attr_accessor :support_address + # A publicly available email address for sending support issues to. + sig { returns(String) } + attr_accessor :support_email + # A publicly available phone number to call with support issues. + sig { returns(String) } + attr_accessor :support_phone + # A publicly available website for handling support issues. + sig { returns(T.nilable(String)) } + attr_accessor :support_url + # The business's publicly available website. + sig { returns(String) } + attr_accessor :url + sig { + params(annual_revenue: ::Stripe::Account::CreateParams::BusinessProfile::AnnualRevenue, estimated_worker_count: Integer, mcc: String, monthly_estimated_revenue: ::Stripe::Account::CreateParams::BusinessProfile::MonthlyEstimatedRevenue, name: String, product_description: String, support_address: ::Stripe::Account::CreateParams::BusinessProfile::SupportAddress, support_email: String, support_phone: String, support_url: T.nilable(String), url: String).void + } + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ); end + end + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # The acss_debit_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AcssDebitPayments) } + attr_accessor :acss_debit_payments + # The affirm_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AffirmPayments) } + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AfterpayClearpayPayments) } + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AlmaPayments) } + attr_accessor :alma_payments + # The amazon_pay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AmazonPayPayments) } + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AuBecsDebitPayments) } + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::AutomaticIndirectTax) } + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::BancontactPayments) } + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::BankTransferPayments) } + attr_accessor :bank_transfer_payments + # The blik_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::BlikPayments) } + attr_accessor :blik_payments + # The boleto_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::BoletoPayments) } + attr_accessor :boleto_payments + # The card_issuing capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::CardIssuing) } + attr_accessor :card_issuing + # The card_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::CardPayments) } + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::CartesBancairesPayments) } + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::CashappPayments) } + attr_accessor :cashapp_payments + # The eps_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::EpsPayments) } + attr_accessor :eps_payments + # The fpx_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::FpxPayments) } + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::GbBankTransferPayments) } + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::GiropayPayments) } + attr_accessor :giropay_payments + # The gopay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::GopayPayments) } + attr_accessor :gopay_payments + # The grabpay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::GrabpayPayments) } + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::IdBankTransferPayments) } + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::IdBankTransferPaymentsBca) } + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::IdealPayments) } + attr_accessor :ideal_payments + # The india_international_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::IndiaInternationalPayments) } + attr_accessor :india_international_payments + # The jcb_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::JcbPayments) } + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::JpBankTransferPayments) } + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::KakaoPayPayments) } + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::KlarnaPayments) } + attr_accessor :klarna_payments + # The konbini_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::KonbiniPayments) } + attr_accessor :konbini_payments + # The kr_card_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::KrCardPayments) } + attr_accessor :kr_card_payments + # The legacy_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::LegacyPayments) } + attr_accessor :legacy_payments + # The link_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::LinkPayments) } + attr_accessor :link_payments + # The mb_way_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::MbWayPayments) } + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::MobilepayPayments) } + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::MultibancoPayments) } + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::MxBankTransferPayments) } + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::NaverPayPayments) } + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::OxxoPayments) } + attr_accessor :oxxo_payments + # The p24_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::P24Payments) } + attr_accessor :p24_payments + # The payco_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::PaycoPayments) } + attr_accessor :payco_payments + # The paynow_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::PaynowPayments) } + attr_accessor :paynow_payments + # The paypal_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::PaypalPayments) } + attr_accessor :paypal_payments + # The payto_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::PaytoPayments) } + attr_accessor :payto_payments + # The promptpay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::PromptpayPayments) } + attr_accessor :promptpay_payments + # The qris_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::QrisPayments) } + attr_accessor :qris_payments + # The rechnung_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::RechnungPayments) } + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::RevolutPayPayments) } + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::SamsungPayPayments) } + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::SepaBankTransferPayments) } + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::SepaDebitPayments) } + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::ShopeepayPayments) } + attr_accessor :shopeepay_payments + # The sofort_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::SofortPayments) } + attr_accessor :sofort_payments + # The swish_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::SwishPayments) } + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099K) } + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099Misc) } + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::Transfers) } + attr_accessor :transfers + # The treasury capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::Treasury) } + attr_accessor :treasury + # The treasury_evolve capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::TreasuryEvolve) } + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::TreasuryFifthThird) } + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::TreasuryGoldmanSachs) } + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::TwintPayments) } + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::UsBankAccountAchPayments) } + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::UsBankTransferPayments) } + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + sig { returns(::Stripe::Account::CreateParams::Capabilities::ZipPayments) } + attr_accessor :zip_payments + sig { + params(acss_debit_payments: ::Stripe::Account::CreateParams::Capabilities::AcssDebitPayments, affirm_payments: ::Stripe::Account::CreateParams::Capabilities::AffirmPayments, afterpay_clearpay_payments: ::Stripe::Account::CreateParams::Capabilities::AfterpayClearpayPayments, alma_payments: ::Stripe::Account::CreateParams::Capabilities::AlmaPayments, amazon_pay_payments: ::Stripe::Account::CreateParams::Capabilities::AmazonPayPayments, au_becs_debit_payments: ::Stripe::Account::CreateParams::Capabilities::AuBecsDebitPayments, automatic_indirect_tax: ::Stripe::Account::CreateParams::Capabilities::AutomaticIndirectTax, bacs_debit_payments: ::Stripe::Account::CreateParams::Capabilities::BacsDebitPayments, bancontact_payments: ::Stripe::Account::CreateParams::Capabilities::BancontactPayments, bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::BankTransferPayments, blik_payments: ::Stripe::Account::CreateParams::Capabilities::BlikPayments, boleto_payments: ::Stripe::Account::CreateParams::Capabilities::BoletoPayments, card_issuing: ::Stripe::Account::CreateParams::Capabilities::CardIssuing, card_payments: ::Stripe::Account::CreateParams::Capabilities::CardPayments, cartes_bancaires_payments: ::Stripe::Account::CreateParams::Capabilities::CartesBancairesPayments, cashapp_payments: ::Stripe::Account::CreateParams::Capabilities::CashappPayments, eps_payments: ::Stripe::Account::CreateParams::Capabilities::EpsPayments, fpx_payments: ::Stripe::Account::CreateParams::Capabilities::FpxPayments, gb_bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::GbBankTransferPayments, giropay_payments: ::Stripe::Account::CreateParams::Capabilities::GiropayPayments, gopay_payments: ::Stripe::Account::CreateParams::Capabilities::GopayPayments, grabpay_payments: ::Stripe::Account::CreateParams::Capabilities::GrabpayPayments, id_bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::IdBankTransferPayments, id_bank_transfer_payments_bca: ::Stripe::Account::CreateParams::Capabilities::IdBankTransferPaymentsBca, ideal_payments: ::Stripe::Account::CreateParams::Capabilities::IdealPayments, india_international_payments: ::Stripe::Account::CreateParams::Capabilities::IndiaInternationalPayments, jcb_payments: ::Stripe::Account::CreateParams::Capabilities::JcbPayments, jp_bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::JpBankTransferPayments, kakao_pay_payments: ::Stripe::Account::CreateParams::Capabilities::KakaoPayPayments, klarna_payments: ::Stripe::Account::CreateParams::Capabilities::KlarnaPayments, konbini_payments: ::Stripe::Account::CreateParams::Capabilities::KonbiniPayments, kr_card_payments: ::Stripe::Account::CreateParams::Capabilities::KrCardPayments, legacy_payments: ::Stripe::Account::CreateParams::Capabilities::LegacyPayments, link_payments: ::Stripe::Account::CreateParams::Capabilities::LinkPayments, mb_way_payments: ::Stripe::Account::CreateParams::Capabilities::MbWayPayments, mobilepay_payments: ::Stripe::Account::CreateParams::Capabilities::MobilepayPayments, multibanco_payments: ::Stripe::Account::CreateParams::Capabilities::MultibancoPayments, mx_bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::MxBankTransferPayments, naver_pay_payments: ::Stripe::Account::CreateParams::Capabilities::NaverPayPayments, oxxo_payments: ::Stripe::Account::CreateParams::Capabilities::OxxoPayments, p24_payments: ::Stripe::Account::CreateParams::Capabilities::P24Payments, payco_payments: ::Stripe::Account::CreateParams::Capabilities::PaycoPayments, paynow_payments: ::Stripe::Account::CreateParams::Capabilities::PaynowPayments, paypal_payments: ::Stripe::Account::CreateParams::Capabilities::PaypalPayments, payto_payments: ::Stripe::Account::CreateParams::Capabilities::PaytoPayments, promptpay_payments: ::Stripe::Account::CreateParams::Capabilities::PromptpayPayments, qris_payments: ::Stripe::Account::CreateParams::Capabilities::QrisPayments, rechnung_payments: ::Stripe::Account::CreateParams::Capabilities::RechnungPayments, revolut_pay_payments: ::Stripe::Account::CreateParams::Capabilities::RevolutPayPayments, samsung_pay_payments: ::Stripe::Account::CreateParams::Capabilities::SamsungPayPayments, sepa_bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::SepaBankTransferPayments, sepa_debit_payments: ::Stripe::Account::CreateParams::Capabilities::SepaDebitPayments, shopeepay_payments: ::Stripe::Account::CreateParams::Capabilities::ShopeepayPayments, sofort_payments: ::Stripe::Account::CreateParams::Capabilities::SofortPayments, swish_payments: ::Stripe::Account::CreateParams::Capabilities::SwishPayments, tax_reporting_us_1099_k: ::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099K, tax_reporting_us_1099_misc: ::Stripe::Account::CreateParams::Capabilities::TaxReportingUs1099Misc, transfers: ::Stripe::Account::CreateParams::Capabilities::Transfers, treasury: ::Stripe::Account::CreateParams::Capabilities::Treasury, treasury_evolve: ::Stripe::Account::CreateParams::Capabilities::TreasuryEvolve, treasury_fifth_third: ::Stripe::Account::CreateParams::Capabilities::TreasuryFifthThird, treasury_goldman_sachs: ::Stripe::Account::CreateParams::Capabilities::TreasuryGoldmanSachs, twint_payments: ::Stripe::Account::CreateParams::Capabilities::TwintPayments, us_bank_account_ach_payments: ::Stripe::Account::CreateParams::Capabilities::UsBankAccountAchPayments, us_bank_transfer_payments: ::Stripe::Account::CreateParams::Capabilities::UsBankTransferPayments, zip_payments: ::Stripe::Account::CreateParams::Capabilities::ZipPayments).void + } + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ); end + end + class Card < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field address_city + sig { returns(String) } + attr_accessor :address_city + # Attribute for param field address_country + sig { returns(String) } + attr_accessor :address_country + # Attribute for param field address_line1 + sig { returns(String) } + attr_accessor :address_line1 + # Attribute for param field address_line2 + sig { returns(String) } + attr_accessor :address_line2 + # Attribute for param field address_state + sig { returns(String) } + attr_accessor :address_state + # Attribute for param field address_zip + sig { returns(String) } + attr_accessor :address_zip + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field cvc + sig { returns(String) } + attr_accessor :cvc + # Attribute for param field exp_month + sig { returns(Integer) } + attr_accessor :exp_month + # Attribute for param field exp_year + sig { returns(Integer) } + attr_accessor :exp_year + # Attribute for param field name + sig { returns(String) } + attr_accessor :name + # Attribute for param field number + sig { returns(String) } + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Attribute for param field default_for_currency + sig { returns(T::Boolean) } + attr_accessor :default_for_currency + sig { + params(object: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: Integer, exp_year: Integer, name: String, number: String, metadata: T::Hash[String, String], default_for_currency: T::Boolean).void + } + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ); end + end + class CardToken < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field token + sig { returns(String) } + attr_accessor :token + sig { params(object: String, currency: String, token: String).void } + def initialize(object: nil, currency: nil, token: nil); end + end + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document verifying the business. + sig { returns(::Stripe::Account::CreateParams::Company::Verification::Document) } + attr_accessor :document + sig { + params(document: ::Stripe::Account::CreateParams::Company::Verification::Document).void + } + def initialize(document: nil); end + end + # The company's primary address. + sig { returns(::Stripe::Account::CreateParams::Company::Address) } + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + sig { returns(::Stripe::Account::CreateParams::Company::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + sig { returns(::Stripe::Account::CreateParams::Company::AddressKanji) } + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + sig { returns(T::Boolean) } + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + sig { returns(T::Boolean) } + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + sig { returns(String) } + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + sig { returns(String) } + attr_accessor :export_purpose_code + # The company's legal name. + sig { returns(String) } + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + sig { returns(T::Boolean) } + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + sig { returns(::Stripe::Account::CreateParams::Company::OwnershipDeclaration) } + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + sig { returns(String) } + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + sig { returns(String) } + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + sig { returns(T.nilable(String)) } + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + sig { returns(String) } + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + sig { returns(String) } + attr_accessor :tax_id_registrar + # The VAT number of the company. + sig { returns(String) } + attr_accessor :vat_id + # Information on the verification state of the company. + sig { returns(::Stripe::Account::CreateParams::Company::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::Account::CreateParams::Company::Address, address_kana: ::Stripe::Account::CreateParams::Company::AddressKana, address_kanji: ::Stripe::Account::CreateParams::Company::AddressKanji, directors_provided: T::Boolean, executives_provided: T::Boolean, export_license_id: String, export_purpose_code: String, name: String, name_kana: String, name_kanji: String, owners_provided: T::Boolean, ownership_declaration: ::Stripe::Account::CreateParams::Company::OwnershipDeclaration, phone: String, registration_number: String, structure: T.nilable(String), tax_id: String, tax_id_registrar: String, vat_id: String, verification: ::Stripe::Account::CreateParams::Company::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ); end + end + class Controller < Stripe::RequestParams + class Application < Stripe::RequestParams + # Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + sig { returns(T::Boolean) } + attr_accessor :loss_liable + # Whether the controller owns onboarding for this account. + sig { returns(T::Boolean) } + attr_accessor :onboarding_owner + # Whether the controller has pricing controls for this account. + sig { returns(T::Boolean) } + attr_accessor :pricing_controls + sig { + params(loss_liable: T::Boolean, onboarding_owner: T::Boolean, pricing_controls: T::Boolean).void + } + def initialize(loss_liable: nil, onboarding_owner: nil, pricing_controls: nil); end + end + class Dashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Fees < Stripe::RequestParams + # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + sig { returns(String) } + attr_accessor :payer + sig { params(payer: String).void } + def initialize(payer: nil); end + end + class Losses < Stripe::RequestParams + # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + sig { returns(String) } + attr_accessor :payments + sig { params(payments: String).void } + def initialize(payments: nil); end + end + class StripeDashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # A hash of configuration describing the Connect application that controls the account. + sig { returns(::Stripe::Account::CreateParams::Controller::Application) } + attr_accessor :application + # Properties of the account's dashboard. + sig { returns(::Stripe::Account::CreateParams::Controller::Dashboard) } + attr_accessor :dashboard + # A hash of configuration for who pays Stripe fees for product usage on this account. + sig { returns(::Stripe::Account::CreateParams::Controller::Fees) } + attr_accessor :fees + # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + sig { returns(::Stripe::Account::CreateParams::Controller::Losses) } + attr_accessor :losses + # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. + sig { returns(String) } + attr_accessor :requirement_collection + # A hash of configuration for Stripe-hosted dashboards. + sig { returns(::Stripe::Account::CreateParams::Controller::StripeDashboard) } + attr_accessor :stripe_dashboard + sig { + params(application: ::Stripe::Account::CreateParams::Controller::Application, dashboard: ::Stripe::Account::CreateParams::Controller::Dashboard, fees: ::Stripe::Account::CreateParams::Controller::Fees, losses: ::Stripe::Account::CreateParams::Controller::Losses, requirement_collection: String, stripe_dashboard: ::Stripe::Account::CreateParams::Controller::StripeDashboard).void + } + def initialize( + application: nil, + dashboard: nil, + fees: nil, + losses: nil, + requirement_collection: nil, + stripe_dashboard: nil + ); end + end + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + sig { + returns(::Stripe::Account::CreateParams::Documents::BankAccountOwnershipVerification) + } + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + sig { returns(::Stripe::Account::CreateParams::Documents::CompanyLicense) } + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + sig { returns(::Stripe::Account::CreateParams::Documents::CompanyMemorandumOfAssociation) } + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + sig { returns(::Stripe::Account::CreateParams::Documents::CompanyMinisterialDecree) } + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + sig { returns(::Stripe::Account::CreateParams::Documents::CompanyRegistrationVerification) } + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + sig { returns(::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification) } + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + sig { returns(::Stripe::Account::CreateParams::Documents::ProofOfRegistration) } + attr_accessor :proof_of_registration + sig { + params(bank_account_ownership_verification: ::Stripe::Account::CreateParams::Documents::BankAccountOwnershipVerification, company_license: ::Stripe::Account::CreateParams::Documents::CompanyLicense, company_memorandum_of_association: ::Stripe::Account::CreateParams::Documents::CompanyMemorandumOfAssociation, company_ministerial_decree: ::Stripe::Account::CreateParams::Documents::CompanyMinisterialDecree, company_registration_verification: ::Stripe::Account::CreateParams::Documents::CompanyRegistrationVerification, company_tax_id_verification: ::Stripe::Account::CreateParams::Documents::CompanyTaxIdVerification, proof_of_registration: ::Stripe::Account::CreateParams::Documents::ProofOfRegistration).void + } + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ); end + end + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + sig { returns(T.nilable(String)) } + attr_accessor :payments_pricing + sig { params(payments_pricing: T.nilable(String)).void } + def initialize(payments_pricing: nil); end + end + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(director: T::Boolean, executive: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), title: String).void + } + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::Account::CreateParams::Individual::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { returns(::Stripe::Account::CreateParams::Individual::Verification::Document) } + attr_accessor :document + sig { + params(additional_document: ::Stripe::Account::CreateParams::Individual::Verification::AdditionalDocument, document: ::Stripe::Account::CreateParams::Individual::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # The individual's primary address. + sig { returns(::Stripe::Account::CreateParams::Individual::Address) } + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + sig { returns(::Stripe::Account::CreateParams::Individual::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + sig { returns(::Stripe::Account::CreateParams::Individual::AddressKanji) } + attr_accessor :address_kanji + # The individual's date of birth. + sig { returns(T.nilable(::Stripe::Account::CreateParams::Individual::Dob)) } + attr_accessor :dob + # The individual's email address. + sig { returns(String) } + attr_accessor :email + # The individual's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The individual's gender + sig { returns(String) } + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The individual's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The individual's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The individual's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The individual's registered address. + sig { returns(::Stripe::Account::CreateParams::Individual::RegisteredAddress) } + attr_accessor :registered_address + # Describes the person’s relationship to the account. + sig { returns(::Stripe::Account::CreateParams::Individual::Relationship) } + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The individual's verification document information. + sig { returns(::Stripe::Account::CreateParams::Individual::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::Account::CreateParams::Individual::Address, address_kana: ::Stripe::Account::CreateParams::Individual::AddressKana, address_kanji: ::Stripe::Account::CreateParams::Individual::AddressKanji, dob: T.nilable(::Stripe::Account::CreateParams::Individual::Dob), email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), phone: String, political_exposure: String, registered_address: ::Stripe::Account::CreateParams::Individual::RegisteredAddress, relationship: ::Stripe::Account::CreateParams::Individual::Relationship, ssn_last_4: String, verification: ::Stripe::Account::CreateParams::Individual::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::Account::CreateParams::RiskControls::Charges) } + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::Account::CreateParams::RiskControls::Payouts) } + attr_accessor :payouts + sig { + params(charges: ::Stripe::Account::CreateParams::RiskControls::Charges, payouts: ::Stripe::Account::CreateParams::RiskControls::Payouts).void + } + def initialize(charges: nil, payouts: nil); end + end + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + sig { returns(String) } + attr_accessor :display_name + sig { params(display_name: String).void } + def initialize(display_name: nil); end + end + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + sig { returns(String) } + attr_accessor :account_holder_name + # Bank BCA business account number + sig { returns(String) } + attr_accessor :business_account_number + sig { params(account_holder_name: String, business_account_number: String).void } + def initialize(account_holder_name: nil, business_account_number: nil); end + end + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + sig { returns(String) } + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + sig { returns(String) } + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + sig { returns(String) } + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + sig { returns(String) } + attr_accessor :secondary_color + sig { + params(icon: String, logo: String, primary_color: String, secondary_color: String).void + } + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end + end + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + sig { returns(T::Hash[String, String]) } + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + sig { returns(T::Hash[String, T::Array[String]]) } + attr_accessor :payout_destination_selector + sig { + params(payout_destination: T::Hash[String, String], payout_destination_selector: T::Hash[String, T::Array[String]]).void + } + def initialize(payout_destination: nil, payout_destination_selector: nil); end + end + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + sig { returns(::Stripe::Account::CreateParams::Settings::CardIssuing::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::Account::CreateParams::Settings::CardIssuing::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + sig { returns(T::Boolean) } + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + sig { returns(T::Boolean) } + attr_accessor :cvc_failure + sig { params(avs_failure: T::Boolean, cvc_failure: T::Boolean).void } + def initialize(avs_failure: nil, cvc_failure: nil); end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + sig { returns(::Stripe::Account::CreateParams::Settings::CardPayments::DeclineOn) } + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(String) } + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kanji + sig { + params(decline_on: ::Stripe::Account::CreateParams::Settings::CardPayments::DeclineOn, statement_descriptor_prefix: String, statement_descriptor_prefix_kana: T.nilable(String), statement_descriptor_prefix_kanji: T.nilable(String)).void + } + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ); end + end + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kanji + sig { + params(statement_descriptor: String, statement_descriptor_kana: String, statement_descriptor_kanji: String).void + } + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ); end + end + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + sig { returns(T.any(String, Integer)) } + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + sig { returns(String) } + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + sig { returns(Integer) } + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + sig { returns(String) } + attr_accessor :weekly_anchor + sig { + params(delay_days: T.any(String, Integer), interval: String, monthly_anchor: Integer, weekly_anchor: String).void + } + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + weekly_anchor: nil + ); end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + sig { returns(T::Boolean) } + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + sig { returns(::Stripe::Account::CreateParams::Settings::Payouts::Schedule) } + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(debit_negative_balances: T::Boolean, schedule: ::Stripe::Account::CreateParams::Settings::Payouts::Schedule, statement_descriptor: String).void + } + def initialize( + debit_negative_balances: nil, + schedule: nil, + statement_descriptor: nil + ); end + end + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + sig { returns(T::Boolean) } + attr_accessor :consented_to_paperless_delivery + sig { params(consented_to_paperless_delivery: T::Boolean).void } + def initialize(consented_to_paperless_delivery: nil); end + end + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + sig { returns(::Stripe::Account::CreateParams::Settings::Treasury::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::Account::CreateParams::Settings::Treasury::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + # Settings specific to Bacs Direct Debit. + sig { returns(::Stripe::Account::CreateParams::Settings::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + sig { returns(::Stripe::Account::CreateParams::Settings::BankBcaOnboarding) } + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + sig { returns(::Stripe::Account::CreateParams::Settings::Branding) } + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + sig { returns(::Stripe::Account::CreateParams::Settings::Capital) } + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + sig { returns(::Stripe::Account::CreateParams::Settings::CardIssuing) } + attr_accessor :card_issuing + # Settings specific to card charging on the account. + sig { returns(::Stripe::Account::CreateParams::Settings::CardPayments) } + attr_accessor :card_payments + # Settings that apply across payment methods for charging on the account. + sig { returns(::Stripe::Account::CreateParams::Settings::Payments) } + attr_accessor :payments + # Settings specific to the account's payouts. + sig { returns(::Stripe::Account::CreateParams::Settings::Payouts) } + attr_accessor :payouts + # Settings specific to the account's tax forms. + sig { returns(::Stripe::Account::CreateParams::Settings::TaxForms) } + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + sig { returns(::Stripe::Account::CreateParams::Settings::Treasury) } + attr_accessor :treasury + sig { + params(bacs_debit_payments: ::Stripe::Account::CreateParams::Settings::BacsDebitPayments, bank_bca_onboarding: ::Stripe::Account::CreateParams::Settings::BankBcaOnboarding, branding: ::Stripe::Account::CreateParams::Settings::Branding, capital: ::Stripe::Account::CreateParams::Settings::Capital, card_issuing: ::Stripe::Account::CreateParams::Settings::CardIssuing, card_payments: ::Stripe::Account::CreateParams::Settings::CardPayments, payments: ::Stripe::Account::CreateParams::Settings::Payments, payouts: ::Stripe::Account::CreateParams::Settings::Payouts, tax_forms: ::Stripe::Account::CreateParams::Settings::TaxForms, treasury: ::Stripe::Account::CreateParams::Settings::Treasury).void + } + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ); end + end + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :ip + # The user's service agreement type. + sig { returns(String) } + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, service_agreement: String, user_agent: String).void + } + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + sig { returns(String) } + attr_accessor :account_token + # Business information about the account. + sig { returns(::Stripe::Account::CreateParams::BusinessProfile) } + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(String) } + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + sig { returns(::Stripe::Account::CreateParams::Capabilities) } + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::Account::CreateParams::Company) } + attr_accessor :company + # A hash of configuration describing the account controller's attributes. + sig { returns(::Stripe::Account::CreateParams::Controller) } + attr_accessor :controller + # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. + sig { returns(String) } + attr_accessor :country + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + sig { returns(String) } + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::Account::CreateParams::Documents) } + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { + returns(T.any(String, ::Stripe::Account::CreateParams::BankAccount, ::Stripe::Account::CreateParams::Card, ::Stripe::Account::CreateParams::CardToken)) + } + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + sig { returns(::Stripe::Account::CreateParams::Groups) } + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::Account::CreateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::Account::CreateParams::RiskControls) } + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + sig { returns(::Stripe::Account::CreateParams::Settings) } + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + sig { returns(::Stripe::Account::CreateParams::TosAcceptance) } + attr_accessor :tos_acceptance + # The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + sig { returns(String) } + attr_accessor :type + sig { + params(account_token: String, business_profile: ::Stripe::Account::CreateParams::BusinessProfile, business_type: String, capabilities: ::Stripe::Account::CreateParams::Capabilities, company: ::Stripe::Account::CreateParams::Company, controller: ::Stripe::Account::CreateParams::Controller, country: String, default_currency: String, documents: ::Stripe::Account::CreateParams::Documents, email: String, expand: T::Array[String], external_account: T.any(String, ::Stripe::Account::CreateParams::BankAccount, ::Stripe::Account::CreateParams::Card, ::Stripe::Account::CreateParams::CardToken), groups: ::Stripe::Account::CreateParams::Groups, individual: ::Stripe::Account::CreateParams::Individual, metadata: T.nilable(T::Hash[String, String]), risk_controls: ::Stripe::Account::CreateParams::RiskControls, settings: ::Stripe::Account::CreateParams::Settings, tos_acceptance: ::Stripe::Account::CreateParams::TosAcceptance, type: String).void + } + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + controller: nil, + country: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil, + type: nil + ); end + end + class PersonsParams < Stripe::RequestParams + class Relationship < Stripe::RequestParams + # A filter on the list of people returned based on whether these people are authorizers of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :authorizer + # A filter on the list of people returned based on whether these people are directors of the account's company. + sig { returns(T::Boolean) } + attr_accessor :director + # A filter on the list of people returned based on whether these people are executives of the account's company. + sig { returns(T::Boolean) } + attr_accessor :executive + # A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :legal_guardian + # A filter on the list of people returned based on whether these people are owners of the account's company. + sig { returns(T::Boolean) } + attr_accessor :owner + # A filter on the list of people returned based on whether these people are the representative of the account's company. + sig { returns(T::Boolean) } + attr_accessor :representative + sig { + params(authorizer: T::Boolean, director: T::Boolean, executive: T::Boolean, legal_guardian: T::Boolean, owner: T::Boolean, representative: T::Boolean).void + } + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + representative: nil + ); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filters on the list of people returned based on the person's relationship to the account's company. + sig { returns(::Stripe::Account::PersonsParams::Relationship) } + attr_accessor :relationship + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, relationship: ::Stripe::Account::PersonsParams::Relationship, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + relationship: nil, + starting_after: nil + ); end + end + class RejectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + sig { returns(String) } + attr_accessor :reason + sig { params(expand: T::Array[String], reason: String).void } + def initialize(expand: nil, reason: nil); end + end + # With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. + # To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). + # + # If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when + # creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding. + # You can prefill any information on the account. + sig { + params(params: T.any(::Stripe::Account::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def self.create(params = {}, opts = {}); end + + # With [Connect](https://stripe.com/connect), you can delete accounts you manage. + # + # Test-mode accounts can be deleted at any time. + # + # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. + # + # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + sig { + params(id: String, params: T.any(::Stripe::Account::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def self.delete(id, params = {}, opts = {}); end + + # With [Connect](https://stripe.com/connect), you can delete accounts you manage. + # + # Test-mode accounts can be deleted at any time. + # + # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. + # + # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + sig { + params(params: T.any(::Stripe::Account::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def delete(params = {}, opts = {}); end + + # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty. + sig { + params(params: T.any(::Stripe::Account::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + sig { + params(params: T.any(::Stripe::Account::PersonsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def persons(params = {}, opts = {}); end + + # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + sig { + params(account: String, params: T.any(::Stripe::Account::PersonsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.persons(account, params = {}, opts = {}); end + + # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious. + # + # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. + sig { + params(params: T.any(::Stripe::Account::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def reject(params = {}, opts = {}); end + + # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious. + # + # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. + sig { + params(account: String, params: T.any(::Stripe::Account::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def self.reject(account, params = {}, opts = {}); end + + # Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are + # left unchanged. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is application, which includes Custom accounts, you can update any information on the account. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is stripe, which includes Standard and Express accounts, you can update all information until you create + # an [Account Link or Account Session](https://stripe.com/api/account_links) to start Connect onboarding, + # after which some properties can no longer be updated. + # + # To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our + # [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. + sig { + params(id: String, params: T.any(::Stripe::Account::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_link.rbi b/rbi/stripe/resources/account_link.rbi index 63551fb51..c91d704d4 100644 --- a/rbi/stripe/resources/account_link.rbi +++ b/rbi/stripe/resources/account_link.rbi @@ -8,17 +8,67 @@ module Stripe # # Related guide: [Connect Onboarding](https://stripe.com/docs/connect/custom/hosted-onboarding) class AccountLink < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created # The timestamp at which this account link will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The URL for the account link. + sig { returns(String) } attr_reader :url + class CreateParams < Stripe::RequestParams + class CollectionOptions < Stripe::RequestParams + # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. + sig { returns(String) } + attr_accessor :fields + # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + sig { returns(String) } + attr_accessor :future_requirements + sig { params(fields: String, future_requirements: String).void } + def initialize(fields: nil, future_requirements: nil); end + end + # The identifier of the account to create an account link for. + sig { returns(String) } + attr_accessor :account + # The collect parameter is deprecated. Use `collection_options` instead. + sig { returns(String) } + attr_accessor :collect + # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. + sig { returns(::Stripe::AccountLink::CreateParams::CollectionOptions) } + attr_accessor :collection_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. + sig { returns(String) } + attr_accessor :refresh_url + # The URL that the user will be redirected to upon leaving or completing the linked flow. + sig { returns(String) } + attr_accessor :return_url + # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + sig { returns(String) } + attr_accessor :type + sig { + params(account: String, collect: String, collection_options: ::Stripe::AccountLink::CreateParams::CollectionOptions, expand: T::Array[String], refresh_url: String, return_url: String, type: String).void + } + def initialize( + account: nil, + collect: nil, + collection_options: nil, + expand: nil, + refresh_url: nil, + return_url: nil, + type: nil + ); end + end + # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. + sig { + params(params: T.any(::Stripe::AccountLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountLink) + } + def self.create(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_notice.rbi b/rbi/stripe/resources/account_notice.rbi index 430ba2ecb..1828390a6 100644 --- a/rbi/stripe/resources/account_notice.rbi +++ b/rbi/stripe/resources/account_notice.rbi @@ -8,50 +8,132 @@ module Stripe # See the [guide to send notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) to your connected accounts. class AccountNotice < APIResource class Email < Stripe::StripeObject + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. sig { returns(String) } attr_reader :plain_text + # Email address of the recipient. sig { returns(String) } attr_reader :recipient + # Subject of the email. sig { returns(String) } attr_reader :subject end class LinkedObjects < Stripe::StripeObject + # Associated [Capability](https://stripe.com/docs/api/capabilities) sig { returns(T.nilable(String)) } attr_reader :capability + # Associated [Credit Underwriting Record](https://stripe.com/docs/api/issuing/credit_underwriting_record) sig { returns(T.nilable(String)) } attr_reader :issuing_credit_underwriting_record + # Associated [Issuing Dispute](https://stripe.com/docs/api/issuing/disputes) sig { returns(T.nilable(String)) } attr_reader :issuing_dispute end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } # When present, the deadline for sending the notice to meet the relevant regulations. + sig { returns(T.nilable(Integer)) } attr_reader :deadline - sig { returns(T.nilable(Email)) } # Information about the email when sent. + sig { returns(T.nilable(Email)) } attr_reader :email - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LinkedObjects)) } # Information about objects related to the notice. + sig { returns(T.nilable(LinkedObjects)) } attr_reader :linked_objects - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Reason the notice is being sent. The reason determines what copy the notice must contain. See the [regulated customer notices](https://stripe.com/docs/issuing/compliance-us/issuing-regulated-customer-notices) guide. All reasons might not apply to your integration, and Stripe might add new reasons in the future, so we recommend an internal warning when you receive an unknown reason. + sig { returns(String) } attr_reader :reason - sig { returns(T.nilable(Integer)) } # Date when the notice was sent. When absent, you must send the notice, update the content of the email and date when it was sent. + sig { returns(T.nilable(Integer)) } attr_reader :sent_at + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Set to false to only return unsent AccountNotices. + sig { returns(T::Boolean) } + attr_accessor :sent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, sent: T::Boolean, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + sent: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Email < Stripe::RequestParams + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + sig { returns(String) } + attr_accessor :plain_text + # Email address of the recipient. + sig { returns(String) } + attr_accessor :recipient + # Subject of the email. + sig { returns(String) } + attr_accessor :subject + sig { params(plain_text: String, recipient: String, subject: String).void } + def initialize(plain_text: nil, recipient: nil, subject: nil); end + end + # Information about the email you sent. + sig { returns(::Stripe::AccountNotice::UpdateParams::Email) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Date when you sent the notice. + sig { returns(Integer) } + attr_accessor :sent_at + sig { + params(email: ::Stripe::AccountNotice::UpdateParams::Email, expand: T::Array[String], metadata: T::Hash[String, String], sent_at: Integer).void + } + def initialize(email: nil, expand: nil, metadata: nil, sent_at: nil); end + end + # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. + sig { + params(params: T.any(::Stripe::AccountNotice::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates an AccountNotice object. + sig { + params(id: String, params: T.any(::Stripe::AccountNotice::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountNotice) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/account_session.rbi b/rbi/stripe/resources/account_session.rbi index 8010a1450..ddfd5fd44 100644 --- a/rbi/stripe/resources/account_session.rbi +++ b/rbi/stripe/resources/account_session.rbi @@ -14,207 +14,994 @@ module Stripe class Components < Stripe::StripeObject class AccountManagement < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class AccountOnboarding < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Balances < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :standard_payouts end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancing < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancingApplication < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class CapitalFinancingPromotion < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Documents < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class NotificationBanner < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class PaymentDetails < Stripe::StripeObject class Features < Stripe::StripeObject + # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Payments < Stripe::StripeObject class Features < Stripe::StripeObject + # Whether to allow capturing and cancelling payment intents. This is `true` by default. sig { returns(T::Boolean) } attr_reader :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. sig { returns(T::Boolean) } attr_reader :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. sig { returns(T::Boolean) } attr_reader :dispute_management + # Whether to allow sending refunds. This is `true` by default. sig { returns(T::Boolean) } attr_reader :refund_management end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class Payouts < Stripe::StripeObject class Features < Stripe::StripeObject + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. sig { returns(T::Boolean) } attr_reader :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. sig { returns(T::Boolean) } attr_reader :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. sig { returns(T::Boolean) } attr_reader :standard_payouts end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class PayoutsList < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class TaxRegistrations < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end class TaxSettings < Stripe::StripeObject class Features < Stripe::StripeObject; end + # Whether the embedded component is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field features sig { returns(Features) } attr_reader :features end + # Attribute for field account_management sig { returns(AccountManagement) } attr_reader :account_management + # Attribute for field account_onboarding sig { returns(AccountOnboarding) } attr_reader :account_onboarding + # Attribute for field balances sig { returns(Balances) } attr_reader :balances + # Attribute for field capital_financing sig { returns(T.nilable(CapitalFinancing)) } attr_reader :capital_financing + # Attribute for field capital_financing_application sig { returns(T.nilable(CapitalFinancingApplication)) } attr_reader :capital_financing_application + # Attribute for field capital_financing_promotion sig { returns(T.nilable(CapitalFinancingPromotion)) } attr_reader :capital_financing_promotion + # Attribute for field documents sig { returns(Documents) } attr_reader :documents + # Attribute for field notification_banner sig { returns(NotificationBanner) } attr_reader :notification_banner + # Attribute for field payment_details sig { returns(PaymentDetails) } attr_reader :payment_details + # Attribute for field payments sig { returns(Payments) } attr_reader :payments + # Attribute for field payouts sig { returns(Payouts) } attr_reader :payouts + # Attribute for field payouts_list sig { returns(PayoutsList) } attr_reader :payouts_list + # Attribute for field tax_registrations sig { returns(TaxRegistrations) } attr_reader :tax_registrations + # Attribute for field tax_settings sig { returns(TaxSettings) } attr_reader :tax_settings end - sig { returns(String) } # The ID of the account the AccountSession was created for - attr_reader :account sig { returns(String) } + attr_reader :account # The client secret of this AccountSession. Used on the client to set up secure access to the given `account`. # # The client secret can be used to provide access to `account` from your frontend. It should not be stored, logged, or exposed to anyone other than the connected account. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [setup Connect embedded components](https://stripe.com/docs/connect/get-started-connect-embedded-components) and learn about how `client_secret` should be handled. + sig { returns(String) } attr_reader :client_secret - sig { returns(Components) } # Attribute for field components + sig { returns(Components) } attr_reader :components - sig { returns(Integer) } # The timestamp at which this AccountSession will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class AccountManagement < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::AccountManagement::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::AccountManagement::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class AccountOnboarding < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::AccountOnboarding::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class AppInstall < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_apps + sig { params(allowed_apps: T.nilable(T::Array[String])).void } + def initialize(allowed_apps: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::AppInstall::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::AppInstall::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class AppViewport < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_apps + sig { params(allowed_apps: T.nilable(T::Array[String])).void } + def initialize(allowed_apps: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::AppViewport::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::AppViewport::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Balances < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :standard_payouts + sig { + params(disable_stripe_user_authentication: T::Boolean, edit_payout_schedule: T::Boolean, external_account_collection: T::Boolean, instant_payouts: T::Boolean, standard_payouts: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Balances::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::Balances::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalFinancing < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::CapitalFinancing::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::CapitalFinancing::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalFinancingApplication < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::CapitalFinancingApplication::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::CapitalFinancingApplication::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalFinancingPromotion < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::CapitalFinancingPromotion::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::CapitalFinancingPromotion::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalOverview < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::CapitalOverview::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::CapitalOverview::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Documents < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Documents::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::Documents::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class FinancialAccount < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow external accounts to be linked for money transfer. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + # Whether to allow sending money. + sig { returns(T::Boolean) } + attr_accessor :send_money + # Whether to allow transferring balance. + sig { returns(T::Boolean) } + attr_accessor :transfer_balance + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean, send_money: T::Boolean, transfer_balance: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil, + send_money: nil, + transfer_balance: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::FinancialAccount::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::FinancialAccount::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class FinancialAccountTransactions < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card spend dispute management features. + sig { returns(T::Boolean) } + attr_accessor :card_spend_dispute_management + sig { params(card_spend_dispute_management: T::Boolean).void } + def initialize(card_spend_dispute_management: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class IssuingCard < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + sig { returns(T::Boolean) } + attr_accessor :card_management + # Whether to allow card spend dispute management features. + sig { returns(T::Boolean) } + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + sig { returns(T::Boolean) } + attr_accessor :cardholder_management + # Whether to allow spend control management features. + sig { returns(T::Boolean) } + attr_accessor :spend_control_management + sig { + params(card_management: T::Boolean, card_spend_dispute_management: T::Boolean, cardholder_management: T::Boolean, spend_control_management: T::Boolean).void + } + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + spend_control_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::IssuingCard::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::IssuingCard::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class IssuingCardsList < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + sig { returns(T::Boolean) } + attr_accessor :card_management + # Whether to allow card spend dispute management features. + sig { returns(T::Boolean) } + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + sig { returns(T::Boolean) } + attr_accessor :cardholder_management + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow spend control management features. + sig { returns(T::Boolean) } + attr_accessor :spend_control_management + sig { + params(card_management: T::Boolean, card_spend_dispute_management: T::Boolean, cardholder_management: T::Boolean, disable_stripe_user_authentication: T::Boolean, spend_control_management: T::Boolean).void + } + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + disable_stripe_user_authentication: nil, + spend_control_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::IssuingCardsList::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class NotificationBanner < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::NotificationBanner::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::NotificationBanner::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PaymentDetails < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + sig { returns(T::Boolean) } + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :refund_management + sig { + params(capture_payments: T::Boolean, destination_on_behalf_of_charge_management: T::Boolean, dispute_management: T::Boolean, refund_management: T::Boolean).void + } + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::PaymentDetails::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::PaymentDetails::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PaymentMethodSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::PaymentMethodSettings::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::PaymentMethodSettings::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Payments < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + sig { returns(T::Boolean) } + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :refund_management + sig { + params(capture_payments: T::Boolean, destination_on_behalf_of_charge_management: T::Boolean, dispute_management: T::Boolean, refund_management: T::Boolean).void + } + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Payments::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::Payments::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Payouts < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :standard_payouts + sig { + params(disable_stripe_user_authentication: T::Boolean, edit_payout_schedule: T::Boolean, external_account_collection: T::Boolean, instant_payouts: T::Boolean, standard_payouts: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Payouts::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::Payouts::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PayoutsList < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::PayoutsList::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::PayoutsList::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Recipients < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow sending money. + sig { returns(T::Boolean) } + attr_accessor :send_money + sig { params(send_money: T::Boolean).void } + def initialize(send_money: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Attribute for param field features + sig { returns(::Stripe::AccountSession::CreateParams::Components::Recipients::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::Recipients::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class ReportingChart < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::ReportingChart::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::ReportingChart::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class TaxRegistrations < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::TaxRegistrations::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class TaxSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::TaxSettings::Features) } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSession::CreateParams::Components::TaxSettings::Features).void + } + def initialize(enabled: nil, features: nil); end + end + # Configuration for the account management embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::AccountManagement) } + attr_accessor :account_management + # Configuration for the account onboarding embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::AccountOnboarding) } + attr_accessor :account_onboarding + # Configuration for the app install component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::AppInstall) } + attr_accessor :app_install + # Configuration for the app viewport component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::AppViewport) } + attr_accessor :app_viewport + # Configuration for the balances embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Balances) } + attr_accessor :balances + # Configuration for the capital financing embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::CapitalFinancing) } + attr_accessor :capital_financing + # Configuration for the capital financing application embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::CapitalFinancingApplication) + } + attr_accessor :capital_financing_application + # Configuration for the capital financing promotion embedded component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::CapitalFinancingPromotion) + } + attr_accessor :capital_financing_promotion + # Configuration for the capital overview embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::CapitalOverview) } + attr_accessor :capital_overview + # Configuration for the documents embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Documents) } + attr_accessor :documents + # Configuration for the financial account component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::FinancialAccount) } + attr_accessor :financial_account + # Configuration for the financial account transactions component. + sig { + returns(::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions) + } + attr_accessor :financial_account_transactions + # Configuration for the issuing card component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::IssuingCard) } + attr_accessor :issuing_card + # Configuration for the issuing cards list component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::IssuingCardsList) } + attr_accessor :issuing_cards_list + # Configuration for the notification banner embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::NotificationBanner) } + attr_accessor :notification_banner + # Configuration for the payment details embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::PaymentDetails) } + attr_accessor :payment_details + # Configuration for the payment method settings embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::PaymentMethodSettings) } + attr_accessor :payment_method_settings + # Configuration for the payments embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Payments) } + attr_accessor :payments + # Configuration for the payouts embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Payouts) } + attr_accessor :payouts + # Configuration for the payouts list embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::PayoutsList) } + attr_accessor :payouts_list + # Configuration for the recipients component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::Recipients) } + attr_accessor :recipients + # Configuration for the reporting chart embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::ReportingChart) } + attr_accessor :reporting_chart + # Configuration for the tax registrations embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::TaxRegistrations) } + attr_accessor :tax_registrations + # Configuration for the tax settings embedded component. + sig { returns(::Stripe::AccountSession::CreateParams::Components::TaxSettings) } + attr_accessor :tax_settings + sig { + params(account_management: ::Stripe::AccountSession::CreateParams::Components::AccountManagement, account_onboarding: ::Stripe::AccountSession::CreateParams::Components::AccountOnboarding, app_install: ::Stripe::AccountSession::CreateParams::Components::AppInstall, app_viewport: ::Stripe::AccountSession::CreateParams::Components::AppViewport, balances: ::Stripe::AccountSession::CreateParams::Components::Balances, capital_financing: ::Stripe::AccountSession::CreateParams::Components::CapitalFinancing, capital_financing_application: ::Stripe::AccountSession::CreateParams::Components::CapitalFinancingApplication, capital_financing_promotion: ::Stripe::AccountSession::CreateParams::Components::CapitalFinancingPromotion, capital_overview: ::Stripe::AccountSession::CreateParams::Components::CapitalOverview, documents: ::Stripe::AccountSession::CreateParams::Components::Documents, financial_account: ::Stripe::AccountSession::CreateParams::Components::FinancialAccount, financial_account_transactions: ::Stripe::AccountSession::CreateParams::Components::FinancialAccountTransactions, issuing_card: ::Stripe::AccountSession::CreateParams::Components::IssuingCard, issuing_cards_list: ::Stripe::AccountSession::CreateParams::Components::IssuingCardsList, notification_banner: ::Stripe::AccountSession::CreateParams::Components::NotificationBanner, payment_details: ::Stripe::AccountSession::CreateParams::Components::PaymentDetails, payment_method_settings: ::Stripe::AccountSession::CreateParams::Components::PaymentMethodSettings, payments: ::Stripe::AccountSession::CreateParams::Components::Payments, payouts: ::Stripe::AccountSession::CreateParams::Components::Payouts, payouts_list: ::Stripe::AccountSession::CreateParams::Components::PayoutsList, recipients: ::Stripe::AccountSession::CreateParams::Components::Recipients, reporting_chart: ::Stripe::AccountSession::CreateParams::Components::ReportingChart, tax_registrations: ::Stripe::AccountSession::CreateParams::Components::TaxRegistrations, tax_settings: ::Stripe::AccountSession::CreateParams::Components::TaxSettings).void + } + def initialize( + account_management: nil, + account_onboarding: nil, + app_install: nil, + app_viewport: nil, + balances: nil, + capital_financing: nil, + capital_financing_application: nil, + capital_financing_promotion: nil, + capital_overview: nil, + documents: nil, + financial_account: nil, + financial_account_transactions: nil, + issuing_card: nil, + issuing_cards_list: nil, + notification_banner: nil, + payment_details: nil, + payment_method_settings: nil, + payments: nil, + payouts: nil, + payouts_list: nil, + recipients: nil, + reporting_chart: nil, + tax_registrations: nil, + tax_settings: nil + ); end + end + # The identifier of the account to create an Account Session for. + sig { returns(String) } + attr_accessor :account + # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). + sig { returns(::Stripe::AccountSession::CreateParams::Components) } + attr_accessor :components + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(account: String, components: ::Stripe::AccountSession::CreateParams::Components, expand: T::Array[String]).void + } + def initialize(account: nil, components: nil, expand: nil); end + end + # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + sig { + params(params: T.any(::Stripe::AccountSession::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountSession) + } + def self.create(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/apple_pay_domain.rbi b/rbi/stripe/resources/apple_pay_domain.rbi index ccead41a3..488957af0 100644 --- a/rbi/stripe/resources/apple_pay_domain.rbi +++ b/rbi/stripe/resources/apple_pay_domain.rbi @@ -5,23 +5,93 @@ module Stripe # Domains registered for Apple Pay on the Web class ApplePayDomain < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Attribute for field domain_name - attr_reader :domain_name sig { returns(String) } + attr_reader :domain_name # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + # Attribute for param field domain_name + sig { returns(String) } + attr_accessor :domain_name + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(domain_name: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + domain_name: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Attribute for param field domain_name + sig { returns(String) } + attr_accessor :domain_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(domain_name: String, expand: T::Array[String]).void } + def initialize(domain_name: nil, expand: nil); end + end + # Create an apple pay domain. + sig { + params(params: T.any(::Stripe::ApplePayDomain::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain) + } + def self.create(params = {}, opts = {}); end + + # Delete an apple pay domain. + sig { + params(id: String, params: T.any(::Stripe::ApplePayDomain::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain) + } + def self.delete(id, params = {}, opts = {}); end + + # Delete an apple pay domain. + sig { + params(params: T.any(::Stripe::ApplePayDomain::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain) + } + def delete(params = {}, opts = {}); end + + # List apple pay domains. + sig { + params(params: T.any(::Stripe::ApplePayDomain::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/application.rbi b/rbi/stripe/resources/application.rbi index 8db61fc11..ececc3519 100644 --- a/rbi/stripe/resources/application.rbi +++ b/rbi/stripe/resources/application.rbi @@ -4,17 +4,17 @@ # typed: true module Stripe class Application < APIResource - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The name of the application. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee.rbi b/rbi/stripe/resources/application_fee.rbi index f12fa1dcd..0ba6a744e 100644 --- a/rbi/stripe/resources/application_fee.rbi +++ b/rbi/stripe/resources/application_fee.rbi @@ -5,57 +5,119 @@ module Stripe class ApplicationFee < APIResource class FeeSource < Stripe::StripeObject + # Charge ID that created this application fee. sig { returns(String) } attr_reader :charge + # Payout ID that created this application fee. sig { returns(String) } attr_reader :payout + # Type of object that created the application fee, either `charge` or `payout`. sig { returns(String) } attr_reader :type end - sig { returns(T.any(String, Stripe::Account)) } # ID of the Stripe account this fee was taken from. + sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - sig { returns(Integer) } # Amount earned, in cents (or local equivalent). - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the fee if a partial refund was issued) + sig { returns(Integer) } attr_reader :amount_refunded - sig { returns(T.any(String, Stripe::Application)) } # ID of the Connect application that earned the fee. + sig { returns(T.any(String, Stripe::Application)) } attr_reader :application - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # Balance transaction that describes the impact of this collected application fee on your account balance (not including refunds). + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(T.any(String, Stripe::Charge)) } # ID of the charge that the application fee was taken from. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(FeeSource)) } # Polymorphic source of the application fee. Includes the ID of the object the application fee was created from. + sig { returns(T.nilable(FeeSource)) } attr_reader :fee_source - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } # ID of the corresponding charge on the platform account, if this fee was the result of a charge using the `destination` parameter. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :originating_transaction - sig { returns(T::Boolean) } # Whether the fee has been fully refunded. If the fee is only partially refunded, this attribute will still be false. + sig { returns(T::Boolean) } attr_reader :refunded - sig { returns(Stripe::ListObject) } # A list of refunds that have been applied to the fee. + sig { returns(Stripe::ListObject) } attr_reader :refunds + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return application fees for the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return applications fees that were created during the given date interval. + sig { returns(T.any(::Stripe::ApplicationFee::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::ApplicationFee::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. + sig { + params(params: T.any(::Stripe::ApplicationFee::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/application_fee_refund.rbi b/rbi/stripe/resources/application_fee_refund.rbi index 571351dfe..fd595463b 100644 --- a/rbi/stripe/resources/application_fee_refund.rbi +++ b/rbi/stripe/resources/application_fee_refund.rbi @@ -9,29 +9,29 @@ module Stripe # # Related guide: [Refunding application fees](https://stripe.com/docs/connect/destination-charges#refunding-app-fee) class ApplicationFeeRefund < APIResource - sig { returns(Integer) } # Amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # Balance transaction that describes the impact on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::ApplicationFee)) } # ID of the application fee that was refunded. + sig { returns(T.any(String, Stripe::ApplicationFee)) } attr_reader :fee - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/apps/secret.rbi b/rbi/stripe/resources/apps/secret.rbi index 62bb75da3..ea9bbf9c0 100644 --- a/rbi/stripe/resources/apps/secret.rbi +++ b/rbi/stripe/resources/apps/secret.rbi @@ -15,38 +15,181 @@ module Stripe # Related guide: [Store data between page reloads](https://stripe.com/docs/stripe-apps/store-auth-data-custom-objects) class Secret < APIResource class Scope < Stripe::StripeObject + # The secret scope type. sig { returns(String) } attr_reader :type + # The user ID, if type is set to "user" sig { returns(String) } attr_reader :user end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Boolean) } # If true, indicates that this secret has been deleted + sig { returns(T::Boolean) } attr_reader :deleted - sig { returns(T.nilable(Integer)) } # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # A name for the secret that's unique within the scope. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The plaintext secret value to be stored. + sig { returns(T.nilable(String)) } attr_reader :payload - sig { returns(Scope) } # Attribute for field scope + sig { returns(Scope) } attr_reader :scope + class ListParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::Secret::ListParams::Scope) } + attr_accessor :scope + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, scope: ::Stripe::Apps::Secret::ListParams::Scope, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + scope: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + sig { returns(Integer) } + attr_accessor :expires_at + # A name for the secret that's unique within the scope. + sig { returns(String) } + attr_accessor :name + # The plaintext secret value to be stored. + sig { returns(String) } + attr_accessor :payload + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::Secret::CreateParams::Scope) } + attr_accessor :scope + sig { + params(expand: T::Array[String], expires_at: Integer, name: String, payload: String, scope: ::Stripe::Apps::Secret::CreateParams::Scope).void + } + def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil); end + end + class FindParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A name for the secret that's unique within the scope. + sig { returns(String) } + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::Secret::FindParams::Scope) } + attr_accessor :scope + sig { + params(expand: T::Array[String], name: String, scope: ::Stripe::Apps::Secret::FindParams::Scope).void + } + def initialize(expand: nil, name: nil, scope: nil); end + end + class DeleteWhereParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A name for the secret that's unique within the scope. + sig { returns(String) } + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::Secret::DeleteWhereParams::Scope) } + attr_accessor :scope + sig { + params(expand: T::Array[String], name: String, scope: ::Stripe::Apps::Secret::DeleteWhereParams::Scope).void + } + def initialize(expand: nil, name: nil, scope: nil); end + end + # Create or replace a secret in the secret store. + sig { + params(params: T.any(::Stripe::Apps::Secret::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret) + } + def self.create(params = {}, opts = {}); end + + # Deletes a secret from the secret store by name and scope. + sig { + params(params: T.any(::Stripe::Apps::Secret::DeleteWhereParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret) + } + def self.delete_where(params = {}, opts = {}); end + + # Finds a secret in the secret store by name and scope. + sig { + params(params: T.any(::Stripe::Apps::Secret::FindParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret) + } + def self.find(params = {}, opts = {}); end + + # List all secrets stored on the given scope. + sig { + params(params: T.any(::Stripe::Apps::Secret::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/balance.rbi b/rbi/stripe/resources/balance.rbi index aa4dfd063..cff5c24e5 100644 --- a/rbi/stripe/resources/balance.rbi +++ b/rbi/stripe/resources/balance.rbi @@ -17,126 +17,171 @@ module Stripe class Balance < SingletonAPIResource class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class ConnectReserved < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class InstantAvailable < Stripe::StripeObject class NetAvailable < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Net balance amount, subtracting fees from platform-set pricing. sig { returns(Integer) } attr_reader :amount + # ID of the external account for this net balance (not expandable). sig { returns(String) } attr_reader :destination + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Breakdown of balance by destination. sig { returns(T::Array[NetAvailable]) } attr_reader :net_available + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end class Issuing < Stripe::StripeObject class Available < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end + # Funds that are available for use. sig { returns(T::Array[Available]) } attr_reader :available end class Pending < Stripe::StripeObject class SourceTypes < Stripe::StripeObject + # Amount for bank account. sig { returns(Integer) } attr_reader :bank_account + # Amount for card. sig { returns(Integer) } attr_reader :card + # Amount for FPX. sig { returns(Integer) } attr_reader :fpx end + # Balance amount. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Attribute for field source_types sig { returns(SourceTypes) } attr_reader :source_types end - sig { returns(T::Array[Available]) } # Available funds that you can transfer or pay out automatically by Stripe or explicitly through the [Transfers API](https://stripe.com/docs/api#transfers) or [Payouts API](https://stripe.com/docs/api#payouts). You can find the available balance for each currency and payment type in the `source_types` property. + sig { returns(T::Array[Available]) } attr_reader :available - sig { returns(T::Array[ConnectReserved]) } # Funds held due to negative balances on connected accounts where [account.controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. You can find the connect reserve balance for each currency and payment type in the `source_types` property. + sig { returns(T::Array[ConnectReserved]) } attr_reader :connect_reserved - sig { returns(T::Array[InstantAvailable]) } # Funds that you can pay out using Instant Payouts. + sig { returns(T::Array[InstantAvailable]) } attr_reader :instant_available - sig { returns(Issuing) } # Attribute for field issuing + sig { returns(Issuing) } attr_reader :issuing - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Pending]) } # Funds that aren't available in the balance yet. You can find the pending balance for each currency and each payment type in the `source_types` property. + sig { returns(T::Array[Pending]) } attr_reader :pending + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end end end \ No newline at end of file diff --git a/rbi/stripe/resources/balance_transaction.rbi b/rbi/stripe/resources/balance_transaction.rbi index 1de29600a..9c55b546a 100644 --- a/rbi/stripe/resources/balance_transaction.rbi +++ b/rbi/stripe/resources/balance_transaction.rbi @@ -9,63 +9,141 @@ module Stripe # Related guide: [Balance transaction types](https://stripe.com/docs/reports/balance-transaction-types) class BalanceTransaction < APIResource class FeeDetail < Stripe::StripeObject + # Amount of the fee, in cents. sig { returns(Integer) } attr_reader :amount + # ID of the Connect application that earned the fee. sig { returns(T.nilable(String)) } attr_reader :application + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Type of the fee, one of: `application_fee`, `payment_method_passthrough_fee`, `stripe_fee` or `tax`. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Gross amount of this transaction (in cents (or local equivalent)). A positive value represents funds charged to another party, and a negative value represents funds sent to another party. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # The date that the transaction's net funds become available in the Stripe balance. - attr_reader :available_on sig { returns(Integer) } + attr_reader :available_on # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Float)) } # If applicable, this transaction uses an exchange rate. If money converts from currency A to currency B, then the `amount` in currency A, multipled by the `exchange_rate`, equals the `amount` in currency B. For example, if you charge a customer 10.00 EUR, the PaymentIntent's `amount` is `1000` and `currency` is `eur`. If this converts to 12.34 USD in your Stripe account, the BalanceTransaction's `amount` is `1234`, its `currency` is `usd`, and the `exchange_rate` is `1.234`. + sig { returns(T.nilable(Float)) } attr_reader :exchange_rate - sig { returns(Integer) } # Fees (in cents (or local equivalent)) paid for this transaction. Represented as a positive integer when assessed. + sig { returns(Integer) } attr_reader :fee - sig { returns(T::Array[FeeDetail]) } # Detailed breakdown of fees (in cents (or local equivalent)) paid for this transaction. + sig { returns(T::Array[FeeDetail]) } attr_reader :fee_details - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Integer) } # Net impact to a Stripe balance (in cents (or local equivalent)). A positive value represents incrementing a Stripe balance, and a negative value decrementing a Stripe balance. You can calculate the net impact of a transaction on a balance by `amount` - `fee` + sig { returns(Integer) } attr_reader :net - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Learn more about how [reporting categories](https://stripe.com/docs/reports/reporting-categories) can help you understand balance transactions from an accounting perspective. + sig { returns(String) } attr_reader :reporting_category + # This transaction relates to the Stripe object. sig { returns(T.nilable(T.any(String, T.any(Stripe::ApplicationFee, Stripe::Charge, Stripe::ConnectCollectionTransfer, Stripe::CustomerCashBalanceTransaction, Stripe::Dispute, Stripe::ApplicationFeeRefund, Stripe::Issuing::Authorization, Stripe::Issuing::Dispute, Stripe::Issuing::Transaction, Stripe::Payout, Stripe::Refund, Stripe::ReserveTransaction, Stripe::TaxDeductedAtSource, Stripe::Topup, Stripe::Transfer, Stripe::Reversal)))) } - # This transaction relates to the Stripe object. attr_reader :source - sig { returns(String) } # The transaction's net funds status in the Stripe balance, which are either `available` or `pending`. - attr_reader :status sig { returns(String) } + attr_reader :status # Transaction type: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. Learn more about [balance transaction types and what they represent](https://stripe.com/docs/reports/balance-transaction-types). To classify transactions for accounting purposes, consider `reporting_category` instead. + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return transactions that were created during the given date interval. + sig { returns(T.any(::Stripe::BalanceTransaction::ListParams::Created, Integer)) } + attr_accessor :created + # Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + sig { returns(String) } + attr_accessor :payout + # Only returns the original transaction. + sig { returns(String) } + attr_accessor :source + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + sig { returns(String) } + attr_accessor :type + sig { + params(created: T.any(::Stripe::BalanceTransaction::ListParams::Created, Integer), currency: String, ending_before: String, expand: T::Array[String], limit: Integer, payout: String, source: String, starting_after: String, type: String).void + } + def initialize( + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + payout: nil, + source: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + # + # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + sig { + params(params: T.any(::Stripe::BalanceTransaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/bank_account.rbi b/rbi/stripe/resources/bank_account.rbi index f9fe18ff0..e2715e54f 100644 --- a/rbi/stripe/resources/bank_account.rbi +++ b/rbi/stripe/resources/bank_account.rbi @@ -13,101 +13,115 @@ module Stripe class BankAccount < APIResource class FutureRequirements < Stripe::StripeObject class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that need to be collected to keep the external account enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T.nilable(T::Array[String])) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T.nilable(T::Array[Error])) } attr_reader :errors + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the external account. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T.nilable(T::Array[String])) } attr_reader :pending_verification end - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The ID of the account that the bank account is associated with. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account - sig { returns(T.nilable(String)) } # The name of the person or business that owns the bank account. - attr_reader :account_holder_name sig { returns(T.nilable(String)) } + attr_reader :account_holder_name # The type of entity that holds the account. This can be either `individual` or `company`. - attr_reader :account_holder_type sig { returns(T.nilable(String)) } + attr_reader :account_holder_type # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + sig { returns(T.nilable(String)) } attr_reader :account_type - sig { returns(T.nilable(T::Array[String])) } # A set of available payout methods for this bank account. Only values from this set should be passed as the `method` when creating a payout. + sig { returns(T.nilable(T::Array[String])) } attr_reader :available_payout_methods - sig { returns(T.nilable(String)) } # Name of the bank associated with the routing number (e.g., `WELLS FARGO`). + sig { returns(T.nilable(String)) } attr_reader :bank_name - sig { returns(String) } # Two-letter ISO code representing the country the bank account is located in. - attr_reader :country sig { returns(String) } + attr_reader :country # Three-letter [ISO code for the currency](https://stripe.com/docs/payouts) paid out to the bank account. + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The ID of the customer that the bank account is associated with. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(T::Boolean)) } # Whether this bank account is the default external account for its currency. + sig { returns(T.nilable(T::Boolean)) } attr_reader :default_for_currency - sig { returns(T.nilable(String)) } # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. + sig { returns(T.nilable(String)) } attr_reader :fingerprint - sig { returns(T.nilable(FutureRequirements)) } # Information about the [upcoming new requirements for the bank account](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + sig { returns(T.nilable(FutureRequirements)) } attr_reader :future_requirements - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # The last four digits of the bank account number. + sig { returns(String) } attr_reader :last4 - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Requirements)) } # Information about the requirements for the bank account, including what information needs to be collected. + sig { returns(T.nilable(Requirements)) } attr_reader :requirements - sig { returns(T.nilable(String)) } # The routing transit number for the bank account. + sig { returns(T.nilable(String)) } attr_reader :routing_number - sig { returns(String) } # For bank accounts, possible values are `new`, `validated`, `verified`, `verification_failed`, or `errored`. A bank account that hasn't had any activity or validation performed is `new`. If Stripe can determine that the bank account exists, its status will be `validated`. Note that there often isn’t enough information to know (e.g., for smaller credit unions), and the validation is not always run. If customer bank account verification has succeeded, the bank account status will be `verified`. If the verification failed for any reason, such as microdeposit failure, the status will be `verification_failed`. If a payout sent to this bank account fails, we'll set the status to `errored` and will not continue to send [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) until the bank details are updated. # # For external accounts, possible values are `new`, `errored` and `verification_failed`. If a payout fails, the status is set to `errored` and scheduled payouts are stopped until account details are updated. In the US and India, if we can't [verify the owner of the bank account](https://support.stripe.com/questions/bank-account-ownership-verification), we'll set the status to `verification_failed`. Other validations aren't run against external accounts because they're only used for payouts. This means the other statuses don't apply. + sig { returns(String) } attr_reader :status - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/alert.rbi b/rbi/stripe/resources/billing/alert.rbi index a7e474c41..b9e2fd121 100644 --- a/rbi/stripe/resources/billing/alert.rbi +++ b/rbi/stripe/resources/billing/alert.rbi @@ -8,41 +8,199 @@ module Stripe class Alert < APIResource class UsageThreshold < Stripe::StripeObject class Filter < Stripe::StripeObject + # Limit the scope of the alert to this customer ID sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer + # Attribute for field type sig { returns(String) } attr_reader :type end + # The filters allow limiting the scope of this usage alert. You can only specify up to one filter at this time. sig { returns(T.nilable(T::Array[Filter])) } attr_reader :filters + # The value at which this alert will trigger. sig { returns(Integer) } attr_reader :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. sig { returns(T.any(String, Stripe::Billing::Meter)) } attr_reader :meter + # Defines how the alert will behave. sig { returns(String) } attr_reader :recurrence end - sig { returns(String) } # Defines the type of the alert. - attr_reader :alert_type sig { returns(String) } + attr_reader :alert_type # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # Status of the alert. This can be active, inactive or archived. + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(String) } # Title of the alert. + sig { returns(String) } attr_reader :title - sig { returns(T.nilable(UsageThreshold)) } # Encapsulates configuration of the alert to monitor usage on a specific [Billing Meter](https://stripe.com/docs/api/billing/meter). + sig { returns(T.nilable(UsageThreshold)) } attr_reader :usage_threshold + class ListParams < Stripe::RequestParams + # Filter results to only include this type of alert. + sig { returns(String) } + attr_accessor :alert_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filter results to only include alerts with the given meter. + sig { returns(String) } + attr_accessor :meter + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(alert_type: String, ending_before: String, expand: T::Array[String], limit: Integer, meter: String, starting_after: String).void + } + def initialize( + alert_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + meter: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class UsageThreshold < Stripe::RequestParams + class Filter < Stripe::RequestParams + # Limit the scope to this usage alert only to this customer. + sig { returns(String) } + attr_accessor :customer + # What type of filter is being applied to this usage alert. + sig { returns(String) } + attr_accessor :type + sig { params(customer: String, type: String).void } + def initialize(customer: nil, type: nil); end + end + # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. + sig { returns(T::Array[::Stripe::Billing::Alert::CreateParams::UsageThreshold::Filter]) } + attr_accessor :filters + # Defines at which value the alert will fire. + sig { returns(Integer) } + attr_accessor :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + sig { returns(String) } + attr_accessor :meter + # Whether the alert should only fire only once, or once per billing cycle. + sig { returns(String) } + attr_accessor :recurrence + sig { + params(filters: T::Array[::Stripe::Billing::Alert::CreateParams::UsageThreshold::Filter], gte: Integer, meter: String, recurrence: String).void + } + def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil); end + end + # The type of alert to create. + sig { returns(String) } + attr_accessor :alert_type + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The title of the alert. + sig { returns(String) } + attr_accessor :title + # The configuration of the usage threshold. + sig { returns(::Stripe::Billing::Alert::CreateParams::UsageThreshold) } + attr_accessor :usage_threshold + sig { + params(alert_type: String, expand: T::Array[String], title: String, usage_threshold: ::Stripe::Billing::Alert::CreateParams::UsageThreshold).void + } + def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Reactivates this alert, allowing it to trigger again. + sig { + params(params: T.any(::Stripe::Billing::Alert::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def activate(params = {}, opts = {}); end + + # Reactivates this alert, allowing it to trigger again. + sig { + params(id: String, params: T.any(::Stripe::Billing::Alert::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def self.activate(id, params = {}, opts = {}); end + + # Archives this alert, removing it from the list view and APIs. This is non-reversible. + sig { + params(params: T.any(::Stripe::Billing::Alert::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def archive(params = {}, opts = {}); end + + # Archives this alert, removing it from the list view and APIs. This is non-reversible. + sig { + params(id: String, params: T.any(::Stripe::Billing::Alert::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def self.archive(id, params = {}, opts = {}); end + + # Creates a billing alert + sig { + params(params: T.any(::Stripe::Billing::Alert::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def self.create(params = {}, opts = {}); end + + # Deactivates this alert, preventing it from triggering. + sig { + params(params: T.any(::Stripe::Billing::Alert::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def deactivate(params = {}, opts = {}); end + + # Deactivates this alert, preventing it from triggering. + sig { + params(id: String, params: T.any(::Stripe::Billing::Alert::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def self.deactivate(id, params = {}, opts = {}); end + + # Lists billing active and inactive alerts + sig { + params(params: T.any(::Stripe::Billing::Alert::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/alert_triggered.rbi b/rbi/stripe/resources/billing/alert_triggered.rbi index 0dd1d6dd6..88e1dcace 100644 --- a/rbi/stripe/resources/billing/alert_triggered.rbi +++ b/rbi/stripe/resources/billing/alert_triggered.rbi @@ -5,23 +5,23 @@ module Stripe module Billing class AlertTriggered < APIResource - sig { returns(Stripe::Billing::Alert) } # A billing alert is a resource that notifies you when a certain usage threshold on a meter is crossed. For example, you might create a billing alert to notify you when a certain user made 100 API requests. + sig { returns(Stripe::Billing::Alert) } attr_reader :alert - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # ID of customer for which the alert triggered + sig { returns(String) } attr_reader :customer - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # The value triggering the alert + sig { returns(Integer) } attr_reader :value end end diff --git a/rbi/stripe/resources/billing/credit_balance_summary.rbi b/rbi/stripe/resources/billing/credit_balance_summary.rbi index 8d4cddaeb..61eac4f56 100644 --- a/rbi/stripe/resources/billing/credit_balance_summary.rbi +++ b/rbi/stripe/resources/billing/credit_balance_summary.rbi @@ -9,45 +9,94 @@ module Stripe class Balance < Stripe::StripeObject class AvailableBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class LedgerBalance < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end + # Attribute for field available_balance sig { returns(AvailableBalance) } attr_reader :available_balance + # Attribute for field ledger_balance sig { returns(LedgerBalance) } attr_reader :ledger_balance end - sig { returns(T::Array[Balance]) } # The billing credit balances. One entry per credit grant currency. If a customer only has credit grants in a single currency, then this will have a single balance entry. + sig { returns(T::Array[Balance]) } attr_reader :balances - sig { returns(T.any(String, Stripe::Customer)) } # The customer the balance is for. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class RetrieveParams < Stripe::RequestParams + class Filter < Stripe::RequestParams + class ApplicabilityScope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + sig { returns(String) } + attr_accessor :price_type + sig { params(price_type: String).void } + def initialize(price_type: nil); end + end + # The billing credit applicability scope for which to fetch credit balance summary. + sig { + returns(::Stripe::Billing::CreditBalanceSummary::RetrieveParams::Filter::ApplicabilityScope) + } + attr_accessor :applicability_scope + # The credit grant for which to fetch credit balance summary. + sig { returns(String) } + attr_accessor :credit_grant + # Specify the type of this filter. + sig { returns(String) } + attr_accessor :type + sig { + params(applicability_scope: ::Stripe::Billing::CreditBalanceSummary::RetrieveParams::Filter::ApplicabilityScope, credit_grant: String, type: String).void + } + def initialize(applicability_scope: nil, credit_grant: nil, type: nil); end + end + # The customer for which to fetch credit balance summary. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The filter criteria for the credit balance summary. + sig { returns(::Stripe::Billing::CreditBalanceSummary::RetrieveParams::Filter) } + attr_accessor :filter + sig { + params(customer: String, expand: T::Array[String], filter: ::Stripe::Billing::CreditBalanceSummary::RetrieveParams::Filter).void + } + def initialize(customer: nil, expand: nil, filter: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/credit_balance_transaction.rbi b/rbi/stripe/resources/billing/credit_balance_transaction.rbi index 294c521f0..9c3d6b399 100644 --- a/rbi/stripe/resources/billing/credit_balance_transaction.rbi +++ b/rbi/stripe/resources/billing/credit_balance_transaction.rbi @@ -9,85 +9,146 @@ module Stripe class Credit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class CreditsApplicationInvoiceVoided < Stripe::StripeObject + # The invoice to which the reinstated billing credits were originally applied. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The invoice line item to which the reinstated billing credits were originally applied. sig { returns(String) } attr_reader :invoice_line_item end + # Attribute for field amount sig { returns(Amount) } attr_reader :amount + # Details of the invoice to which the reinstated credits were originally applied. Only present if `type` is `credits_application_invoice_voided`. sig { returns(T.nilable(CreditsApplicationInvoiceVoided)) } attr_reader :credits_application_invoice_voided + # The type of credit transaction. sig { returns(String) } attr_reader :type end class Debit < Stripe::StripeObject class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class CreditsApplied < Stripe::StripeObject + # The invoice to which the billing credits were applied. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The invoice line item to which the billing credits were applied. sig { returns(String) } attr_reader :invoice_line_item end + # Attribute for field amount sig { returns(Amount) } attr_reader :amount + # Details of how the billing credits were applied to an invoice. Only present if `type` is `credits_applied`. sig { returns(T.nilable(CreditsApplied)) } attr_reader :credits_applied + # The type of debit transaction. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Credit)) } # Credit details for this credit balance transaction. Only present if type is `credit`. + sig { returns(T.nilable(Credit)) } attr_reader :credit - sig { returns(T.any(String, Stripe::Billing::CreditGrant)) } # The credit grant associated with this credit balance transaction. + sig { returns(T.any(String, Stripe::Billing::CreditGrant)) } attr_reader :credit_grant - sig { returns(T.nilable(Debit)) } # Debit details for this credit balance transaction. Only present if type is `debit`. + sig { returns(T.nilable(Debit)) } attr_reader :debit - sig { returns(Integer) } # The effective time of this credit balance transaction. + sig { returns(Integer) } attr_reader :effective_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this credit balance transaction belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T.nilable(String)) } # The type of credit balance transaction (credit or debit). + sig { returns(T.nilable(String)) } attr_reader :type + class ListParams < Stripe::RequestParams + # The credit grant for which to fetch credit balance transactions. + sig { returns(String) } + attr_accessor :credit_grant + # The customer for which to fetch credit balance transactions. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(credit_grant: String, customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + credit_grant: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieve a list of credit balance transactions. + sig { + params(params: T.any(::Stripe::Billing::CreditBalanceTransaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/credit_grant.rbi b/rbi/stripe/resources/billing/credit_grant.rbi index 09f578b14..66ed52373 100644 --- a/rbi/stripe/resources/billing/credit_grant.rbi +++ b/rbi/stripe/resources/billing/credit_grant.rbi @@ -10,69 +10,260 @@ module Stripe class CreditGrant < APIResource class Amount < Stripe::StripeObject class Monetary < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount. sig { returns(Integer) } attr_reader :value end + # The monetary amount. sig { returns(T.nilable(Monetary)) } attr_reader :monetary + # The type of this amount. We currently only support `monetary` billing credits. sig { returns(String) } attr_reader :type end class ApplicabilityConfig < Stripe::StripeObject class Scope < Stripe::StripeObject + # The price type that credit grants can apply to. We currently only support the `metered` price type. This refers to prices that have a [Billing Meter](https://docs.stripe.com/api/billing/meter) attached to them. sig { returns(String) } attr_reader :price_type end + # Attribute for field scope sig { returns(Scope) } attr_reader :scope end - sig { returns(Amount) } # Attribute for field amount + sig { returns(Amount) } attr_reader :amount - sig { returns(ApplicabilityConfig) } # Attribute for field applicability_config + sig { returns(ApplicabilityConfig) } attr_reader :applicability_config - sig { returns(String) } # The category of this credit grant. This is for tracking purposes and isn't displayed to the customer. + sig { returns(String) } attr_reader :category - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.any(String, Stripe::Customer)) } # ID of the customer receiving the billing credits. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(Integer)) } # The time when the billing credits become effective-when they're eligible for use. - attr_reader :effective_at sig { returns(T.nilable(Integer)) } + attr_reader :effective_at # The time when the billing credits expire. If not present, the billing credits don't expire. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } # A descriptive name shown in dashboard. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this credit grant belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(Integer) } # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated - sig { returns(T.nilable(Integer)) } # The time when this credit grant was voided. If not present, the credit grant hasn't been voided. + sig { returns(T.nilable(Integer)) } attr_reader :voided_at + class ListParams < Stripe::RequestParams + # Only return credit grants for this customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + class Monetary < Stripe::RequestParams + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + sig { returns(String) } + attr_accessor :currency + # A positive integer representing the amount of the credit grant. + sig { returns(Integer) } + attr_accessor :value + sig { params(currency: String, value: Integer).void } + def initialize(currency: nil, value: nil); end + end + # The monetary amount. + sig { returns(::Stripe::Billing::CreditGrant::CreateParams::Amount::Monetary) } + attr_accessor :monetary + # Specify the type of this amount. We currently only support `monetary` billing credits. + sig { returns(String) } + attr_accessor :type + sig { + params(monetary: ::Stripe::Billing::CreditGrant::CreateParams::Amount::Monetary, type: String).void + } + def initialize(monetary: nil, type: nil); end + end + class ApplicabilityConfig < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + sig { returns(String) } + attr_accessor :price_type + sig { params(price_type: String).void } + def initialize(price_type: nil); end + end + # Specify the scope of this applicability config. + sig { returns(::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig::Scope) } + attr_accessor :scope + sig { + params(scope: ::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig::Scope).void + } + def initialize(scope: nil); end + end + # Amount of this credit grant. + sig { returns(::Stripe::Billing::CreditGrant::CreateParams::Amount) } + attr_accessor :amount + # Configuration specifying what this credit grant applies to. + sig { returns(::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig) } + attr_accessor :applicability_config + # The category of this credit grant. + sig { returns(String) } + attr_accessor :category + # ID of the customer to receive the billing credits. + sig { returns(String) } + attr_accessor :customer + # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. + sig { returns(Integer) } + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The time when the billing credits expire. If not specified, the billing credits don't expire. + sig { returns(Integer) } + attr_accessor :expires_at + # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A descriptive name shown in the Dashboard. + sig { returns(String) } + attr_accessor :name + sig { + params(amount: ::Stripe::Billing::CreditGrant::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrant::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: Integer, expand: T::Array[String], expires_at: Integer, metadata: T::Hash[String, String], name: String).void + } + def initialize( + amount: nil, + applicability_config: nil, + category: nil, + customer: nil, + effective_at: nil, + expand: nil, + expires_at: nil, + metadata: nil, + name: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], expires_at: T.nilable(Integer), metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, expires_at: nil, metadata: nil); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class VoidGrantParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a credit grant. + sig { + params(params: T.any(::Stripe::Billing::CreditGrant::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def self.create(params = {}, opts = {}); end + + # Expires a credit grant. + sig { + params(params: T.any(::Stripe::Billing::CreditGrant::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def expire(params = {}, opts = {}); end + + # Expires a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrant::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def self.expire(id, params = {}, opts = {}); end + + # Retrieve a list of credit grants. + sig { + params(params: T.any(::Stripe::Billing::CreditGrant::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrant::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def self.update(id, params = {}, opts = {}); end + + # Voids a credit grant. + sig { + params(params: T.any(::Stripe::Billing::CreditGrant::VoidGrantParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def void_grant(params = {}, opts = {}); end + + # Voids a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrant::VoidGrantParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def self.void_grant(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter.rbi b/rbi/stripe/resources/billing/meter.rbi index 34bfec5fb..d3d8a50ea 100644 --- a/rbi/stripe/resources/billing/meter.rbi +++ b/rbi/stripe/resources/billing/meter.rbi @@ -9,62 +9,225 @@ module Stripe # Related guide: [Usage based billing](https://docs.stripe.com/billing/subscriptions/usage-based) class Meter < APIResource class CustomerMapping < Stripe::StripeObject + # The key in the meter event payload to use for mapping the event to a customer. sig { returns(String) } attr_reader :event_payload_key + # The method for mapping a meter event to a customer. sig { returns(String) } attr_reader :type end class DefaultAggregation < Stripe::StripeObject + # Specifies how events are aggregated. sig { returns(String) } attr_reader :formula end class StatusTransitions < Stripe::StripeObject + # The time the meter was deactivated, if any. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :deactivated_at end class ValueSettings < Stripe::StripeObject + # The key in the meter event payload to use as the value for this meter. sig { returns(String) } attr_reader :event_payload_key end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(CustomerMapping) } # Attribute for field customer_mapping + sig { returns(CustomerMapping) } attr_reader :customer_mapping - sig { returns(DefaultAggregation) } # Attribute for field default_aggregation + sig { returns(DefaultAggregation) } attr_reader :default_aggregation - sig { returns(String) } # The meter's name. - attr_reader :display_name sig { returns(String) } + attr_reader :display_name # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + sig { returns(String) } attr_reader :event_name - sig { returns(T.nilable(String)) } # The time window to pre-aggregate meter events for, if any. + sig { returns(T.nilable(String)) } attr_reader :event_time_window - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The meter's status. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(Integer) } # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated - sig { returns(ValueSettings) } # Attribute for field value_settings + sig { returns(ValueSettings) } attr_reader :value_settings + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Filter results to only include meters with the given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CustomerMapping < Stripe::RequestParams + # The key in the meter event payload to use for mapping the event to a customer. + sig { returns(String) } + attr_accessor :event_payload_key + # The method for mapping a meter event to a customer. Must be `by_id`. + sig { returns(String) } + attr_accessor :type + sig { params(event_payload_key: String, type: String).void } + def initialize(event_payload_key: nil, type: nil); end + end + class DefaultAggregation < Stripe::RequestParams + # Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value. + sig { returns(String) } + attr_accessor :formula + sig { params(formula: String).void } + def initialize(formula: nil); end + end + class ValueSettings < Stripe::RequestParams + # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". + sig { returns(String) } + attr_accessor :event_payload_key + sig { params(event_payload_key: String).void } + def initialize(event_payload_key: nil); end + end + # Fields that specify how to map a meter event to a customer. + sig { returns(::Stripe::Billing::Meter::CreateParams::CustomerMapping) } + attr_accessor :customer_mapping + # The default settings to aggregate a meter's events with. + sig { returns(::Stripe::Billing::Meter::CreateParams::DefaultAggregation) } + attr_accessor :default_aggregation + # The meter’s name. Not visible to the customer. + sig { returns(String) } + attr_accessor :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + sig { returns(String) } + attr_accessor :event_name + # The time window to pre-aggregate meter events for, if any. + sig { returns(String) } + attr_accessor :event_time_window + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Fields that specify how to calculate a meter event's value. + sig { returns(::Stripe::Billing::Meter::CreateParams::ValueSettings) } + attr_accessor :value_settings + sig { + params(customer_mapping: ::Stripe::Billing::Meter::CreateParams::CustomerMapping, default_aggregation: ::Stripe::Billing::Meter::CreateParams::DefaultAggregation, display_name: String, event_name: String, event_time_window: String, expand: T::Array[String], value_settings: ::Stripe::Billing::Meter::CreateParams::ValueSettings).void + } + def initialize( + customer_mapping: nil, + default_aggregation: nil, + display_name: nil, + event_name: nil, + event_time_window: nil, + expand: nil, + value_settings: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # The meter’s name. Not visible to the customer. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(display_name: String, expand: T::Array[String]).void } + def initialize(display_name: nil, expand: nil); end + end + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a billing meter. + sig { + params(params: T.any(::Stripe::Billing::Meter::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def self.create(params = {}, opts = {}); end + + # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. + sig { + params(params: T.any(::Stripe::Billing::Meter::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def deactivate(params = {}, opts = {}); end + + # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. + sig { + params(id: String, params: T.any(::Stripe::Billing::Meter::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def self.deactivate(id, params = {}, opts = {}); end + + # Retrieve a list of billing meters. + sig { + params(params: T.any(::Stripe::Billing::Meter::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. + sig { + params(params: T.any(::Stripe::Billing::Meter::ReactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def reactivate(params = {}, opts = {}); end + + # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. + sig { + params(id: String, params: T.any(::Stripe::Billing::Meter::ReactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def self.reactivate(id, params = {}, opts = {}); end + + # Updates a billing meter. + sig { + params(id: String, params: T.any(::Stripe::Billing::Meter::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_error_report.rbi b/rbi/stripe/resources/billing/meter_error_report.rbi index 65981e0b1..a93b52ee5 100644 --- a/rbi/stripe/resources/billing/meter_error_report.rbi +++ b/rbi/stripe/resources/billing/meter_error_report.rbi @@ -9,52 +9,62 @@ module Stripe class ErrorType < Stripe::StripeObject class SampleError < Stripe::StripeObject class ApiRequest < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # idempotency_key of the request sig { returns(String) } attr_reader :idempotency_key end + # Attribute for field api_request sig { returns(T.nilable(ApiRequest)) } attr_reader :api_request + # message of the error sig { returns(String) } attr_reader :error_message end + # Attribute for field sample_errors sig { returns(T::Array[SampleError]) } attr_reader :sample_errors end + # The number of errors generated sig { returns(Integer) } attr_reader :error_count + # More information about errors sig { returns(T::Array[ErrorType]) } attr_reader :error_types end class RelatedObject < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The type of meter error related object. Should be 'meter' sig { returns(String) } attr_reader :object + # The url of the meter object sig { returns(String) } attr_reader :url end - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Reason) } # Attribute for field reason + sig { returns(Reason) } attr_reader :reason - sig { returns(T.nilable(RelatedObject)) } # The related objects about the error + sig { returns(T.nilable(RelatedObject)) } attr_reader :related_object - sig { returns(String) } # Summary of invalid events + sig { returns(String) } attr_reader :summary - sig { returns(Integer) } # Time when validation ended. Measured in seconds since the Unix epoch - attr_reader :validation_end sig { returns(Integer) } + attr_reader :validation_end # Time when validation started. Measured in seconds since the Unix epoch + sig { returns(Integer) } attr_reader :validation_start end end diff --git a/rbi/stripe/resources/billing/meter_event.rbi b/rbi/stripe/resources/billing/meter_event.rbi index db10fa2b9..da0930065 100644 --- a/rbi/stripe/resources/billing/meter_event.rbi +++ b/rbi/stripe/resources/billing/meter_event.rbi @@ -6,27 +6,59 @@ module Stripe module Billing # Meter events represent actions that customers take in your system. You can use meter events to bill a customer based on their usage. Meter events are associated with billing meters, which define both the contents of the event's payload and how to aggregate those events. class MeterEvent < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The name of the meter event. Corresponds with the `event_name` field on a meter. - attr_reader :event_name sig { returns(String) } + attr_reader :event_name # A unique identifier for the event. + sig { returns(String) } attr_reader :identifier - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, String]) } # The payload of the event. This contains the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://stripe.com/docs/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } attr_reader :payload - sig { returns(Integer) } # The timestamp passed in when creating the event. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :timestamp + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + sig { returns(String) } + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } + attr_accessor :payload + # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(Integer) } + attr_accessor :timestamp + sig { + params(event_name: String, expand: T::Array[String], identifier: String, payload: T::Hash[String, String], timestamp: Integer).void + } + def initialize( + event_name: nil, + expand: nil, + identifier: nil, + payload: nil, + timestamp: nil + ); end + end + # Creates a billing meter event. + sig { + params(params: T.any(::Stripe::Billing::MeterEvent::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEvent) + } + def self.create(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/billing/meter_event_adjustment.rbi index 3b4ecfefd..7ff1c78b7 100644 --- a/rbi/stripe/resources/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/billing/meter_event_adjustment.rbi @@ -7,27 +7,58 @@ module Stripe # A billing meter event adjustment is a resource that allows you to cancel a meter event. For example, you might create a billing meter event adjustment to cancel a meter event that was created in error or attached to the wrong customer. class MeterEventAdjustment < APIResource class Cancel < Stripe::StripeObject + # Unique identifier for the event. sig { returns(T.nilable(String)) } attr_reader :identifier end - sig { returns(T.nilable(Cancel)) } # Specifies which event to cancel. + sig { returns(T.nilable(Cancel)) } attr_reader :cancel - sig { returns(String) } # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } attr_reader :event_name - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The meter event adjustment's status. - attr_reader :status sig { returns(String) } + attr_reader :status # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } attr_reader :type + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + sig { returns(String) } + attr_accessor :identifier + sig { params(identifier: String).void } + def initialize(identifier: nil); end + end + # Specifies which event to cancel. + sig { returns(::Stripe::Billing::MeterEventAdjustment::CreateParams::Cancel) } + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } + attr_accessor :type + sig { + params(cancel: ::Stripe::Billing::MeterEventAdjustment::CreateParams::Cancel, event_name: String, expand: T::Array[String], type: String).void + } + def initialize(cancel: nil, event_name: nil, expand: nil, type: nil); end + end + # Creates a billing meter event adjustment. + sig { + params(params: T.any(::Stripe::Billing::MeterEventAdjustment::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEventAdjustment) + } + def self.create(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing/meter_event_summary.rbi b/rbi/stripe/resources/billing/meter_event_summary.rbi index c03a0dcf5..69ecdbfed 100644 --- a/rbi/stripe/resources/billing/meter_event_summary.rbi +++ b/rbi/stripe/resources/billing/meter_event_summary.rbi @@ -7,26 +7,26 @@ module Stripe # A billing meter event summary represents an aggregated view of a customer's billing meter events within a specified timeframe. It indicates how much # usage was accrued by a customer for that period. class MeterEventSummary < APIResource - sig { returns(Float) } # Aggregated value of all the events within `start_time` (inclusive) and `end_time` (inclusive). The aggregation strategy is defined on meter via `default_aggregation`. + sig { returns(Float) } attr_reader :aggregated_value - sig { returns(Integer) } # End timestamp for this event summary (exclusive). Must be aligned with minute boundaries. + sig { returns(Integer) } attr_reader :end_time - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The meter associated with this event summary. - attr_reader :meter sig { returns(String) } + attr_reader :meter # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # Start timestamp for this event summary (inclusive). Must be aligned with minute boundaries. + sig { returns(Integer) } attr_reader :start_time end end diff --git a/rbi/stripe/resources/billing_portal/configuration.rbi b/rbi/stripe/resources/billing_portal/configuration.rbi index 889468ff4..f42700b6b 100644 --- a/rbi/stripe/resources/billing_portal/configuration.rbi +++ b/rbi/stripe/resources/billing_portal/configuration.rbi @@ -7,126 +7,634 @@ module Stripe # A portal configuration describes the functionality and behavior of a portal session. class Configuration < APIResource class BusinessProfile < Stripe::StripeObject + # The messaging shown to customers in the portal. sig { returns(T.nilable(String)) } attr_reader :headline + # A link to the business’s publicly available privacy policy. sig { returns(T.nilable(String)) } attr_reader :privacy_policy_url + # A link to the business’s publicly available terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service_url end class Features < Stripe::StripeObject class CustomerUpdate < Stripe::StripeObject + # The types of customer updates that are supported. When empty, customers are not updateable. sig { returns(T::Array[String]) } attr_reader :allowed_updates + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class InvoiceHistory < Stripe::StripeObject + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class PaymentMethodUpdate < Stripe::StripeObject + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class SubscriptionCancel < Stripe::StripeObject class CancellationReason < Stripe::StripeObject + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Which cancellation reasons will be given as options to the customer. sig { returns(T::Array[String]) } attr_reader :options end + # Attribute for field cancellation_reason sig { returns(CancellationReason) } attr_reader :cancellation_reason + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. sig { returns(String) } attr_reader :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`. sig { returns(String) } attr_reader :proration_behavior end class SubscriptionUpdate < Stripe::StripeObject class Product < Stripe::StripeObject + # The list of price IDs which, when subscribed to, a subscription can be updated. sig { returns(T::Array[String]) } attr_reader :prices + # The product ID. sig { returns(String) } attr_reader :product end class ScheduleAtPeriodEnd < Stripe::StripeObject class Condition < Stripe::StripeObject + # The type of condition. sig { returns(String) } attr_reader :type end + # List of conditions. When any condition is true, an update will be scheduled at the end of the current period. sig { returns(T::Array[Condition]) } attr_reader :conditions end + # The types of subscription updates that are supported for items listed in the `products` attribute. When empty, subscriptions are not updateable. sig { returns(T::Array[String]) } attr_reader :default_allowed_updates + # Whether the feature is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # The list of up to 10 products that support subscription updates. sig { returns(T.nilable(T::Array[Product])) } attr_reader :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. Defaults to a value of `none` if you don't set it during creation. sig { returns(String) } attr_reader :proration_behavior + # Attribute for field schedule_at_period_end sig { returns(ScheduleAtPeriodEnd) } attr_reader :schedule_at_period_end end + # Attribute for field customer_update sig { returns(CustomerUpdate) } attr_reader :customer_update + # Attribute for field invoice_history sig { returns(InvoiceHistory) } attr_reader :invoice_history + # Attribute for field payment_method_update sig { returns(PaymentMethodUpdate) } attr_reader :payment_method_update + # Attribute for field subscription_cancel sig { returns(SubscriptionCancel) } attr_reader :subscription_cancel + # Attribute for field subscription_update sig { returns(SubscriptionUpdate) } attr_reader :subscription_update end class LoginPage < Stripe::StripeObject + # If `true`, a shareable `url` will be generated that will take your customers to a hosted login page for the customer portal. + # + # If `false`, the previously generated `url`, if any, will be deactivated. sig { returns(T::Boolean) } attr_reader :enabled + # A shareable URL to the hosted portal login page. Your customers will be able to log in with their [email](https://stripe.com/docs/api/customers/object#customer_object-email) and receive a link to their customer portal. sig { returns(T.nilable(String)) } attr_reader :url end - sig { returns(T::Boolean) } # Whether the configuration is active and can be used to create portal sessions. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the configuration. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(BusinessProfile) } # Attribute for field business_profile + sig { returns(BusinessProfile) } attr_reader :business_profile - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + sig { returns(T.nilable(String)) } attr_reader :default_return_url - sig { returns(Features) } # Attribute for field features + sig { returns(Features) } attr_reader :features - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Whether the configuration is the default. If `true`, this configuration can be managed in the Dashboard and portal sessions will use this configuration unless it is overriden when creating the session. - attr_reader :is_default sig { returns(T::Boolean) } + attr_reader :is_default # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(LoginPage) } # Attribute for field login_page + sig { returns(LoginPage) } attr_reader :login_page - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated + class ListParams < Stripe::RequestParams + # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + sig { returns(T::Boolean) } + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + sig { returns(T::Boolean) } + attr_accessor :is_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, ending_before: String, expand: T::Array[String], is_default: T::Boolean, limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + ending_before: nil, + expand: nil, + is_default: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + sig { returns(T.nilable(String)) } + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + sig { returns(String) } + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + sig { returns(String) } + attr_accessor :terms_of_service_url + sig { + params(headline: T.nilable(String), privacy_policy_url: String, terms_of_service_url: String).void + } + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end + end + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean).void } + def initialize(allowed_updates: nil, enabled: nil); end + end + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :options + sig { params(enabled: T::Boolean, options: T.nilable(T::Array[String])).void } + def initialize(enabled: nil, options: nil); end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel::CancellationReason) + } + attr_accessor :cancellation_reason + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + sig { returns(String) } + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(cancellation_reason: ::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel::CancellationReason, enabled: T::Boolean, mode: String, proration_behavior: String).void + } + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ); end + end + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + sig { returns(T::Array[String]) } + attr_accessor :prices + # The product id. + sig { returns(String) } + attr_accessor :product + sig { params(prices: T::Array[String], product: String).void } + def initialize(prices: nil, product: nil); end + end + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + sig { + returns(T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]) + } + attr_accessor :conditions + sig { + params(conditions: T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]).void + } + def initialize(conditions: nil); end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + sig { + returns(T.nilable(T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::Product])) + } + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + sig { returns(String) } + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd) + } + attr_accessor :schedule_at_period_end + sig { + params(default_allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean, products: T.nilable(T::Array[::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::Product]), proration_behavior: String, schedule_at_period_end: ::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd).void + } + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ); end + end + # Information about updating the customer details in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::CustomerUpdate) + } + attr_accessor :customer_update + # Information about showing the billing history in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::InvoiceHistory) + } + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::PaymentMethodUpdate) + } + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel) + } + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate) + } + attr_accessor :subscription_update + sig { + params(customer_update: ::Stripe::BillingPortal::Configuration::CreateParams::Features::CustomerUpdate, invoice_history: ::Stripe::BillingPortal::Configuration::CreateParams::Features::InvoiceHistory, payment_method_update: ::Stripe::BillingPortal::Configuration::CreateParams::Features::PaymentMethodUpdate, subscription_cancel: ::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionCancel, subscription_update: ::Stripe::BillingPortal::Configuration::CreateParams::Features::SubscriptionUpdate).void + } + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ); end + end + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # The business information shown to customers in the portal. + sig { returns(::Stripe::BillingPortal::Configuration::CreateParams::BusinessProfile) } + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + sig { returns(T.nilable(String)) } + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the features available in the portal. + sig { returns(::Stripe::BillingPortal::Configuration::CreateParams::Features) } + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + sig { returns(::Stripe::BillingPortal::Configuration::CreateParams::LoginPage) } + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(business_profile: ::Stripe::BillingPortal::Configuration::CreateParams::BusinessProfile, default_return_url: T.nilable(String), expand: T::Array[String], features: ::Stripe::BillingPortal::Configuration::CreateParams::Features, login_page: ::Stripe::BillingPortal::Configuration::CreateParams::LoginPage, metadata: T::Hash[String, String]).void + } + def initialize( + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + sig { returns(T.nilable(String)) } + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + sig { returns(T.nilable(String)) } + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + sig { returns(T.nilable(String)) } + attr_accessor :terms_of_service_url + sig { + params(headline: T.nilable(String), privacy_policy_url: T.nilable(String), terms_of_service_url: T.nilable(String)).void + } + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end + end + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean).void } + def initialize(allowed_updates: nil, enabled: nil); end + end + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :options + sig { params(enabled: T::Boolean, options: T.nilable(T::Array[String])).void } + def initialize(enabled: nil, options: nil); end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel::CancellationReason) + } + attr_accessor :cancellation_reason + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + sig { returns(String) } + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(cancellation_reason: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel::CancellationReason, enabled: T::Boolean, mode: String, proration_behavior: String).void + } + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ); end + end + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + sig { returns(T::Array[String]) } + attr_accessor :prices + # The product id. + sig { returns(String) } + attr_accessor :product + sig { params(prices: T::Array[String], product: String).void } + def initialize(prices: nil, product: nil); end + end + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + sig { + returns(T.nilable(T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])) + } + attr_accessor :conditions + sig { + params(conditions: T.nilable(T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])).void + } + def initialize(conditions: nil); end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + sig { + returns(T.nilable(T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::Product])) + } + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + sig { returns(String) } + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd) + } + attr_accessor :schedule_at_period_end + sig { + params(default_allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean, products: T.nilable(T::Array[::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::Product]), proration_behavior: String, schedule_at_period_end: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd).void + } + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ); end + end + # Information about updating the customer details in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::CustomerUpdate) + } + attr_accessor :customer_update + # Information about showing the billing history in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::InvoiceHistory) + } + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::PaymentMethodUpdate) + } + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel) + } + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate) + } + attr_accessor :subscription_update + sig { + params(customer_update: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::CustomerUpdate, invoice_history: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::InvoiceHistory, payment_method_update: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::PaymentMethodUpdate, subscription_cancel: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionCancel, subscription_update: ::Stripe::BillingPortal::Configuration::UpdateParams::Features::SubscriptionUpdate).void + } + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ); end + end + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + # + # Set to `false` to deactivate the `login_page.url`. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # Whether the configuration is active and can be used to create portal sessions. + sig { returns(T::Boolean) } + attr_accessor :active + # The business information shown to customers in the portal. + sig { returns(::Stripe::BillingPortal::Configuration::UpdateParams::BusinessProfile) } + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + sig { returns(T.nilable(String)) } + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the features available in the portal. + sig { returns(::Stripe::BillingPortal::Configuration::UpdateParams::Features) } + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + sig { returns(::Stripe::BillingPortal::Configuration::UpdateParams::LoginPage) } + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(active: T::Boolean, business_profile: ::Stripe::BillingPortal::Configuration::UpdateParams::BusinessProfile, default_return_url: T.nilable(String), expand: T::Array[String], features: ::Stripe::BillingPortal::Configuration::UpdateParams::Features, login_page: ::Stripe::BillingPortal::Configuration::UpdateParams::LoginPage, metadata: T.nilable(T::Hash[String, String])).void + } + def initialize( + active: nil, + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ); end + end + # Creates a configuration that describes the functionality and behavior of a PortalSession + sig { + params(params: T.any(::Stripe::BillingPortal::Configuration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of configurations that describe the functionality of the customer portal. + sig { + params(params: T.any(::Stripe::BillingPortal::Configuration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a configuration that describes the functionality of the customer portal. + sig { + params(id: String, params: T.any(::Stripe::BillingPortal::Configuration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/billing_portal/session.rbi b/rbi/stripe/resources/billing_portal/session.rbi index 7cda5592d..538757bdb 100644 --- a/rbi/stripe/resources/billing_portal/session.rbi +++ b/rbi/stripe/resources/billing_portal/session.rbi @@ -22,106 +22,320 @@ module Stripe class Flow < Stripe::StripeObject class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # A custom message to display to the customer after the flow is completed. sig { returns(T.nilable(String)) } attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the flow is completed. sig { returns(String) } attr_reader :return_url end + # Configuration when `after_completion.type=hosted_confirmation`. sig { returns(T.nilable(HostedConfirmation)) } attr_reader :hosted_confirmation + # Configuration when `after_completion.type=redirect`. sig { returns(T.nilable(Redirect)) } attr_reader :redirect + # The specified type of behavior after the flow is completed. sig { returns(String) } attr_reader :type end class SubscriptionCancel < Stripe::StripeObject class Retention < Stripe::StripeObject class CouponOffer < Stripe::StripeObject + # The ID of the coupon to be offered. sig { returns(String) } attr_reader :coupon end + # Configuration when `retention.type=coupon_offer`. sig { returns(T.nilable(CouponOffer)) } attr_reader :coupon_offer + # Type of retention strategy that will be used. sig { returns(String) } attr_reader :type end + # Specify a retention strategy to be used in the cancellation flow. sig { returns(T.nilable(Retention)) } attr_reader :retention + # The ID of the subscription to be canceled. sig { returns(String) } attr_reader :subscription end class SubscriptionUpdate < Stripe::StripeObject + # The ID of the subscription to be updated. sig { returns(String) } attr_reader :subscription end class SubscriptionUpdateConfirm < Stripe::StripeObject class Discount < Stripe::StripeObject + # The ID of the coupon to apply to this subscription update. sig { returns(T.nilable(String)) } attr_reader :coupon + # The ID of a promotion code to apply to this subscription update. sig { returns(T.nilable(String)) } attr_reader :promotion_code end class Item < Stripe::StripeObject + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. sig { returns(T.nilable(String)) } attr_reader :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). sig { returns(T.nilable(String)) } attr_reader :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. sig { returns(Integer) } attr_reader :quantity end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. sig { returns(T.nilable(T::Array[Discount])) } attr_reader :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. sig { returns(T::Array[Item]) } attr_reader :items + # The ID of the subscription to be updated. sig { returns(String) } attr_reader :subscription end + # Attribute for field after_completion sig { returns(AfterCompletion) } attr_reader :after_completion + # Configuration when `flow.type=subscription_cancel`. sig { returns(T.nilable(SubscriptionCancel)) } attr_reader :subscription_cancel + # Configuration when `flow.type=subscription_update`. sig { returns(T.nilable(SubscriptionUpdate)) } attr_reader :subscription_update + # Configuration when `flow.type=subscription_update_confirm`. sig { returns(T.nilable(SubscriptionUpdateConfirm)) } attr_reader :subscription_update_confirm + # Type of flow that the customer will go through. sig { returns(String) } attr_reader :type end - sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) } # The configuration used by this session, describing the features available. + sig { returns(T.any(String, Stripe::BillingPortal::Configuration)) } attr_reader :configuration - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The ID of the customer for this session. + sig { returns(String) } attr_reader :customer - sig { returns(T.nilable(Flow)) } # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + sig { returns(T.nilable(Flow)) } attr_reader :flow - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # The IETF language tag of the locale Customer Portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + sig { returns(T.nilable(String)) } attr_reader :locale - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The account for which the session was created on behalf of. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. - attr_reader :on_behalf_of sig { returns(T.nilable(String)) } + attr_reader :on_behalf_of # The URL to redirect customers to when they click on the portal's link to return to your website. + sig { returns(T.nilable(String)) } attr_reader :return_url - sig { returns(String) } # The short-lived URL of the session that gives customers access to the customer portal. + sig { returns(String) } attr_reader :url + class CreateParams < Stripe::RequestParams + class FlowData < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the flow is completed. + sig { returns(String) } + attr_accessor :custom_message + sig { params(custom_message: String).void } + def initialize(custom_message: nil); end + end + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the flow is completed. + sig { returns(String) } + attr_accessor :return_url + sig { params(return_url: String).void } + def initialize(return_url: nil); end + end + # Configuration when `after_completion.type=hosted_confirmation`. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::HostedConfirmation) + } + attr_accessor :hosted_confirmation + # Configuration when `after_completion.type=redirect`. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::Redirect) + } + attr_accessor :redirect + # The specified behavior after the flow is completed. + sig { returns(String) } + attr_accessor :type + sig { + params(hosted_confirmation: ::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::HostedConfirmation, redirect: ::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion::Redirect, type: String).void + } + def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end + end + class SubscriptionCancel < Stripe::RequestParams + class Retention < Stripe::RequestParams + class CouponOffer < Stripe::RequestParams + # The ID of the coupon to be offered. + sig { returns(String) } + attr_accessor :coupon + sig { params(coupon: String).void } + def initialize(coupon: nil); end + end + # Configuration when `retention.type=coupon_offer`. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer) + } + attr_accessor :coupon_offer + # Type of retention strategy to use with the customer. + sig { returns(String) } + attr_accessor :type + sig { + params(coupon_offer: ::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer, type: String).void + } + def initialize(coupon_offer: nil, type: nil); end + end + # Specify a retention strategy to be used in the cancellation flow. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention) + } + attr_accessor :retention + # The ID of the subscription to be canceled. + sig { returns(String) } + attr_accessor :subscription + sig { + params(retention: ::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel::Retention, subscription: String).void + } + def initialize(retention: nil, subscription: nil); end + end + class SubscriptionUpdate < Stripe::RequestParams + # The ID of the subscription to be updated. + sig { returns(String) } + attr_accessor :subscription + sig { params(subscription: String).void } + def initialize(subscription: nil); end + end + class SubscriptionUpdateConfirm < Stripe::RequestParams + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this subscription update. + sig { returns(String) } + attr_accessor :coupon + # The ID of a promotion code to apply to this subscription update. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, promotion_code: String).void } + def initialize(coupon: nil, promotion_code: nil); end + end + class Item < Stripe::RequestParams + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + sig { returns(String) } + attr_accessor :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + sig { returns(String) } + attr_accessor :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + sig { returns(Integer) } + attr_accessor :quantity + sig { params(id: String, price: String, quantity: Integer).void } + def initialize(id: nil, price: nil, quantity: nil); end + end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + sig { + returns(T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount]) + } + attr_accessor :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + sig { + returns(T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Item]) + } + attr_accessor :items + # The ID of the subscription to be updated. + sig { returns(String) } + attr_accessor :subscription + sig { + params(discounts: T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount], items: T::Array[::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm::Item], subscription: String).void + } + def initialize(discounts: nil, items: nil, subscription: nil); end + end + # Behavior after the flow is completed. + sig { returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion) } + attr_accessor :after_completion + # Configuration when `flow_data.type=subscription_cancel`. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel) + } + attr_accessor :subscription_cancel + # Configuration when `flow_data.type=subscription_update`. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdate) + } + attr_accessor :subscription_update + # Configuration when `flow_data.type=subscription_update_confirm`. + sig { + returns(::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm) + } + attr_accessor :subscription_update_confirm + # Type of flow that the customer will go through. + sig { returns(String) } + attr_accessor :type + sig { + params(after_completion: ::Stripe::BillingPortal::Session::CreateParams::FlowData::AfterCompletion, subscription_cancel: ::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionCancel, subscription_update: ::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdate, subscription_update_confirm: ::Stripe::BillingPortal::Session::CreateParams::FlowData::SubscriptionUpdateConfirm, type: String).void + } + def initialize( + after_completion: nil, + subscription_cancel: nil, + subscription_update: nil, + subscription_update_confirm: nil, + type: nil + ); end + end + # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. + sig { returns(String) } + attr_accessor :configuration + # The ID of an existing customer. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + sig { returns(::Stripe::BillingPortal::Session::CreateParams::FlowData) } + attr_accessor :flow_data + # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + sig { returns(String) } + attr_accessor :locale + # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + sig { returns(String) } + attr_accessor :on_behalf_of + # The default URL to redirect customers to when they click on the portal's link to return to your website. + sig { returns(String) } + attr_accessor :return_url + sig { + params(configuration: String, customer: String, expand: T::Array[String], flow_data: ::Stripe::BillingPortal::Session::CreateParams::FlowData, locale: String, on_behalf_of: String, return_url: String).void + } + def initialize( + configuration: nil, + customer: nil, + expand: nil, + flow_data: nil, + locale: nil, + on_behalf_of: nil, + return_url: nil + ); end + end + # Creates a session of the customer portal. + sig { + params(params: T.any(::Stripe::BillingPortal::Session::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Session) + } + def self.create(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/capability.rbi b/rbi/stripe/resources/capability.rbi index 3ad23eb66..c3316f3c0 100644 --- a/rbi/stripe/resources/capability.rbi +++ b/rbi/stripe/resources/capability.rbi @@ -9,91 +9,117 @@ module Stripe class Capability < APIResource class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date on which `future_requirements` becomes the main `requirements` hash and `future_requirements` becomes empty. After the transition, `currently_due` requirements may immediately become `past_due`, but the account may also be given a grace period depending on the capability's enablement state prior to transitioning. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash. sig { returns(T::Array[String]) } attr_reader :currently_due + # This is typed as an enum for consistency with `requirements.disabled_reason`, but it safe to assume `future_requirements.disabled_reason` is null because fields in `future_requirements` will never disable the account. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by `requirements.current_deadline`. These fields need to be collected to enable the capability on the account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Date by which the fields in `currently_due` must be collected to keep the capability enabled for the account. These fields may disable the capability sooner if the next threshold is reached before they are collected. sig { returns(T.nilable(Integer)) } attr_reader :current_deadline + # Fields that need to be collected to keep the capability enabled. If not collected by `current_deadline`, these fields appear in `past_due` as well, and the capability is disabled. sig { returns(T::Array[String]) } attr_reader :currently_due + # Description of why the capability is disabled. [Learn more about handling verification issues](https://stripe.com/docs/connect/handling-api-verification). sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and `current_deadline` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by `current_deadline`. These fields need to be collected to enable the capability on the account. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end - sig { returns(T.any(String, Stripe::Account)) } # The account for which the capability enables functionality. + sig { returns(T.any(String, Stripe::Account)) } attr_reader :account - sig { returns(FutureRequirements) } # Attribute for field future_requirements + sig { returns(FutureRequirements) } attr_reader :future_requirements - sig { returns(String) } # The identifier for the capability. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Whether the capability has been requested. + sig { returns(T::Boolean) } attr_reader :requested - sig { returns(T.nilable(Integer)) } # Time at which the capability was requested. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :requested_at - sig { returns(Requirements) } # Attribute for field requirements + sig { returns(Requirements) } attr_reader :requirements - sig { returns(String) } # The status of the capability. + sig { returns(String) } attr_reader :status end end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_offer.rbi b/rbi/stripe/resources/capital/financing_offer.rbi index b38835e6a..a2fff08d6 100644 --- a/rbi/stripe/resources/capital/financing_offer.rbi +++ b/rbi/stripe/resources/capital/financing_offer.rbi @@ -8,84 +8,183 @@ module Stripe # Stripe Capital to a Connect subaccount. class FinancingOffer < APIResource class AcceptedTerms < Stripe::StripeObject + # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount + # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency + # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount amount on remaining premium for the existing loan at payout time. sig { returns(T.nilable(Integer)) } attr_reader :previous_financing_fee_discount_amount + # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end class OfferedTerms < Stripe::StripeObject + # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount + # Describes the type of user the offer is being extended to. sig { returns(String) } attr_reader :campaign_type + # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency + # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount + # Populated when the `product_type` of the `financingoffer` is `refill`. + # Represents the discount rate percentage on remaining fee on the existing loan. When the `financing_offer` + # is paid out, the `previous_financing_fee_discount_amount` will be computed as the multiple of this rate + # and the remaining fee. sig { returns(T.nilable(Float)) } attr_reader :previous_financing_fee_discount_rate + # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end - sig { returns(AcceptedTerms) } # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # the terms accepted by the Connected account, which may differ from those # offered. + sig { returns(AcceptedTerms) } attr_reader :accepted_terms - sig { returns(String) } # The ID of the merchant associated with this financing object. + sig { returns(String) } attr_reader :account - sig { returns(Integer) } # The time at which this financing offer was charged off, if applicable. Given in seconds since unix epoch. - attr_reader :charged_off_at sig { returns(Integer) } + attr_reader :charged_off_at # Time at which the offer was created. Given in seconds since unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Float) } # Time at which the offer expires. Given in seconds since unix epoch. + sig { returns(Float) } attr_reader :expires_after - sig { returns(String) } # The type of financing being offered. - attr_reader :financing_type sig { returns(String) } + attr_reader :financing_type # A unique identifier for the financing object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The object type: financing_offer. + sig { returns(String) } attr_reader :object - sig { returns(OfferedTerms) } # This is an object representing the terms of an offer of financing from # Stripe Capital to a Connected account. This resource represents # both the terms offered to the Connected account. + sig { returns(OfferedTerms) } attr_reader :offered_terms - sig { returns(String) } # Financing product identifier. - attr_reader :product_type sig { returns(String) } + attr_reader :product_type # The ID of the financing offer that replaced this offer. - attr_reader :replacement sig { returns(String) } + attr_reader :replacement # The ID of the financing offer that this offer is a replacement for. - attr_reader :replacement_for sig { returns(String) } + attr_reader :replacement_for # The current status of the offer. - attr_reader :status sig { returns(String) } + attr_reader :status # See [financing_type](https://stripe.com/docs/api/capital/connect_financing_object#financing_offer_object-financing_type). + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # limit list to offers belonging to given connected account + sig { returns(String) } + attr_accessor :connected_account + # Only return offers that were created during the given date interval. + sig { returns(T.any(::Stripe::Capital::FinancingOffer::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # limit list to offers with given status + sig { returns(String) } + attr_accessor :status + sig { + params(connected_account: String, created: T.any(::Stripe::Capital::FinancingOffer::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + connected_account: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class MarkDeliveredParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves the financing offers available for Connected accounts that belong to your platform. + sig { + params(params: T.any(::Stripe::Capital::FinancingOffer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Acknowledges that platform has received and delivered the financing_offer to + # the intended merchant recipient. + sig { + params(params: T.any(::Stripe::Capital::FinancingOffer::MarkDeliveredParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capital::FinancingOffer) + } + def mark_delivered(params = {}, opts = {}); end + + # Acknowledges that platform has received and delivered the financing_offer to + # the intended merchant recipient. + sig { + params(financing_offer: String, params: T.any(::Stripe::Capital::FinancingOffer::MarkDeliveredParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capital::FinancingOffer) + } + def self.mark_delivered(financing_offer, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_summary.rbi b/rbi/stripe/resources/capital/financing_summary.rbi index 7b35f442e..551f0dc7f 100644 --- a/rbi/stripe/resources/capital/financing_summary.rbi +++ b/rbi/stripe/resources/capital/financing_summary.rbi @@ -9,46 +9,66 @@ module Stripe class FinancingSummary < SingletonAPIResource class Details < Stripe::StripeObject class CurrentRepaymentInterval < Stripe::StripeObject + # The time at which the minimum payment amount will be due. If not met through withholding, the Connected account's linked bank account or account balance will be debited. + # Given in seconds since unix epoch. sig { returns(Float) } attr_reader :due_at + # The amount that has already been paid in the current repayment interval. sig { returns(T.nilable(Integer)) } attr_reader :paid_amount + # The amount that is yet to be paid in the current repayment interval. sig { returns(Integer) } attr_reader :remaining_amount end + # Amount of financing offered, in minor units. sig { returns(Integer) } attr_reader :advance_amount + # The time at which the funds were paid out to the connected account's Stripe balance. Given in milliseconds since unix epoch. sig { returns(T.nilable(Float)) } attr_reader :advance_paid_out_at + # Currency that the financing offer is transacted in. For example, `usd`. sig { returns(String) } attr_reader :currency + # The chronologically current repayment interval for the financing offer. sig { returns(T.nilable(CurrentRepaymentInterval)) } attr_reader :current_repayment_interval + # Fixed fee amount, in minor units. sig { returns(Integer) } attr_reader :fee_amount + # The amount the Connected account has paid toward the financing debt so far. sig { returns(Integer) } attr_reader :paid_amount + # The balance remaining to be paid on the financing, in minor units. sig { returns(Integer) } attr_reader :remaining_amount + # The time at which Capital will begin withholding from payments. Given in seconds since unix epoch. sig { returns(T.nilable(Float)) } attr_reader :repayments_begin_at + # Per-transaction rate at which Stripe will withhold funds to repay the financing. sig { returns(Float) } attr_reader :withhold_rate end - sig { returns(T.nilable(Details)) } # Additional information about the financing summary. Describes currency, advance amount, # fee amount, withhold rate, remaining amount, paid amount, current repayment interval, # repayment start date, and advance payout date. + sig { returns(T.nilable(Details)) } attr_reader :details - sig { returns(T.nilable(String)) } # The Financing Offer ID this Financing Summary corresponds to + sig { returns(T.nilable(String)) } attr_reader :financing_offer - sig { returns(String) } # The object type: financing_summary + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # Status of the Connected Account's financing. [/v1/capital/financing_summary](https://stripe.com/docs/api/capital/financing_summary) will only return `details` for `paid_out` financing. + sig { returns(T.nilable(String)) } attr_reader :status + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/capital/financing_transaction.rbi b/rbi/stripe/resources/capital/financing_transaction.rbi index 23328bc6a..b5a55fcaf 100644 --- a/rbi/stripe/resources/capital/financing_transaction.rbi +++ b/rbi/stripe/resources/capital/financing_transaction.rbi @@ -8,60 +8,123 @@ module Stripe class FinancingTransaction < APIResource class Details < Stripe::StripeObject class Transaction < Stripe::StripeObject + # The linked payment ID. sig { returns(String) } attr_reader :charge + # The linked Treasury Financing Transaction ID. sig { returns(String) } attr_reader :treasury_transaction end + # The advance amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :advance_amount + # The currency of the financing transaction. sig { returns(String) } attr_reader :currency + # The fee amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :fee_amount + # The linked payment for the transaction. This field only applies to financing transactions of type `paydown` and reason `automatic_withholding`. sig { returns(String) } attr_reader :linked_payment + # The reason for the financing transaction (if applicable). sig { returns(String) } attr_reader :reason + # The reversed transaction. This field only applies to financing + # transactions of type `reversal`. sig { returns(String) } attr_reader :reversed_transaction + # The advance and fee amount being repaid, paid out, or reversed in minor units. sig { returns(Integer) } attr_reader :total_amount + # This is an object representing a linked transaction on a Capital Financing Transaction. sig { returns(Transaction) } attr_reader :transaction end - sig { returns(String) } # The ID of the merchant associated with this financing transaction. + sig { returns(String) } attr_reader :account - sig { returns(Integer) } # Time at which the financing transaction was created. Given in seconds since unix epoch. + sig { returns(Integer) } attr_reader :created_at - sig { returns(Details) } # This is an object representing a transaction on a Capital financing offer. + sig { returns(Details) } attr_reader :details - sig { returns(T.nilable(String)) } # The Capital financing offer for this financing transaction. + sig { returns(T.nilable(String)) } attr_reader :financing_offer - sig { returns(String) } # A unique identifier for the financing transaction object. - attr_reader :id sig { returns(String) } + attr_reader :id # The Capital transaction object that predates the Financing Transactions API and # corresponds with the balance transaction that was created as a result of this # financing transaction. + sig { returns(String) } attr_reader :legacy_balance_transaction_source - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The object type: financing_transaction - attr_reader :object sig { returns(String) } + attr_reader :object # The type of the financing transaction. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } # A human-friendly description of the financing transaction. + sig { returns(T.nilable(String)) } attr_reader :user_facing_description + class ListParams < Stripe::RequestParams + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. + sig { returns(String) } + attr_accessor :charge + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns transactions that were created that apply to this financing offer ID. + sig { returns(String) } + attr_accessor :financing_offer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only returns transactions that are responsible for reversing this financing transaction ID. + sig { returns(String) } + attr_accessor :reversed_transaction + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. + sig { returns(String) } + attr_accessor :treasury_transaction + sig { + params(charge: String, ending_before: String, expand: T::Array[String], financing_offer: String, limit: Integer, reversed_transaction: String, starting_after: String, treasury_transaction: String).void + } + def initialize( + charge: nil, + ending_before: nil, + expand: nil, + financing_offer: nil, + limit: nil, + reversed_transaction: nil, + starting_after: nil, + treasury_transaction: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of financing transactions. The transactions are returned in sorted order, + # with the most recent transactions appearing first. + sig { + params(params: T.any(::Stripe::Capital::FinancingTransaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/card.rbi b/rbi/stripe/resources/card.rbi index 0650e8fcb..f9c6eb1ec 100644 --- a/rbi/stripe/resources/card.rbi +++ b/rbi/stripe/resources/card.rbi @@ -10,115 +10,116 @@ module Stripe # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) class Card < APIResource class Networks < Stripe::StripeObject + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account this card belongs to. This attribute will not be in the card object if the card belongs to a customer or recipient instead. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account - sig { returns(T.nilable(String)) } # City/District/Suburb/Town/Village. - attr_reader :address_city sig { returns(T.nilable(String)) } + attr_reader :address_city # Billing address country, if provided when creating card. - attr_reader :address_country sig { returns(T.nilable(String)) } + attr_reader :address_country # Address line 1 (Street address/PO Box/Company name). - attr_reader :address_line1 sig { returns(T.nilable(String)) } + attr_reader :address_line1 # If `address_line1` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_line1_check sig { returns(T.nilable(String)) } + attr_reader :address_line1_check # Address line 2 (Apartment/Suite/Unit/Building). - attr_reader :address_line2 sig { returns(T.nilable(String)) } + attr_reader :address_line2 # State/County/Province/Region. - attr_reader :address_state sig { returns(T.nilable(String)) } + attr_reader :address_state # ZIP or postal code. - attr_reader :address_zip sig { returns(T.nilable(String)) } + attr_reader :address_zip # If `address_zip` was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. - attr_reader :address_zip_check sig { returns(T.nilable(String)) } + attr_reader :address_zip_check # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + sig { returns(T.nilable(String)) } attr_reader :allow_redisplay - sig { returns(T.nilable(T::Array[String])) } # A set of available payout methods for this card. Only values from this set should be passed as the `method` when creating a payout. + sig { returns(T.nilable(T::Array[String])) } attr_reader :available_payout_methods - sig { returns(String) } # Card brand. Can be `American Express`, `Diners Club`, `Discover`, `Eftpos Australia`, `Girocard`, `JCB`, `MasterCard`, `UnionPay`, `Visa`, or `Unknown`. + sig { returns(String) } attr_reader :brand - sig { returns(T.nilable(String)) } # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. - attr_reader :country sig { returns(T.nilable(String)) } + attr_reader :country # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). Only applicable on accounts (not customers or recipients). The card can be used as a transfer destination for funds in this currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The customer that this card belongs to. This attribute will not be in the card object if the card belongs to an account or recipient instead. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } # If a CVC was provided, results of the check: `pass`, `fail`, `unavailable`, or `unchecked`. A result of unchecked indicates that CVC was provided but hasn't been checked yet. Checks are typically performed when attaching a card to a Customer object, or when creating a charge. For more details, see [Check if a card is valid without a charge](https://support.stripe.com/questions/check-if-a-card-is-valid-without-a-charge). + sig { returns(T.nilable(String)) } attr_reader :cvc_check - sig { returns(T.nilable(T::Boolean)) } # Whether this card is the default external account for its currency. This property is only available for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(T.nilable(T::Boolean)) } attr_reader :default_for_currency - sig { returns(String) } # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(String)) } # (For tokenized numbers only.) The last four digits of the device account number. + sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 - sig { returns(Integer) } # Two-digit number representing the card's expiration month. - attr_reader :exp_month sig { returns(Integer) } + attr_reader :exp_month # Four-digit number representing the card's expiration year. + sig { returns(Integer) } attr_reader :exp_year - sig { returns(T.nilable(String)) } # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. # # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* + sig { returns(T.nilable(String)) } attr_reader :fingerprint - sig { returns(String) } # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. - attr_reader :funding sig { returns(String) } + attr_reader :funding # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) - attr_reader :iin sig { returns(String) } + attr_reader :iin # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) - attr_reader :issuer sig { returns(String) } + attr_reader :issuer # The last four digits of the card. + sig { returns(String) } attr_reader :last4 - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } # Cardholder name. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(Networks) } # Attribute for field networks + sig { returns(Networks) } attr_reader :networks - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # Status of a card based on the card issuer. - attr_reader :regulated_status sig { returns(T.nilable(String)) } + attr_reader :regulated_status # For external accounts that are cards, possible values are `new` and `errored`. If a payout fails, the status is set to `errored` and [scheduled payouts](https://stripe.com/docs/payouts#payout-schedule) are stopped until account details are updated. - attr_reader :status sig { returns(T.nilable(String)) } + attr_reader :status # If the card number is tokenized, this is the method that was used. Can be `android_pay` (includes Google Pay), `apple_pay`, `masterpass`, `visa_checkout`, or null. + sig { returns(T.nilable(String)) } attr_reader :tokenization_method - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/cash_balance.rbi b/rbi/stripe/resources/cash_balance.rbi index e3991a216..8942596fa 100644 --- a/rbi/stripe/resources/cash_balance.rbi +++ b/rbi/stripe/resources/cash_balance.rbi @@ -6,25 +6,27 @@ module Stripe # A customer's `Cash balance` represents real funds. Customers can add funds to their cash balance by sending a bank transfer. These funds can be used for payment and can eventually be paid out to your bank account. class CashBalance < APIResource class Settings < Stripe::StripeObject + # The configuration for how funds that land in the customer cash balance are reconciled. sig { returns(String) } attr_reader :reconciliation_mode + # A flag to indicate if reconciliation mode returned is the user's default or is specific to this customer cash balance sig { returns(T::Boolean) } attr_reader :using_merchant_default end - sig { returns(T.nilable(T::Hash[String, Integer])) } # A hash of all cash balances available to this customer. You cannot delete a customer with any cash balances, even if the balance is 0. Amounts are represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :available - sig { returns(String) } # The ID of the customer whose cash balance this object represents. + sig { returns(String) } attr_reader :customer - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Settings) } # Attribute for field settings + sig { returns(Settings) } attr_reader :settings end end \ No newline at end of file diff --git a/rbi/stripe/resources/charge.rbi b/rbi/stripe/resources/charge.rbi index 968f8501c..cfe26e09f 100644 --- a/rbi/stripe/resources/charge.rbi +++ b/rbi/stripe/resources/charge.rbi @@ -10,144 +10,202 @@ module Stripe class Charge < APIResource class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class FraudDetails < Stripe::StripeObject + # Assessments from Stripe. If set, the value is `fraudulent`. sig { returns(String) } attr_reader :stripe_report + # Assessments reported by you. If set, possible values of are `safe` and `fraudulent`. sig { returns(String) } attr_reader :user_report end class Level3 < Stripe::StripeObject class LineItem < Stripe::StripeObject + # Attribute for field discount_amount sig { returns(T.nilable(Integer)) } attr_reader :discount_amount + # Attribute for field product_code sig { returns(String) } attr_reader :product_code + # Attribute for field product_description sig { returns(String) } attr_reader :product_description + # Attribute for field quantity sig { returns(T.nilable(Integer)) } attr_reader :quantity + # Attribute for field tax_amount sig { returns(T.nilable(Integer)) } attr_reader :tax_amount + # Attribute for field unit_cost sig { returns(T.nilable(Integer)) } attr_reader :unit_cost end + # Attribute for field customer_reference sig { returns(String) } attr_reader :customer_reference + # Attribute for field line_items sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Attribute for field merchant_reference sig { returns(String) } attr_reader :merchant_reference + # Attribute for field shipping_address_zip sig { returns(String) } attr_reader :shipping_address_zip + # Attribute for field shipping_amount sig { returns(Integer) } attr_reader :shipping_amount + # Attribute for field shipping_from_zip sig { returns(String) } attr_reader :shipping_from_zip end class Outcome < Stripe::StripeObject class Rule < Stripe::StripeObject + # The action taken on the payment. sig { returns(String) } attr_reader :action + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The predicate to evaluate the payment against. sig { returns(String) } attr_reader :predicate end + # For charges declined by the network, a 2 digit code which indicates the advice returned by the network on how to proceed with an error. sig { returns(T.nilable(String)) } attr_reader :network_advice_code + # For charges declined by the network, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code + # Possible values are `approved_by_network`, `declined_by_network`, `not_sent_to_network`, and `reversed_after_approval`. The value `reversed_after_approval` indicates the payment was [blocked by Stripe](https://stripe.com/docs/declines#blocked-payments) after bank authorization, and may temporarily appear as "pending" on a cardholder's statement. sig { returns(T.nilable(String)) } attr_reader :network_status + # An enumerated value providing a more detailed explanation of the outcome's `type`. Charges blocked by Radar's default block rule have the value `highest_risk_level`. Charges placed in review by Radar's default review rule have the value `elevated_risk_level`. Charges authorized, blocked, or placed in review by custom rules have the value `rule`. See [understanding declines](https://stripe.com/docs/declines) for more details. sig { returns(T.nilable(String)) } attr_reader :reason + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are `normal`, `elevated`, `highest`. For non-card payments, and card-based payments predating the public assignment of risk levels, this field will have the value `not_assessed`. In the event of an error in the evaluation, this field will have the value `unknown`. This field is only available with Radar. sig { returns(String) } attr_reader :risk_level + # Stripe Radar's evaluation of the riskiness of the payment. Possible values for evaluated payments are between 0 and 100. For non-card payments, card-based payments predating the public assignment of risk scores, or in the event of an error during evaluation, this field will not be present. This field is only available with Radar for Fraud Teams. sig { returns(Integer) } attr_reader :risk_score + # The ID of the Radar rule that matched the payment, if applicable. sig { returns(T.any(String, Rule)) } attr_reader :rule + # A human-readable description of the outcome type and reason, designed for you (the recipient of the payment), not your customer. sig { returns(T.nilable(String)) } attr_reader :seller_message + # Possible values are `authorized`, `manual_review`, `issuer_declined`, `blocked`, and `invalid`. See [understanding declines](https://stripe.com/docs/declines) and [Radar reviews](https://stripe.com/docs/radar/reviews) for details. sig { returns(String) } attr_reader :type end class PaymentMethodDetails < Stripe::StripeObject class AchCreditTransfer < Stripe::StripeObject + # Account number to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :account_number + # Name of the bank associated with the routing number. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Routing transit number for the bank account to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :routing_number + # SWIFT code of the bank associated with the routing number. sig { returns(T.nilable(String)) } attr_reader :swift_code end class AchDebit < Stripe::StripeObject + # Type of entity that holds the account. This can be either `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Routing transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end class AcssDebit < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Institution number of the bank account sig { returns(T.nilable(String)) } attr_reader :institution_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate + # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end class Affirm < Stripe::StripeObject + # The Affirm transaction ID associated with this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class AfterpayClearpay < Stripe::StripeObject + # The Afterpay order ID associated with this payment intent. sig { returns(T.nilable(String)) } attr_reader :order_id + # Order identifier shown to the merchant in Afterpay’s online portal. sig { returns(T.nilable(String)) } attr_reader :reference end class Alipay < Stripe::StripeObject + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. sig { returns(String) } attr_reader :buyer_id + # Uniquely identifies this particular Alipay account. You can use this attribute to check whether two Alipay accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Transaction ID of this particular Alipay transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id end @@ -155,139 +213,197 @@ module Stripe class AmazonPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 end + # Attribute for field card sig { returns(Card) } attr_reader :card + # funding type of the underlying payment method. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field funding sig { returns(Funding) } attr_reader :funding end class AuBecsDebit < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate end class BacsDebit < Stripe::StripeObject + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.nilable(String)) } attr_reader :mandate + # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Blik < Stripe::StripeObject + # A unique and immutable identifier assigned by BLIK to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Boleto < Stripe::StripeObject + # The tax ID of the customer (CPF for individuals consumers or CNPJ for businesses consumers) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end class DecrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the decremental authorization feature is supported. sig { returns(String) } attr_reader :status end class ExtendedAuthorization < Stripe::StripeObject + # Indicates whether or not the capture window is extended beyond the standard authorization. sig { returns(String) } attr_reader :status end class IncrementalAuthorization < Stripe::StripeObject + # Indicates whether or not the incremental authorization feature is supported. sig { returns(String) } attr_reader :status end class Installments < Stripe::StripeObject class Plan < Stripe::StripeObject + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval + # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end + # Installment plan selected for the payment. sig { returns(T.nilable(Plan)) } attr_reader :plan end class Multicapture < Stripe::StripeObject + # Indicates whether or not multiple captures are supported. sig { returns(String) } attr_reader :status end class NetworkToken < Stripe::StripeObject + # Indicates if Stripe used a network token, either user provided or Stripe managed when processing the transaction. sig { returns(T::Boolean) } attr_reader :used end class Overcapture < Stripe::StripeObject + # The maximum amount that can be captured. sig { returns(Integer) } attr_reader :maximum_amount_capturable + # Indicates whether or not the authorized amount can be over-captured. sig { returns(String) } attr_reader :status end class PartialAuthorization < Stripe::StripeObject + # Indicates whether the transaction requested for partial authorization feature and the authorization outcome. sig { returns(String) } attr_reader :status end class ThreeDSecure < Stripe::StripeObject + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. sig { returns(T.nilable(String)) } attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. sig { returns(T.nilable(String)) } attr_reader :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. sig { returns(T.nilable(String)) } attr_reader :exemption_indicator + # Whether Stripe requested the value of `exemption_indicator` in the transaction. This will depend on + # the outcome of Stripe's internal risk assessment. sig { returns(T::Boolean) } attr_reader :exemption_indicator_applied + # Indicates the outcome of 3D Secure authentication. sig { returns(T.nilable(String)) } attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. sig { returns(T.nilable(String)) } attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id + # The version of 3D Secure that was used. sig { returns(T.nilable(String)) } attr_reader :version end @@ -298,519 +414,759 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type + # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end + # The authorized amount. sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # The latest amount intended to be authorized by this charge. sig { returns(T.nilable(Integer)) } attr_reader :amount_requested + # Authorization code on the charge. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # When using manual capture, a future timestamp at which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # Check results by Card networks on Card address and CVC at time of payment. sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field decremental_authorization sig { returns(DecrementalAuthorization) } attr_reader :decremental_authorization + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Attribute for field extended_authorization sig { returns(ExtendedAuthorization) } attr_reader :extended_authorization + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Attribute for field incremental_authorization sig { returns(IncrementalAuthorization) } attr_reader :incremental_authorization + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } attr_reader :installments + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment or created by it. sig { returns(T.nilable(String)) } attr_reader :mandate + # True if this payment was marked as MOTO and out of scope for SCA. sig { returns(T.nilable(T::Boolean)) } attr_reader :moto + # Attribute for field multicapture sig { returns(Multicapture) } attr_reader :multicapture + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # If this card has network token credentials, this contains the details of the network token credentials. sig { returns(T.nilable(NetworkToken)) } attr_reader :network_token + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Attribute for field overcapture sig { returns(Overcapture) } attr_reader :overcapture + # Attribute for field partial_authorization sig { returns(PartialAuthorization) } attr_reader :partial_authorization + # Status of a card based on the card issuer. sig { returns(T.nilable(String)) } attr_reader :regulated_status + # Populated if this transaction used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject + # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank + # Owner's verified full name. Values are verified or provided by EPS directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # EPS rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Fpx < Stripe::StripeObject + # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # The customer's bank. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank + # Unique transaction id generated by FPX for every request from the merchant sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Giropay < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # Owner's verified full name. Values are verified or provided by Giropay directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Giropay rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject + # Unique transaction id generated by GrabPay sig { returns(T.nilable(String)) } attr_reader :transaction_id end class IdBankTransfer < Stripe::StripeObject + # Account number of the bank account to transfer funds to. sig { returns(String) } attr_reader :account_number + # Bank where the account is located. sig { returns(String) } attr_reader :bank + # Local bank code of the bank. sig { returns(String) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(String) } attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. sig { returns(String) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class InteracPresent < Stripe::StripeObject class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end + # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt end class KakaoPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Klarna < Stripe::StripeObject class PayerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # The payer address country sig { returns(T.nilable(String)) } attr_reader :country end + # The payer's address sig { returns(T.nilable(Address)) } attr_reader :address end + # The payer details for this transaction. sig { returns(T.nilable(PayerDetails)) } attr_reader :payer_details + # The Klarna payment method used for this transaction. + # Can be one of `pay_later`, `pay_now`, `pay_with_financing`, or `pay_in_installments` sig { returns(T.nilable(String)) } attr_reader :payment_method_category + # Preferred language of the Klarna authorization page that the customer is redirected to. + # Can be one of `de-AT`, `en-AT`, `nl-BE`, `fr-BE`, `en-BE`, `de-DE`, `en-DE`, `da-DK`, `en-DK`, `es-ES`, `en-ES`, `fi-FI`, `sv-FI`, `en-FI`, `en-GB`, `en-IE`, `it-IT`, `en-IT`, `nl-NL`, `en-NL`, `nb-NO`, `en-NO`, `sv-SE`, `en-SE`, `en-US`, `es-US`, `fr-FR`, `en-FR`, `cs-CZ`, `en-CZ`, `ro-RO`, `en-RO`, `el-GR`, `en-GR`, `en-AU`, `en-NZ`, `en-CA`, `fr-CA`, `pl-PL`, `en-PL`, `pt-PT`, `en-PT`, `de-CH`, `fr-CH`, `it-CH`, or `en-CH` sig { returns(T.nilable(String)) } attr_reader :preferred_locale end class Konbini < Stripe::StripeObject class Store < Stripe::StripeObject + # The name of the convenience store chain where the payment was completed. sig { returns(T.nilable(String)) } attr_reader :chain end + # If the payment succeeded, this contains the details of the convenience store where the payment was completed. sig { returns(T.nilable(Store)) } attr_reader :store end class KrCard < Stripe::StripeObject + # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject + # Two-letter ISO code representing the funding source country beneath the Link payment. + # You could use this attribute to get a sense of international fees. sig { returns(T.nilable(String)) } attr_reader :country end class MbWay < Stripe::StripeObject; end class Mobilepay < Stripe::StripeObject class Card < Stripe::StripeObject + # Brand of the card used in the transaction sig { returns(T.nilable(String)) } attr_reader :brand + # Two-letter ISO code representing the country of the card sig { returns(T.nilable(String)) } attr_reader :country + # Two digit number representing the card's expiration month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Two digit number representing the card's expiration year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # The last 4 digits of the card sig { returns(T.nilable(String)) } attr_reader :last4 end + # Internal card details sig { returns(T.nilable(Card)) } attr_reader :card end class Multibanco < Stripe::StripeObject + # Entity number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :entity + # Reference number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :reference end class NaverPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Oxxo < Stripe::StripeObject + # OXXO reference number sig { returns(T.nilable(String)) } attr_reader :number end class P24 < Stripe::StripeObject + # The customer's bank. Can be one of `ing`, `citi_handlowy`, `tmobile_usbugi_bankowe`, `plus_bank`, `etransfer_pocztowy24`, `banki_spbdzielcze`, `bank_nowy_bfg_sa`, `getin_bank`, `velobank`, `blik`, `noble_pay`, `ideabank`, `envelobank`, `santander_przelew24`, `nest_przelew`, `mbank_mtransfer`, `inteligo`, `pbac_z_ipko`, `bnp_paribas`, `credit_agricole`, `toyota_bank`, `bank_pekao_sa`, `volkswagen_bank`, `bank_millennium`, `alior_bank`, or `boz`. sig { returns(T.nilable(String)) } attr_reader :bank + # Unique reference for this Przelewy24 payment. sig { returns(T.nilable(String)) } attr_reader :reference + # Owner's verified full name. Values are verified or provided by Przelewy24 directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. + # Przelewy24 rarely provides this information so the attribute is usually empty. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Payco < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class Paynow < Stripe::StripeObject + # Reference number associated with this PayNow payment sig { returns(T.nilable(String)) } attr_reader :reference end class Paypal < Stripe::StripeObject class SellerProtection < Stripe::StripeObject + # An array of conditions that are covered for the transaction, if applicable. sig { returns(T.nilable(T::Array[String])) } attr_reader :dispute_categories + # Indicates whether the transaction is eligible for PayPal's seller protection. sig { returns(String) } attr_reader :status end class Shipping < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class VerifiedAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's full name. Values provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_name + # The level of protection offered as defined by PayPal Seller Protection for Merchants, for this transaction. sig { returns(T.nilable(SellerProtection)) } attr_reader :seller_protection + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. sig { returns(T.nilable(Shipping)) } attr_reader :shipping + # A unique ID generated by PayPal for this transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id + # The shipping address for the customer, as supplied by the merchant at the point of payment + # execution. This shipping address will not be updated if the merchant updates the shipping + # address on the PaymentIntent after the PaymentIntent was successfully confirmed. sig { returns(T.nilable(VerifiedAddress)) } attr_reader :verified_address + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email + # Owner's verified full name. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Payto < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(String) } attr_reader :mandate + # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end class Pix < Stripe::StripeObject + # Unique transaction id generated by BCB sig { returns(T.nilable(String)) } attr_reader :bank_transaction_id end class Promptpay < Stripe::StripeObject + # Bill reference generated by PromptPay sig { returns(T.nilable(String)) } attr_reader :reference end @@ -819,410 +1175,2302 @@ module Stripe class RevolutPay < Stripe::StripeObject class Funding < Stripe::StripeObject class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 end + # Attribute for field card sig { returns(Card) } attr_reader :card + # funding type of the underlying payment method. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field funding sig { returns(Funding) } attr_reader :funding end class SamsungPay < Stripe::StripeObject + # A unique identifier for the buyer as determined by the local payment processor. sig { returns(T.nilable(String)) } attr_reader :buyer_id end class SepaCreditTransfer < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # IBAN of the bank account to transfer funds to. sig { returns(T.nilable(String)) } attr_reader :iban end class SepaDebit < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 + # Find the ID of the mandate used for this payment under the [payment_method_details.sepa_debit.mandate](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-sepa_debit-mandate) property on the Charge. Use this mandate ID to [retrieve the Mandate](https://stripe.com/docs/api/mandates/retrieve). sig { returns(T.nilable(String)) } attr_reader :mandate end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this Charge. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the SOFORT authorization page that the customer is redirected to. + # Can be one of `de`, `en`, `es`, `fr`, `it`, `nl`, or `pl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by SOFORT directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class StripeAccount < Stripe::StripeObject; end class Swish < Stripe::StripeObject + # Uniquely identifies the payer's Swish account. You can use this attribute to check whether two Swish transactions were paid for by the same payer sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Payer bank reference number for the payment sig { returns(T.nilable(String)) } attr_reader :payment_reference + # The last four digits of the Swish account phone number sig { returns(T.nilable(String)) } attr_reader :verified_phone_last4 end class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # Reference number to locate ACH payments with customer's bank. sig { returns(T.nilable(String)) } attr_reader :payment_reference + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end class Wechat < Stripe::StripeObject; end class WechatPay < Stripe::StripeObject + # Uniquely identifies this particular WeChat Pay account. You can use this attribute to check whether two WeChat accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Transaction ID of this particular WeChat Pay transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class Zip < Stripe::StripeObject; end + # Attribute for field ach_credit_transfer sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer + # Attribute for field ach_debit sig { returns(AchDebit) } attr_reader :ach_debit + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay + # Attribute for field qris sig { returns(Qris) } attr_reader :qris + # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_credit_transfer sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field stripe_account sig { returns(StripeAccount) } attr_reader :stripe_account + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field twint sig { returns(Twint) } attr_reader :twint + # The type of transaction-specific details of the payment method used in the payment, one of `ach_credit_transfer`, `ach_debit`, `acss_debit`, `alipay`, `au_becs_debit`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `klarna`, `multibanco`, `p24`, `sepa_debit`, `sofort`, `stripe_account`, or `wechat`. + # An additional hash is included on `payment_method_details` with a name matching this value. + # It contains information specific to the payment method. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account + # Attribute for field wechat sig { returns(Wechat) } attr_reader :wechat + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. sig { returns(String) } attr_reader :session end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TransferData < Stripe::StripeObject + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. sig { returns(T.nilable(Integer)) } attr_reader :amount + # ID of an existing, connected Stripe account to transfer funds to if `transfer_data` was specified in the charge request. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(Integer) } # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Amount in cents (or local equivalent) captured (can be less than the amount attribute on the charge if a partial capture was made). - attr_reader :amount_captured sig { returns(Integer) } + attr_reader :amount_captured # Amount in cents (or local equivalent) refunded (can be less than the amount attribute on the charge if a partial refund was issued). + sig { returns(Integer) } attr_reader :amount_refunded - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect application that created the charge. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } # The application fee (if any) for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } attr_reader :application_fee - sig { returns(T.nilable(Integer)) } # The amount of the application fee (if any) requested for the charge. [See the Connect documentation](https://stripe.com/docs/connect/direct-charges#collect-fees) for details. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(String) } # Authorization code on the charge. + sig { returns(String) } attr_reader :authorization_code - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # ID of the balance transaction that describes the impact of this charge on your account balance (not including refunds or disputes). + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(BillingDetails) } # Attribute for field billing_details + sig { returns(BillingDetails) } attr_reader :billing_details - sig { returns(T.nilable(String)) } # The full statement descriptor that is passed to card networks, and that is displayed on your customers' credit card and bank statements. Allows you to see what the statement descriptor looks like after the static and dynamic portions are combined. This value only exists for card payments. + sig { returns(T.nilable(String)) } attr_reader :calculated_statement_descriptor - sig { returns(T::Boolean) } # If the charge was created without capturing, this Boolean represents whether it is still uncaptured or has since been captured. + sig { returns(T::Boolean) } attr_reader :captured - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # ID of the customer this charge is for if one exists. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Boolean) } # Whether the charge has been disputed. + sig { returns(T::Boolean) } attr_reader :disputed - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # ID of the balance transaction that describes the reversal of the balance on your account due to payment failure. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :failure_balance_transaction - sig { returns(T.nilable(String)) } # Error code explaining reason for charge failure if available (see [the errors section](https://stripe.com/docs/error-codes) for a list of codes). - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code # Message to user further explaining reason for charge failure if available. + sig { returns(T.nilable(String)) } attr_reader :failure_message - sig { returns(T.nilable(FraudDetails)) } # Information on fraud assessments for the charge. + sig { returns(T.nilable(FraudDetails)) } attr_reader :fraud_details - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # ID of the invoice this charge is for if one exists. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(Level3) } # Attribute for field level3 + sig { returns(Level3) } attr_reader :level3 - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account (if any) the charge was made on behalf of without triggering an automatic transfer. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(Outcome)) } # Details about whether the payment was accepted, and why. See [understanding declines](https://stripe.com/docs/declines) for details. + sig { returns(T.nilable(Outcome)) } attr_reader :outcome - sig { returns(T::Boolean) } # `true` if the charge succeeded, or was successfully authorized for later capture. + sig { returns(T::Boolean) } attr_reader :paid - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } # ID of the PaymentIntent associated with this charge, if one exists. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(T.nilable(String)) } # ID of the payment method used in this charge. + sig { returns(T.nilable(String)) } attr_reader :payment_method - sig { returns(T.nilable(PaymentMethodDetails)) } # Details about the payment method at the time of the transaction. + sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - sig { returns(RadarOptions) } # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(RadarOptions) } attr_reader :radar_options - sig { returns(T.nilable(String)) } # This is the email address that the receipt for this charge was sent to. - attr_reader :receipt_email sig { returns(T.nilable(String)) } + attr_reader :receipt_email # This is the transaction number that appears on email receipts sent for this charge. This attribute will be `null` until a receipt has been sent. - attr_reader :receipt_number sig { returns(T.nilable(String)) } + attr_reader :receipt_number # This is the URL to view the receipt for this charge. The receipt is kept up-to-date to the latest state of the charge, including any refunds. If the charge is for an Invoice, the receipt will be stylized as an Invoice receipt. + sig { returns(T.nilable(String)) } attr_reader :receipt_url - sig { returns(T::Boolean) } # Whether the charge has been fully refunded. If the charge is only partially refunded, this attribute will still be false. + sig { returns(T::Boolean) } attr_reader :refunded - sig { returns(T.nilable(Stripe::ListObject)) } # A list of refunds that have been applied to the charge. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :refunds - sig { returns(T.nilable(T.any(String, Stripe::Review))) } # ID of the review associated with this charge if one exists. + sig { returns(T.nilable(T.any(String, Stripe::Review))) } attr_reader :review - sig { returns(T.nilable(Shipping)) } # Shipping information for the charge. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping + # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. sig { returns(T.nilable(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source))) } - # This is a legacy field that will be removed in the future. It contains the Source, Card, or BankAccount object used for the charge. For details about the payment method used for this charge, refer to `payment_method` or `payment_method_details` instead. attr_reader :source - sig { returns(T.nilable(T.any(String, Stripe::Transfer))) } # The transfer ID which created this charge. Only present if the charge came from another Stripe account. [See the Connect documentation](https://docs.stripe.com/connect/destination-charges) for details. + sig { returns(T.nilable(T.any(String, Stripe::Transfer))) } attr_reader :source_transfer - sig { returns(T.nilable(String)) } # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix - sig { returns(String) } # The status of the payment is either `succeeded`, `pending`, or `failed`. + sig { returns(String) } attr_reader :status - sig { returns(T.any(String, Stripe::Transfer)) } # ID of the transfer to the `destination` account (only applicable if the charge was created using the `destination` parameter). + sig { returns(T.any(String, Stripe::Transfer)) } attr_reader :transfer - sig { returns(T.nilable(TransferData)) } # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(String)) } # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(T.nilable(String)) } attr_reader :transfer_group + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return charges that were created during the given date interval. + sig { returns(T.any(::Stripe::Charge::ListParams::Created, Integer)) } + attr_accessor :created + # Only return charges for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return charges for this transfer group, limited to 100. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(created: T.any(::Stripe::Charge::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String, transfer_group: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil, + transfer_group: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Destination < Stripe::RequestParams + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :account + # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. + sig { returns(Integer) } + attr_accessor :amount + sig { params(account: String, amount: Integer).void } + def initialize(account: nil, amount: nil); end + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::Charge::CreateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::Charge::CreateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + sig { returns(Integer) } + attr_accessor :amount + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field application_fee + sig { returns(Integer) } + attr_accessor :application_fee + # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. + sig { returns(T::Boolean) } + attr_accessor :capture + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of an existing customer that will be charged in this request. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + sig { returns(String) } + attr_accessor :description + # Attribute for param field destination + sig { returns(::Stripe::Charge::CreateParams::Destination) } + attr_accessor :destination + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). + sig { returns(String) } + attr_accessor :on_behalf_of + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::Charge::CreateParams::RadarOptions) } + attr_accessor :radar_options + # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(String) } + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + sig { returns(::Stripe::Charge::CreateParams::Shipping) } + attr_accessor :shipping + # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. + sig { returns(String) } + attr_accessor :source + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + sig { returns(::Stripe::Charge::CreateParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, application_fee: Integer, application_fee_amount: Integer, capture: T::Boolean, currency: String, customer: String, description: String, destination: ::Stripe::Charge::CreateParams::Destination, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), on_behalf_of: String, radar_options: ::Stripe::Charge::CreateParams::RadarOptions, receipt_email: String, shipping: ::Stripe::Charge::CreateParams::Shipping, source: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::Charge::CreateParams::TransferData, transfer_group: String).void + } + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + capture: nil, + currency: nil, + customer: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + on_behalf_of: nil, + radar_options: nil, + receipt_email: nil, + shipping: nil, + source: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class FraudDetails < Stripe::RequestParams + # Either `safe` or `fraudulent`. + sig { returns(T.nilable(String)) } + attr_accessor :user_report + sig { params(user_report: T.nilable(String)).void } + def initialize(user_report: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Delivery) } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::PickupAddress) } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::ReturnAddress) } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::Charge::UpdateParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Address) } + attr_accessor :address + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Affiliate) } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Delivery) } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { returns(T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Segment]) } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::Charge::UpdateParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Subscription::Affiliate) } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::Charge::UpdateParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::Charge::UpdateParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::Charge::UpdateParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::Charge::UpdateParams::PaymentDetails::CarRental, event_details: ::Stripe::Charge::UpdateParams::PaymentDetails::EventDetails, flight: ::Stripe::Charge::UpdateParams::PaymentDetails::Flight, lodging: ::Stripe::Charge::UpdateParams::PaymentDetails::Lodging, subscription: ::Stripe::Charge::UpdateParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::Charge::UpdateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::Charge::UpdateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + sig { returns(::Stripe::Charge::UpdateParams::FraudDetails) } + attr_accessor :fraud_details + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { returns(::Stripe::Charge::UpdateParams::PaymentDetails) } + attr_accessor :payment_details + # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + sig { returns(String) } + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + sig { returns(::Stripe::Charge::UpdateParams::Shipping) } + attr_accessor :shipping + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(customer: String, description: String, expand: T::Array[String], fraud_details: ::Stripe::Charge::UpdateParams::FraudDetails, metadata: T.nilable(T::Hash[String, String]), payment_details: ::Stripe::Charge::UpdateParams::PaymentDetails, receipt_email: String, shipping: ::Stripe::Charge::UpdateParams::Shipping, transfer_group: String).void + } + def initialize( + customer: nil, + description: nil, + expand: nil, + fraud_details: nil, + metadata: nil, + payment_details: nil, + receipt_email: nil, + shipping: nil, + transfer_group: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class CaptureParams < Stripe::RequestParams + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Delivery) } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::PickupAddress) } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::ReturnAddress) } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::Charge::CaptureParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Address) } + attr_accessor :address + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Affiliate) } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Delivery) } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::Charge::CaptureParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Subscription::Affiliate) } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::Charge::CaptureParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::Charge::CaptureParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::Charge::CaptureParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::Charge::CaptureParams::PaymentDetails::CarRental, event_details: ::Stripe::Charge::CaptureParams::PaymentDetails::EventDetails, flight: ::Stripe::Charge::CaptureParams::PaymentDetails::Flight, lodging: ::Stripe::Charge::CaptureParams::PaymentDetails::Lodging, subscription: ::Stripe::Charge::CaptureParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. + sig { returns(Integer) } + attr_accessor :amount + # An application fee to add on to this charge. + sig { returns(Integer) } + attr_accessor :application_fee + # An application fee amount to add on to this charge, which must be less than or equal to the original amount. + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Provides industry-specific information about the charge. + sig { returns(::Stripe::Charge::CaptureParams::PaymentDetails) } + attr_accessor :payment_details + # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + sig { returns(String) } + attr_accessor :receipt_email + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + sig { returns(::Stripe::Charge::CaptureParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, application_fee: Integer, application_fee_amount: Integer, expand: T::Array[String], payment_details: ::Stripe::Charge::CaptureParams::PaymentDetails, receipt_email: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::Charge::CaptureParams::TransferData, transfer_group: String).void + } + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + expand: nil, + payment_details: nil, + receipt_email: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. + # + # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. + # + # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture). + sig { + params(params: T.any(::Stripe::Charge::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def capture(params = {}, opts = {}); end + + # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. + # + # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. + # + # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture). + sig { + params(charge: String, params: T.any(::Stripe::Charge::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def self.capture(charge, params = {}, opts = {}); end + + # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) + # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge + # object used to request payment. + sig { + params(params: T.any(::Stripe::Charge::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. + sig { + params(params: T.any(::Stripe::Charge::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Charge::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/checkout/session.rbi b/rbi/stripe/resources/checkout/session.rbi index 0ba201b74..8c115f3d3 100644 --- a/rbi/stripe/resources/checkout/session.rbi +++ b/rbi/stripe/resources/checkout/session.rbi @@ -20,939 +20,3974 @@ module Stripe # Related guide: [Checkout quickstart](https://stripe.com/docs/checkout/quickstart) class Session < APIResource class AdaptivePricing < Stripe::StripeObject + # Whether Adaptive Pricing is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class AfterExpiration < Stripe::StripeObject class Recovery < Stripe::StripeObject + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` sig { returns(T::Boolean) } attr_reader :allow_promotion_codes + # If `true`, a recovery url will be generated to recover this Checkout Session if it + # expires before a transaction is completed. It will be attached to the + # Checkout Session object upon expiration. sig { returns(T::Boolean) } attr_reader :enabled + # The timestamp at which the recovery URL will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # URL that creates a new Checkout Session when clicked that is a copy of this expired Checkout Session sig { returns(T.nilable(String)) } attr_reader :url end + # When set, configuration used to recover the Checkout Session on expiry. sig { returns(T.nilable(Recovery)) } attr_reader :recovery end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Indicates whether automatic tax is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this session. sig { returns(T.nilable(String)) } attr_reader :status end class CollectedInformation < Stripe::StripeObject class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end + # Customer’s business name for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :business_name + # Customer’s email for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :email + # Customer’s phone number for this Checkout Session sig { returns(T.nilable(String)) } attr_reader :phone + # Shipping information for this Checkout Session. sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details + # Customer’s tax ids for this Checkout Session. sig { returns(T.nilable(T::Array[TaxId])) } attr_reader :tax_ids end class Consent < Stripe::StripeObject + # If `opt_in`, the customer consents to receiving promotional communications + # from the merchant about this Checkout Session. sig { returns(T.nilable(String)) } attr_reader :promotions + # If `accepted`, the customer in this Checkout Session has agreed to the merchant's terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. sig { returns(String) } attr_reader :position end + # If set to `hidden`, it will hide legal text related to the reuse of a payment method. sig { returns(T.nilable(PaymentMethodReuseAgreement)) } attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. sig { returns(T.nilable(String)) } attr_reader :promotions + # If set to `required`, it requires customers to accept the terms of service before being able to pay. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class CurrencyConversion < Stripe::StripeObject + # Total of all items in source currency before discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total of all items in source currency after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # Exchange rate used to convert source currency amounts to customer currency amounts sig { returns(String) } attr_reader :fx_rate + # Creation currency of the CheckoutSession before localization sig { returns(String) } attr_reader :source_currency end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject + # The label for the option, displayed to the customer. Up to 100 characters. sig { returns(String) } attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. sig { returns(String) } attr_reader :value end + # The value that will pre-fill on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value + # The options available for the customer to select. Up to 200 options allowed. sig { returns(T::Array[Option]) } attr_reader :options + # The option selected by the customer. This will be the `value` for the option. sig { returns(T.nilable(String)) } attr_reader :value end class Label < Stripe::StripeObject + # Custom text for the label, displayed to the customer. Up to 50 characters. sig { returns(T.nilable(String)) } attr_reader :custom + # The type of the label. sig { returns(String) } attr_reader :type end class Numeric < Stripe::StripeObject + # The value that will pre-fill the field on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length + # The value entered by the customer, containing only digits. sig { returns(T.nilable(String)) } attr_reader :value end class Text < Stripe::StripeObject + # The value that will pre-fill the field on the payment page. sig { returns(T.nilable(String)) } attr_reader :default_value + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length + # The value entered by the customer. sig { returns(T.nilable(String)) } attr_reader :value end + # Attribute for field dropdown sig { returns(Dropdown) } attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. sig { returns(String) } attr_reader :key + # Attribute for field label sig { returns(Label) } attr_reader :label + # Attribute for field numeric sig { returns(Numeric) } attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. sig { returns(T::Boolean) } attr_reader :optional + # Attribute for field text sig { returns(Text) } attr_reader :text + # The type of the field. sig { returns(String) } attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end + # Custom text that should be displayed after the payment confirmation button. sig { returns(T.nilable(AfterSubmit)) } attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. sig { returns(T.nilable(Submit)) } attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. sig { returns(T.nilable(TermsOfServiceAcceptance)) } attr_reader :terms_of_service_acceptance end class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end + # The customer's address after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. sig { returns(T.nilable(Address)) } attr_reader :address + # The email associated with the Customer, if one exists, on the Checkout Session after a completed Checkout Session or at time of session expiry. + # Otherwise, if the customer has consented to promotional content, this value is the most recent valid email provided by the customer on the Checkout form. sig { returns(T.nilable(String)) } attr_reader :email + # The customer's name after a completed Checkout Session. Note: This property is populated only for sessions on or after March 30, 2022. sig { returns(T.nilable(String)) } attr_reader :name + # The customer's phone number after a completed Checkout Session. sig { returns(T.nilable(String)) } attr_reader :phone + # The customer’s tax exempt status after a completed Checkout Session. sig { returns(T.nilable(String)) } attr_reader :tax_exempt + # The customer’s tax IDs after a completed Checkout Session. sig { returns(T.nilable(T::Array[TaxId])) } attr_reader :tax_ids end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display end + # The account tax IDs associated with the invoice. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Custom fields displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Footer displayed on the invoice. sig { returns(T.nilable(String)) } attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # Options for invoice PDF rendering. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end + # Indicates whether invoice creation is enabled for the Checkout Session. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field invoice_data sig { returns(InvoiceData) } attr_reader :invoice_data end class PaymentMethodConfigurationDetails < Stripe::StripeObject + # ID of the payment method configuration used. sig { returns(String) } attr_reader :id + # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Returned when the Session is in `setup` mode. sig { returns(T::Array[String]) } attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Currency supported by the bank account. Returned when the Session is in `setup` mode. sig { returns(String) } attr_reader :currency + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Affirm < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AmazonPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Indicates if installments are enabled sig { returns(T::Boolean) } attr_reader :enabled end + # Attribute for field installments sig { returns(Installments) } attr_reader :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. sig { returns(String) } attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. sig { returns(String) } attr_reader :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. sig { returns(String) } attr_reader :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(String) } attr_reader :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kanji end class Cashapp < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KakaoPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Oxxo < Stripe::StripeObject + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Pix < Stripe::StripeObject + # The number of seconds after which Pix payment will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_seconds end class RevolutPay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Swish < Stripe::StripeObject + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. sig { returns(T.nilable(String)) } attr_reader :reference end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class Permissions < Stripe::StripeObject class Update < Stripe::StripeObject + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. sig { returns(T.nilable(String)) } attr_reader :line_items + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. sig { returns(T.nilable(String)) } attr_reader :shipping_details end + # Permissions for updating the Checkout Session. sig { returns(T.nilable(Update)) } attr_reader :update end class PhoneNumberCollection < Stripe::StripeObject + # Indicates whether phone number collection is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled end class SavedPaymentMethodOptions < Stripe::StripeObject + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. sig { returns(T.nilable(T::Array[String])) } attr_reader :allow_redisplay_filters + # Enable customers to choose if they wish to remove their saved payment methods. Disabled by default. sig { returns(T.nilable(String)) } attr_reader :payment_method_remove + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. sig { returns(T.nilable(String)) } attr_reader :payment_method_save end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. sig { returns(T::Array[String]) } attr_reader :allowed_countries end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this order. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class ShippingOption < Stripe::StripeObject + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :shipping_amount + # The shipping rate. sig { returns(T.any(String, Stripe::ShippingRate)) } attr_reader :shipping_rate end class TaxIdCollection < Stripe::StripeObject + # Indicates whether tax ID collection is enabled for the session sig { returns(T::Boolean) } attr_reader :enabled + # Indicates whether a tax ID is required on the payment page sig { returns(String) } attr_reader :required end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - sig { returns(T.nilable(AdaptivePricing)) } # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + sig { returns(T.nilable(AdaptivePricing)) } attr_reader :adaptive_pricing - sig { returns(T.nilable(AfterExpiration)) } # When set, provides configuration for actions to take if this Checkout Session expires. + sig { returns(T.nilable(AfterExpiration)) } attr_reader :after_expiration - sig { returns(T.nilable(T::Boolean)) } # Enables user redeemable promotion codes. + sig { returns(T.nilable(T::Boolean)) } attr_reader :allow_promotion_codes - sig { returns(T.nilable(Integer)) } # Total of all items before discounts or taxes are applied. - attr_reader :amount_subtotal sig { returns(T.nilable(Integer)) } + attr_reader :amount_subtotal # Total of all items after discounts and taxes are applied. + sig { returns(T.nilable(Integer)) } attr_reader :amount_total - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(String)) } # Describes whether Checkout should collect the customer's billing address. Defaults to `auto`. - attr_reader :billing_address_collection sig { returns(T.nilable(String)) } + attr_reader :billing_address_collection # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. - attr_reader :cancel_url sig { returns(T.nilable(String)) } + attr_reader :cancel_url # A unique string to reference the Checkout Session. This can be a # customer ID, a cart ID, or similar, and can be used to reconcile the # Session with your internal systems. - attr_reader :client_reference_id sig { returns(T.nilable(String)) } + attr_reader :client_reference_id # The client secret of the Session. Use this with [initCheckout](https://stripe.com/docs/js/custom_checkout/init) on your front end. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(T.nilable(CollectedInformation)) } # Information about the customer collected within the Checkout Session. + sig { returns(T.nilable(CollectedInformation)) } attr_reader :collected_information - sig { returns(T.nilable(Consent)) } # Results of `consent_collection` for this session. + sig { returns(T.nilable(Consent)) } attr_reader :consent - sig { returns(T.nilable(ConsentCollection)) } # When set, provides configuration for the Checkout Session to gather active consent from customers. + sig { returns(T.nilable(ConsentCollection)) } attr_reader :consent_collection - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T.nilable(CurrencyConversion)) } # Currency conversion details for [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing) sessions + sig { returns(T.nilable(CurrencyConversion)) } attr_reader :currency_conversion - sig { returns(T::Array[CustomField]) } # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[CustomField]) } attr_reader :custom_fields - sig { returns(CustomText) } # Attribute for field custom_text + sig { returns(CustomText) } attr_reader :custom_text - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The ID of the customer for this Session. # For Checkout Sessions in `subscription` mode or Checkout Sessions with `customer_creation` set as `always` in `payment` mode, Checkout # will create a new customer object based on information provided # during the payment flow unless an existing customer was provided when # the Session was created. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } # Configure whether a Checkout Session creates a Customer when the Checkout Session completes. + sig { returns(T.nilable(String)) } attr_reader :customer_creation - sig { returns(T.nilable(CustomerDetails)) } # The customer details including the customer's tax exempt status and the customer's tax IDs. Customer's address details are not present on Sessions in `setup` mode. + sig { returns(T.nilable(CustomerDetails)) } attr_reader :customer_details - sig { returns(T.nilable(String)) } # If provided, this value will be used when the Customer object is created. # If not provided, customers will be asked to enter their email address. # Use this parameter to prefill customer data if you already have an email # on file. To access information about the customer once the payment flow is # complete, use the `customer` attribute. + sig { returns(T.nilable(String)) } attr_reader :customer_email - sig { returns(Integer) } # The timestamp at which the Checkout Session will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # ID of the invoice created by the Checkout Session, if it exists. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T.nilable(InvoiceCreation)) } # Details on the state of invoice creation for the Checkout Session. + sig { returns(T.nilable(InvoiceCreation)) } attr_reader :invoice_creation - sig { returns(Stripe::ListObject) } # The line items purchased by the customer. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + sig { returns(T.nilable(String)) } attr_reader :locale - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # The mode of the Checkout Session. - attr_reader :mode sig { returns(String) } + attr_reader :mode # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } # The ID of the PaymentIntent for Checkout Sessions in `payment` mode. You can't confirm or cancel the PaymentIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) } # The ID of the Payment Link that created this Session. + sig { returns(T.nilable(T.any(String, Stripe::PaymentLink))) } attr_reader :payment_link - sig { returns(T.nilable(String)) } # Configure whether a Checkout Session should collect a payment method. Defaults to `always`. + sig { returns(T.nilable(String)) } attr_reader :payment_method_collection - sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } # Information about the payment method configuration used for this Checkout session if using dynamic payment methods. + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } attr_reader :payment_method_configuration_details - sig { returns(T.nilable(PaymentMethodOptions)) } # Payment-method-specific configuration for the PaymentIntent or SetupIntent of this CheckoutSession. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T::Array[String]) } # A list of the types of payment methods (e.g. card) this Checkout # Session is allowed to accept. + sig { returns(T::Array[String]) } attr_reader :payment_method_types - sig { returns(String) } # The payment status of the Checkout Session, one of `paid`, `unpaid`, or `no_payment_required`. # You can use this value to decide when to fulfill your customer's order. + sig { returns(String) } attr_reader :payment_status - sig { returns(T.nilable(Permissions)) } # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. # # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + sig { returns(T.nilable(Permissions)) } attr_reader :permissions - sig { returns(PhoneNumberCollection) } # Attribute for field phone_number_collection + sig { returns(PhoneNumberCollection) } attr_reader :phone_number_collection - sig { returns(T.nilable(String)) } # The ID of the original expired Checkout Session that triggered the recovery flow. + sig { returns(T.nilable(String)) } attr_reader :recovered_from - sig { returns(String) } # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. - attr_reader :redirect_on_completion sig { returns(String) } + attr_reader :redirect_on_completion # Applies to Checkout Sessions with `ui_mode: embedded` or `ui_mode: custom`. The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + sig { returns(String) } attr_reader :return_url - sig { returns(T.nilable(SavedPaymentMethodOptions)) } # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + sig { returns(T.nilable(SavedPaymentMethodOptions)) } attr_reader :saved_payment_method_options - sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } # The ID of the SetupIntent for Checkout Sessions in `setup` mode. You can't confirm or cancel the SetupIntent for a Checkout Session. To cancel, [expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } attr_reader :setup_intent - sig { returns(T.nilable(ShippingAddressCollection)) } # When set, provides configuration for Checkout to collect a shipping address from a customer. + sig { returns(T.nilable(ShippingAddressCollection)) } attr_reader :shipping_address_collection - sig { returns(T.nilable(ShippingCost)) } # The details of the customer cost of shipping, including the customer chosen ShippingRate. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } # Shipping information for this Checkout Session. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(T::Array[ShippingOption]) } # The shipping rate options applied to this Session. + sig { returns(T::Array[ShippingOption]) } attr_reader :shipping_options - sig { returns(T.nilable(String)) } # The status of the Checkout Session, one of `open`, `complete`, or `expired`. - attr_reader :status sig { returns(T.nilable(String)) } + attr_reader :status # Describes the type of transaction being performed by Checkout in order to customize # relevant text on the page, such as the submit button. `submit_type` can only be # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + sig { returns(T.nilable(String)) } attr_reader :submit_type - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # The ID of the subscription for Checkout Sessions in `subscription` mode. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(String)) } # The URL the customer will be directed to after the payment or # subscription creation is successful. + sig { returns(T.nilable(String)) } attr_reader :success_url - sig { returns(TaxIdCollection) } # Attribute for field tax_id_collection + sig { returns(TaxIdCollection) } attr_reader :tax_id_collection - sig { returns(T.nilable(TotalDetails)) } # Tax and discount details for the computed total amount. + sig { returns(T.nilable(TotalDetails)) } attr_reader :total_details - sig { returns(T.nilable(String)) } # The UI mode of the Session. Defaults to `hosted`. - attr_reader :ui_mode sig { returns(T.nilable(String)) } + attr_reader :ui_mode # The URL to the Checkout Session. Redirect customers to this URL to take them to Checkout. If you’re using [Custom Domains](https://stripe.com/docs/payments/checkout/custom-domains), the URL will use your subdomain. Otherwise, it’ll use `checkout.stripe.com.` # This value is only present when the session is active. + sig { returns(T.nilable(String)) } attr_reader :url + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CustomerDetails < Stripe::RequestParams + # Customer's email address. + sig { returns(String) } + attr_accessor :email + sig { params(email: String).void } + def initialize(email: nil); end + end + # Only return Checkout Sessions that were created during the given date interval. + sig { returns(T.any(::Stripe::Checkout::Session::ListParams::Created, Integer)) } + attr_accessor :created + # Only return the Checkout Sessions for the Customer specified. + sig { returns(String) } + attr_accessor :customer + # Only return the Checkout Sessions for the Customer details specified. + sig { returns(::Stripe::Checkout::Session::ListParams::CustomerDetails) } + attr_accessor :customer_details + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return the Checkout Session for the PaymentIntent specified. + sig { returns(String) } + attr_accessor :payment_intent + # Only return the Checkout Sessions for the Payment Link specified. + sig { returns(String) } + attr_accessor :payment_link + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return the Checkout Sessions matching the given status. + sig { returns(String) } + attr_accessor :status + # Only return the Checkout Session for the subscription specified. + sig { returns(String) } + attr_accessor :subscription + sig { + params(created: T.any(::Stripe::Checkout::Session::ListParams::Created, Integer), customer: String, customer_details: ::Stripe::Checkout::Session::ListParams::CustomerDetails, ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, payment_link: String, starting_after: String, status: String, subscription: String).void + } + def initialize( + created: nil, + customer: nil, + customer_details: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + payment_link: nil, + starting_after: nil, + status: nil, + subscription: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AdaptivePricing < Stripe::RequestParams + # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class AfterExpiration < Stripe::RequestParams + class Recovery < Stripe::RequestParams + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # If `true`, a recovery URL will be generated to recover this Checkout Session if it + # expires before a successful transaction is completed. It will be attached to the + # Checkout Session object upon expiration. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allow_promotion_codes: T::Boolean, enabled: T::Boolean).void } + def initialize(allow_promotion_codes: nil, enabled: nil); end + end + # Configure a Checkout Session that can be used to recover an expired session. + sig { returns(::Stripe::Checkout::Session::CreateParams::AfterExpiration::Recovery) } + attr_accessor :recovery + sig { + params(recovery: ::Stripe::Checkout::Session::CreateParams::AfterExpiration::Recovery).void + } + def initialize(recovery: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Checkout::Session::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Checkout::Session::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + sig { returns(String) } + attr_accessor :position + sig { params(position: String).void } + def initialize(position: nil); end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + sig { + returns(::Stripe::Checkout::Session::CreateParams::ConsentCollection::PaymentMethodReuseAgreement) + } + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + sig { returns(String) } + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + sig { returns(String) } + attr_accessor :terms_of_service + sig { + params(payment_method_reuse_agreement: ::Stripe::Checkout::Session::CreateParams::ConsentCollection::PaymentMethodReuseAgreement, promotions: String, terms_of_service: String).void + } + def initialize( + payment_method_reuse_agreement: nil, + promotions: nil, + terms_of_service: nil + ); end + end + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + sig { returns(String) } + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + sig { returns(String) } + attr_accessor :value + sig { params(label: String, value: String).void } + def initialize(label: nil, value: nil); end + end + # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + sig { returns(String) } + attr_accessor :default_value + # The options available for the customer to select. Up to 200 options allowed. + sig { + returns(T::Array[::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown::Option]) + } + attr_accessor :options + sig { + params(default_value: String, options: T::Array[::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown::Option]).void + } + def initialize(default_value: nil, options: nil); end + end + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + sig { returns(String) } + attr_accessor :custom + # The type of the label. + sig { returns(String) } + attr_accessor :type + sig { params(custom: String, type: String).void } + def initialize(custom: nil, type: nil); end + end + class Numeric < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + sig { returns(String) } + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { + params(default_value: String, maximum_length: Integer, minimum_length: Integer).void + } + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end + end + class Text < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + sig { returns(String) } + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { + params(default_value: String, maximum_length: Integer, minimum_length: Integer).void + } + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end + end + # Configuration for `type=dropdown` fields. + sig { returns(::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown) } + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + sig { returns(String) } + attr_accessor :key + # The label for the field, displayed to the customer. + sig { returns(::Stripe::Checkout::Session::CreateParams::CustomField::Label) } + attr_accessor :label + # Configuration for `type=numeric` fields. + sig { returns(::Stripe::Checkout::Session::CreateParams::CustomField::Numeric) } + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :optional + # Configuration for `type=text` fields. + sig { returns(::Stripe::Checkout::Session::CreateParams::CustomField::Text) } + attr_accessor :text + # The type of the field. + sig { returns(String) } + attr_accessor :type + sig { + params(dropdown: ::Stripe::Checkout::Session::CreateParams::CustomField::Dropdown, key: String, label: ::Stripe::Checkout::Session::CreateParams::CustomField::Label, numeric: ::Stripe::Checkout::Session::CreateParams::CustomField::Numeric, optional: T::Boolean, text: ::Stripe::Checkout::Session::CreateParams::CustomField::Text, type: String).void + } + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ); end + end + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + # Custom text that should be displayed after the payment confirmation button. + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::AfterSubmit)) + } + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::ShippingAddress)) + } + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + sig { returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::Submit)) } + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::TermsOfServiceAcceptance)) + } + attr_accessor :terms_of_service_acceptance + sig { + params(after_submit: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::AfterSubmit), shipping_address: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::ShippingAddress), submit: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::Submit), terms_of_service_acceptance: T.nilable(::Stripe::Checkout::Session::CreateParams::CustomText::TermsOfServiceAcceptance)).void + } + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ); end + end + class CustomerUpdate < Stripe::RequestParams + # Describes whether Checkout saves the billing address onto `customer.address`. + # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. + sig { returns(String) } + attr_accessor :address + # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + sig { returns(String) } + attr_accessor :name + # Describes whether Checkout saves shipping information onto `customer.shipping`. + # To collect shipping information, use `shipping_address_collection`. Defaults to `never`. + sig { returns(String) } + attr_accessor :shipping + sig { params(address: String, name: String, shipping: String).void } + def initialize(address: nil, name: nil, shipping: nil); end + end + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this Session. + sig { returns(String) } + attr_accessor :coupon + # The ID of a promotion code to apply to this Session. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, promotion_code: String).void } + def initialize(coupon: nil, promotion_code: nil); end + end + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + sig { params(amount_tax_display: T.nilable(String)).void } + def initialize(amount_tax_display: nil); end + end + # The account tax IDs associated with the invoice. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + sig { + returns(T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::CustomField])) + } + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::Issuer) + } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(account_tax_ids: T.nilable(T::Array[String]), custom_fields: T.nilable(T::Array[::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::CustomField]), description: String, footer: String, issuer: ::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::Issuer, metadata: T::Hash[String, String], rendering_options: T.nilable(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)).void + } + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ); end + end + # Set to `true` to enable invoice creation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Parameters passed when creating invoices for payment-mode Checkout Sessions. + sig { returns(::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData) } + attr_accessor :invoice_data + sig { + params(enabled: T::Boolean, invoice_data: ::Stripe::Checkout::Session::CreateParams::InvoiceCreation::InvoiceData).void + } + def initialize(enabled: nil, invoice_data: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative integer. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { + returns(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::ProductData) + } + attr_accessor :product_data + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::ProductData, recurring: ::Stripe::Checkout::Session::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + sig { returns(::Stripe::Checkout::Session::CreateParams::LineItem::AdjustableQuantity) } + attr_accessor :adjustable_quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. + sig { returns(T::Array[String]) } + attr_accessor :dynamic_tax_rates + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Checkout::Session::CreateParams::LineItem::PriceData) } + attr_accessor :price_data + # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + sig { returns(Integer) } + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + sig { + params(adjustable_quantity: ::Stripe::Checkout::Session::CreateParams::LineItem::AdjustableQuantity, dynamic_tax_rates: T::Array[String], metadata: T::Hash[String, String], price: String, price_data: ::Stripe::Checkout::Session::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T::Array[String]).void + } + def initialize( + adjustable_quantity: nil, + dynamic_tax_rates: nil, + metadata: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class PaymentIntentData < Stripe::RequestParams + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping::Address) + } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize( + address: nil, + carrier: nil, + name: nil, + phone: nil, + tracking_number: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. For details, + # see the PaymentIntents [use case for connected + # accounts](/docs/payments/connected-accounts). + sig { returns(String) } + attr_accessor :on_behalf_of + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(String) } + attr_accessor :receipt_email + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment + # method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the + # customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the + # customer that their payment details will be saved and used for future + # payments. + # + # If a Customer has been provided or Checkout creates a new Customer, + # Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached + # to a Customer. To reuse the payment method, you can retrieve it from the + # Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` + # to dynamically optimize your payment flow and comply with regional + # legislation and network rules, such as SCA. + sig { returns(String) } + attr_accessor :setup_future_usage + # Shipping information for this payment. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping) } + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # The parameters used to automatically create a Transfer when the payment succeeds. + # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentIntentData::TransferData) + } + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(application_fee_amount: Integer, capture_method: String, description: String, metadata: T::Hash[String, String], on_behalf_of: String, receipt_email: String, setup_future_usage: String, shipping: ::Stripe::Checkout::Session::CreateParams::PaymentIntentData::Shipping, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::Checkout::Session::CreateParams::PaymentIntentData::TransferData, transfer_group: String).void + } + def initialize( + application_fee_amount: nil, + capture_method: nil, + description: nil, + metadata: nil, + on_behalf_of: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. + sig { returns(String) } + attr_accessor :allow_redisplay + sig { params(allow_redisplay: String).void } + def initialize(allow_redisplay: nil); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). This is only accepted for Checkout Sessions in `setup` mode. + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: String, verification_method: String).void + } + def initialize( + currency: nil, + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class AmazonPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: String).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + # Setting to true enables installments for this Checkout Session. + # Setting to false will prevent any installment plan from applying to a payment. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # Installment options for card payments + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix_kanji + sig { + params(installments: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card::Installments, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_three_d_secure: String, setup_future_usage: String, statement_descriptor_suffix_kana: String, statement_descriptor_suffix_kanji: String).void + } + def initialize( + installments: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_three_d_secure: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + sig { params(capture_method: String).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: String).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + sig { params(expires_after_seconds: Integer).void } + def initialize(expires_after_seconds: nil); end + end + class RevolutPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + sig { params(capture_method: String).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: String).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + sig { returns(String) } + attr_accessor :reference + sig { params(reference: String).void } + def initialize(reference: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { params(permissions: T::Array[String], prefetch: T::Array[String]).void } + def initialize(permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, setup_future_usage: String, verification_method: String).void + } + def initialize( + financial_connections: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + # contains details about the ACSS Debit payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit) + } + attr_accessor :acss_debit + # contains details about the Affirm payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Affirm) } + attr_accessor :affirm + # contains details about the Afterpay Clearpay payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # contains details about the Alipay payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Alipay) } + attr_accessor :alipay + # contains details about the AmazonPay payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AmazonPay) + } + attr_accessor :amazon_pay + # contains details about the AU Becs Debit payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AuBecsDebit) + } + attr_accessor :au_becs_debit + # contains details about the Bacs Debit payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit) + } + attr_accessor :bacs_debit + # contains details about the Bancontact payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Bancontact) + } + attr_accessor :bancontact + # contains details about the Boleto payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Boleto) } + attr_accessor :boleto + # contains details about the Card payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card) } + attr_accessor :card + # contains details about the Cashapp Pay payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Cashapp) } + attr_accessor :cashapp + # contains details about the Customer Balance payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance) + } + attr_accessor :customer_balance + # contains details about the EPS payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Eps) } + attr_accessor :eps + # contains details about the FPX payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Fpx) } + attr_accessor :fpx + # contains details about the Giropay payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Giropay) } + attr_accessor :giropay + # contains details about the Grabpay payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Grabpay) } + attr_accessor :grabpay + # contains details about the Ideal payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Ideal) } + attr_accessor :ideal + # contains details about the Kakao Pay payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KakaoPay) } + attr_accessor :kakao_pay + # contains details about the Klarna payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna) } + attr_accessor :klarna + # contains details about the Konbini payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Konbini) } + attr_accessor :konbini + # contains details about the Korean card payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KrCard) } + attr_accessor :kr_card + # contains details about the Link payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Link) } + attr_accessor :link + # contains details about the Mobilepay payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Mobilepay) + } + attr_accessor :mobilepay + # contains details about the Multibanco payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Multibanco) + } + attr_accessor :multibanco + # contains details about the Naver Pay payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::NaverPay) } + attr_accessor :naver_pay + # contains details about the OXXO payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Oxxo) } + attr_accessor :oxxo + # contains details about the P24 payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::P24) } + attr_accessor :p24 + # contains details about the PAYCO payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payco) } + attr_accessor :payco + # contains details about the PayNow payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paynow) } + attr_accessor :paynow + # contains details about the PayPal payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # contains details about the PayTo payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # contains details about the Pix payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Pix) } + attr_accessor :pix + # contains details about the RevolutPay payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::RevolutPay) + } + attr_accessor :revolut_pay + # contains details about the Samsung Pay payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SamsungPay) + } + attr_accessor :samsung_pay + # contains details about the Sepa Debit payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit) + } + attr_accessor :sepa_debit + # contains details about the Sofort payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Sofort) } + attr_accessor :sofort + # contains details about the Swish payment method options. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Swish) } + attr_accessor :swish + # contains details about the Us Bank Account payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount) + } + attr_accessor :us_bank_account + # contains details about the WeChat Pay payment method options. + sig { + returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::WechatPay) + } + attr_accessor :wechat_pay + sig { + params(acss_debit: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AcssDebit, affirm: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Affirm, afterpay_clearpay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AfterpayClearpay, alipay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Alipay, amazon_pay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AmazonPay, au_becs_debit: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::AuBecsDebit, bacs_debit: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::BacsDebit, bancontact: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Bancontact, boleto: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Boleto, card: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Card, cashapp: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Cashapp, customer_balance: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::CustomerBalance, eps: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Eps, fpx: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Fpx, giropay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Giropay, grabpay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Grabpay, ideal: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Ideal, kakao_pay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KakaoPay, klarna: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Klarna, konbini: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Konbini, kr_card: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::KrCard, link: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Link, mobilepay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Mobilepay, multibanco: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Multibanco, naver_pay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::NaverPay, oxxo: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Oxxo, p24: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::P24, payco: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payco, paynow: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paynow, paypal: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Paypal, payto: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Payto, pix: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Pix, revolut_pay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::RevolutPay, samsung_pay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SamsungPay, sepa_debit: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::SepaDebit, sofort: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Sofort, swish: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::Swish, us_bank_account: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::UsBankAccount, wechat_pay: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions::WechatPay).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + grabpay: nil, + ideal: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + sofort: nil, + swish: nil, + us_bank_account: nil, + wechat_pay: nil + ); end + end + class Permissions < Stripe::RequestParams + class Update < Stripe::RequestParams + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + sig { returns(String) } + attr_accessor :line_items + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + sig { returns(String) } + attr_accessor :shipping_details + sig { params(line_items: String, shipping_details: String).void } + def initialize(line_items: nil, shipping_details: nil); end + end + # Permissions for updating the Checkout Session. + sig { returns(::Stripe::Checkout::Session::CreateParams::Permissions::Update) } + attr_accessor :update + sig { + params(update: ::Stripe::Checkout::Session::CreateParams::Permissions::Update).void + } + def initialize(update: nil); end + end + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class SavedPaymentMethodOptions < Stripe::RequestParams + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + sig { returns(T::Array[String]) } + attr_accessor :allow_redisplay_filters + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + sig { returns(String) } + attr_accessor :payment_method_save + sig { + params(allow_redisplay_filters: T::Array[String], payment_method_save: String).void + } + def initialize(allow_redisplay_filters: nil, payment_method_save: nil); end + end + class SetupIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Stripe account for which the setup is intended. + sig { returns(String) } + attr_accessor :on_behalf_of + sig { + params(description: String, metadata: T::Hash[String, String], on_behalf_of: String).void + } + def initialize(description: nil, metadata: nil, on_behalf_of: nil); end + end + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + sig { returns(T::Array[String]) } + attr_accessor :allowed_countries + sig { params(allowed_countries: T::Array[String]).void } + def initialize(allowed_countries: nil); end + end + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the Shipping Rate to use for this shipping option. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + sig { + returns(::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData) + } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Checkout::Session::CreateParams::ShippingOption::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(issuer: ::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings::Issuer).void + } + def initialize(issuer: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { + returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # A future timestamp to anchor the subscription's billing cycle for new subscriptions. + sig { returns(Integer) } + attr_accessor :billing_cycle_anchor + # The tax rates that will apply to any subscription item that does not have + # `tax_rates` set. Invoices created will have their `default_tax_rates` populated + # from the subscription. + sig { returns(T::Array[String]) } + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. + # Use this field to optionally store an explanation of the subscription + # for rendering in the [customer portal](https://stripe.com/docs/customer-management). + sig { returns(String) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings) + } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + sig { returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData) } + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer + # will get before being charged for the first time. Has to be at least + # 48 hours in the future. + sig { returns(Integer) } + attr_accessor :trial_end + # Integer representing the number of trial period days before the + # customer is charged for the first time. Has to be at least 1. + sig { returns(Integer) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { + returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(application_fee_percent: Float, billing_cycle_anchor: Integer, default_tax_rates: T::Array[String], description: String, invoice_settings: ::Stripe::Checkout::Session::CreateParams::SubscriptionData::InvoiceSettings, metadata: T::Hash[String, String], on_behalf_of: String, proration_behavior: String, transfer_data: ::Stripe::Checkout::Session::CreateParams::SubscriptionData::TransferData, trial_end: Integer, trial_period_days: Integer, trial_settings: ::Stripe::Checkout::Session::CreateParams::SubscriptionData::TrialSettings).void + } + def initialize( + application_fee_percent: nil, + billing_cycle_anchor: nil, + default_tax_rates: nil, + description: nil, + invoice_settings: nil, + metadata: nil, + on_behalf_of: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + sig { returns(String) } + attr_accessor :required + sig { params(enabled: T::Boolean, required: String).void } + def initialize(enabled: nil, required: nil); end + end + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + sig { returns(::Stripe::Checkout::Session::CreateParams::AdaptivePricing) } + attr_accessor :adaptive_pricing + # Configure actions after a Checkout Session has expired. + sig { returns(::Stripe::Checkout::Session::CreateParams::AfterExpiration) } + attr_accessor :after_expiration + # Enables user redeemable promotion codes. + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + sig { returns(::Stripe::Checkout::Session::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. + sig { returns(String) } + attr_accessor :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. + sig { returns(String) } + attr_accessor :cancel_url + # A unique string to reference the Checkout Session. This can be a + # customer ID, a cart ID, or similar, and can be used to reconcile the + # session with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Configure fields for the Checkout Session to gather active consent from customers. + sig { returns(::Stripe::Checkout::Session::CreateParams::ConsentCollection) } + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Required in `setup` mode when `payment_method_types` is not set. + sig { returns(String) } + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[::Stripe::Checkout::Session::CreateParams::CustomField]) } + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + sig { returns(::Stripe::Checkout::Session::CreateParams::CustomText) } + attr_accessor :custom_text + # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card + # payment method will be used to prefill the email, name, card details, and billing address + # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + # + # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + # + # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. + # + # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + sig { returns(String) } + attr_accessor :customer + # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + # + # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + # + # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) + # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + # + # Can only be set in `payment` and `setup` mode. + sig { returns(String) } + attr_accessor :customer_creation + # If provided, this value will be used when the Customer object is created. + # If not provided, customers will be asked to enter their email address. + # Use this parameter to prefill customer data if you already have an email + # on file. To access information about the customer once a session is + # complete, use the `customer` field. + sig { returns(String) } + attr_accessor :customer_email + # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + sig { returns(::Stripe::Checkout::Session::CreateParams::CustomerUpdate) } + attr_accessor :customer_update + # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + sig { returns(T::Array[::Stripe::Checkout::Session::CreateParams::Discount]) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + sig { returns(Integer) } + attr_accessor :expires_at + # Generate a post-purchase Invoice for one-time payments. + sig { returns(::Stripe::Checkout::Session::CreateParams::InvoiceCreation) } + attr_accessor :invoice_creation + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # + # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + # + # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + sig { returns(T::Array[::Stripe::Checkout::Session::CreateParams::LineItem]) } + attr_accessor :line_items + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + sig { returns(String) } + attr_accessor :locale + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + sig { returns(String) } + attr_accessor :mode + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentIntentData) } + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + # This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + sig { returns(String) } + attr_accessor :payment_method_collection + # The ID of the payment method configuration to use with this Checkout session. + sig { returns(String) } + attr_accessor :payment_method_configuration + # This parameter allows you to set some attributes on the payment method created during a Checkout session. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment-method-specific configuration. + sig { returns(::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + # + # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. + # + # Read more about the supported payment methods and their requirements in our [payment + # method details guide](/docs/payments/checkout/payment-methods). + # + # If multiple payment methods are passed, Checkout will dynamically reorder them to + # prioritize the most relevant payment methods based on the customer's location and + # other characteristics. + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + # + # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + sig { returns(::Stripe::Checkout::Session::CreateParams::Permissions) } + attr_accessor :permissions + # Controls phone number collection settings for the session. + # + # We recommend that you review your privacy policy and check with your legal contacts + # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + sig { returns(::Stripe::Checkout::Session::CreateParams::PhoneNumberCollection) } + attr_accessor :phone_number_collection + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + sig { returns(String) } + attr_accessor :redirect_on_completion + # The URL to redirect your customer back to after they authenticate or cancel their payment on the + # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` + # and redirect-based payment methods are enabled on the session. + sig { returns(String) } + attr_accessor :return_url + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + sig { returns(::Stripe::Checkout::Session::CreateParams::SavedPaymentMethodOptions) } + attr_accessor :saved_payment_method_options + # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + sig { returns(::Stripe::Checkout::Session::CreateParams::SetupIntentData) } + attr_accessor :setup_intent_data + # When set, provides configuration for Checkout to collect a shipping address from a customer. + sig { returns(::Stripe::Checkout::Session::CreateParams::ShippingAddressCollection) } + attr_accessor :shipping_address_collection + # The shipping rate options to apply to this Session. Up to a maximum of 5. + sig { returns(T::Array[::Stripe::Checkout::Session::CreateParams::ShippingOption]) } + attr_accessor :shipping_options + # Describes the type of transaction being performed by Checkout in order to customize + # relevant text on the page, such as the submit button. `submit_type` can only be + # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + sig { returns(String) } + attr_accessor :submit_type + # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + sig { returns(::Stripe::Checkout::Session::CreateParams::SubscriptionData) } + attr_accessor :subscription_data + # The URL to which Stripe should send customers when payment or setup + # is complete. + # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use + # information from the successful Checkout Session on your page, read the + # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + sig { returns(String) } + attr_accessor :success_url + # Controls tax ID collection during checkout. + sig { returns(::Stripe::Checkout::Session::CreateParams::TaxIdCollection) } + attr_accessor :tax_id_collection + # The UI mode of the Session. Defaults to `hosted`. + sig { returns(String) } + attr_accessor :ui_mode + sig { + params(adaptive_pricing: ::Stripe::Checkout::Session::CreateParams::AdaptivePricing, after_expiration: ::Stripe::Checkout::Session::CreateParams::AfterExpiration, allow_promotion_codes: T::Boolean, automatic_tax: ::Stripe::Checkout::Session::CreateParams::AutomaticTax, billing_address_collection: String, cancel_url: String, client_reference_id: String, consent_collection: ::Stripe::Checkout::Session::CreateParams::ConsentCollection, currency: String, custom_fields: T::Array[::Stripe::Checkout::Session::CreateParams::CustomField], custom_text: ::Stripe::Checkout::Session::CreateParams::CustomText, customer: String, customer_creation: String, customer_email: String, customer_update: ::Stripe::Checkout::Session::CreateParams::CustomerUpdate, discounts: T::Array[::Stripe::Checkout::Session::CreateParams::Discount], expand: T::Array[String], expires_at: Integer, invoice_creation: ::Stripe::Checkout::Session::CreateParams::InvoiceCreation, line_items: T::Array[::Stripe::Checkout::Session::CreateParams::LineItem], locale: String, metadata: T::Hash[String, String], mode: String, payment_intent_data: ::Stripe::Checkout::Session::CreateParams::PaymentIntentData, payment_method_collection: String, payment_method_configuration: String, payment_method_data: ::Stripe::Checkout::Session::CreateParams::PaymentMethodData, payment_method_options: ::Stripe::Checkout::Session::CreateParams::PaymentMethodOptions, payment_method_types: T::Array[String], permissions: ::Stripe::Checkout::Session::CreateParams::Permissions, phone_number_collection: ::Stripe::Checkout::Session::CreateParams::PhoneNumberCollection, redirect_on_completion: String, return_url: String, saved_payment_method_options: ::Stripe::Checkout::Session::CreateParams::SavedPaymentMethodOptions, setup_intent_data: ::Stripe::Checkout::Session::CreateParams::SetupIntentData, shipping_address_collection: ::Stripe::Checkout::Session::CreateParams::ShippingAddressCollection, shipping_options: T::Array[::Stripe::Checkout::Session::CreateParams::ShippingOption], submit_type: String, subscription_data: ::Stripe::Checkout::Session::CreateParams::SubscriptionData, success_url: String, tax_id_collection: ::Stripe::Checkout::Session::CreateParams::TaxIdCollection, ui_mode: String).void + } + def initialize( + adaptive_pricing: nil, + after_expiration: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + cancel_url: nil, + client_reference_id: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer: nil, + customer_creation: nil, + customer_email: nil, + customer_update: nil, + discounts: nil, + expand: nil, + expires_at: nil, + invoice_creation: nil, + line_items: nil, + locale: nil, + metadata: nil, + mode: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + permissions: nil, + phone_number_collection: nil, + redirect_on_completion: nil, + return_url: nil, + saved_payment_method_options: nil, + setup_intent_data: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + success_url: nil, + tax_id_collection: nil, + ui_mode: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CollectedInformation < Stripe::RequestParams + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The address of the customer + sig { + returns(::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails::Address) + } + attr_accessor :address + # The name of customer + sig { returns(String) } + attr_accessor :name + sig { + params(address: ::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails::Address, name: String).void + } + def initialize(address: nil, name: nil); end + end + # The shipping details to apply to this Session. + sig { + returns(::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails) + } + attr_accessor :shipping_details + sig { + params(shipping_details: ::Stripe::Checkout::Session::UpdateParams::CollectedInformation::ShippingDetails).void + } + def initialize(shipping_details: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + sig { returns(::Stripe::Checkout::Session::UpdateParams::LineItem::AdjustableQuantity) } + attr_accessor :adjustable_quantity + # ID of an existing line item. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices). + sig { returns(String) } + attr_accessor :price + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(adjustable_quantity: ::Stripe::Checkout::Session::UpdateParams::LineItem::AdjustableQuantity, id: String, metadata: T.nilable(T::Hash[String, String]), price: String, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + adjustable_quantity: nil, + id: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil + ); end + end + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the Shipping Rate to use for this shipping option. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + sig { + returns(::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData) + } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Checkout::Session::UpdateParams::ShippingOption::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + # Information about the customer collected within the Checkout Session. + sig { returns(::Stripe::Checkout::Session::UpdateParams::CollectedInformation) } + attr_accessor :collected_information + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A list of items the customer is purchasing. + # + # When updating line items, you must retransmit the entire array of line items. + # + # To retain an existing line item, specify its `id`. + # + # To update an existing line item, specify its `id` along with the new values of the fields to update. + # + # To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices. + # + # To remove an existing line item, omit the line item's ID from the retransmitted array. + # + # To reorder a line item, specify it at the desired position in the retransmitted array. + sig { returns(T::Array[::Stripe::Checkout::Session::UpdateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The shipping rate options to apply to this Session. Up to a maximum of 5. + sig { + returns(T.nilable(T::Array[::Stripe::Checkout::Session::UpdateParams::ShippingOption])) + } + attr_accessor :shipping_options + sig { + params(collected_information: ::Stripe::Checkout::Session::UpdateParams::CollectedInformation, expand: T::Array[String], line_items: T::Array[::Stripe::Checkout::Session::UpdateParams::LineItem], metadata: T.nilable(T::Hash[String, String]), shipping_options: T.nilable(T::Array[::Stripe::Checkout::Session::UpdateParams::ShippingOption])).void + } + def initialize( + collected_information: nil, + expand: nil, + line_items: nil, + metadata: nil, + shipping_options: nil + ); end + end + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a Session object. + sig { + params(params: T.any(::Stripe::Checkout::Session::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def self.create(params = {}, opts = {}); end + + # A Session can be expired when it is in one of these statuses: open + # + # After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired. + sig { + params(params: T.any(::Stripe::Checkout::Session::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def expire(params = {}, opts = {}); end + + # A Session can be expired when it is in one of these statuses: open + # + # After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired. + sig { + params(session: String, params: T.any(::Stripe::Checkout::Session::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def self.expire(session, params = {}, opts = {}); end + + # Returns a list of Checkout Sessions. + sig { + params(params: T.any(::Stripe::Checkout::Session::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::Checkout::Session::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_line_items(params = {}, opts = {}); end + + # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(session: String, params: T.any(::Stripe::Checkout::Session::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_line_items(session, params = {}, opts = {}); end + + # Updates a Session object. + sig { + params(id: String, params: T.any(::Stripe::Checkout::Session::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/climate/order.rbi b/rbi/stripe/resources/climate/order.rbi index e70f319d7..526bc27b3 100644 --- a/rbi/stripe/resources/climate/order.rbi +++ b/rbi/stripe/resources/climate/order.rbi @@ -8,99 +8,243 @@ module Stripe # payment is deducted from your merchant balance. class Order < APIResource class Beneficiary < Stripe::StripeObject + # Publicly displayable name for the end beneficiary of carbon removal. sig { returns(String) } attr_reader :public_name end class DeliveryDetail < Stripe::StripeObject class Location < Stripe::StripeObject + # The city where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. sig { returns(String) } attr_reader :country + # The geographic latitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :latitude + # The geographic longitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :longitude + # The state/county/province/region where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :region end + # Time at which the delivery occurred. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :delivered_at + # Specific location of this delivery. sig { returns(T.nilable(Location)) } attr_reader :location + # Quantity of carbon removal supplied by this delivery. sig { returns(String) } attr_reader :metric_tons + # Once retired, a URL to the registry entry for the tons from this delivery. sig { returns(T.nilable(String)) } attr_reader :registry_url + # A supplier of carbon removal. sig { returns(Stripe::Climate::Supplier) } attr_reader :supplier end - sig { returns(Integer) } # Total amount of [Frontier](https://frontierclimate.com/)'s service fees in the currency's smallest unit. - attr_reader :amount_fees sig { returns(Integer) } + attr_reader :amount_fees # Total amount of the carbon removal in the currency's smallest unit. - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal # Total amount of the order including fees in the currency's smallest unit. + sig { returns(Integer) } attr_reader :amount_total - sig { returns(Beneficiary) } # Attribute for field beneficiary + sig { returns(Beneficiary) } attr_reader :beneficiary - sig { returns(T.nilable(Integer)) } # Time at which the order was canceled. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - sig { returns(T.nilable(String)) } # Reason for the cancellation of this order. - attr_reader :cancellation_reason sig { returns(T.nilable(String)) } + attr_reader :cancellation_reason # For delivered orders, a URL to a delivery certificate for the order. + sig { returns(T.nilable(String)) } attr_reader :certificate - sig { returns(T.nilable(Integer)) } # Time at which the order was confirmed. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :confirmed_at - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase, representing the currency for this order. + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(Integer)) } # Time at which the order's expected_delivery_year was delayed. Measured in seconds since the Unix epoch. - attr_reader :delayed_at sig { returns(T.nilable(Integer)) } + attr_reader :delayed_at # Time at which the order was delivered. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :delivered_at - sig { returns(T::Array[DeliveryDetail]) } # Details about the delivery of carbon removal for this order. + sig { returns(T::Array[DeliveryDetail]) } attr_reader :delivery_details - sig { returns(Integer) } # The year this order is expected to be delivered. + sig { returns(Integer) } attr_reader :expected_delivery_year - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # Quantity of carbon removal that is included in this order. - attr_reader :metric_tons sig { returns(String) } + attr_reader :metric_tons # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Climate::Product)) } # Unique ID for the Climate `Product` this order is purchasing. + sig { returns(T.any(String, Stripe::Climate::Product)) } attr_reader :product - sig { returns(T.nilable(Integer)) } # Time at which the order's product was substituted for a different product. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :product_substituted_at - sig { returns(String) } # The current status of this order. + sig { returns(String) } attr_reader :status + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + sig { returns(String) } + attr_accessor :public_name + sig { params(public_name: String).void } + def initialize(public_name: nil); end + end + # Requested amount of carbon removal units. Either this or `metric_tons` must be specified. + sig { returns(Integer) } + attr_accessor :amount + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + sig { returns(::Stripe::Climate::Order::CreateParams::Beneficiary) } + attr_accessor :beneficiary + # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Requested number of tons for the order. Either this or `amount` must be specified. + sig { returns(String) } + attr_accessor :metric_tons + # Unique identifier of the Climate product. + sig { returns(String) } + attr_accessor :product + sig { + params(amount: Integer, beneficiary: ::Stripe::Climate::Order::CreateParams::Beneficiary, currency: String, expand: T::Array[String], metadata: T::Hash[String, String], metric_tons: String, product: String).void + } + def initialize( + amount: nil, + beneficiary: nil, + currency: nil, + expand: nil, + metadata: nil, + metric_tons: nil, + product: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + sig { returns(T.nilable(String)) } + attr_accessor :public_name + sig { params(public_name: T.nilable(String)).void } + def initialize(public_name: nil); end + end + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + sig { returns(T.nilable(::Stripe::Climate::Order::UpdateParams::Beneficiary)) } + attr_accessor :beneficiary + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(beneficiary: T.nilable(::Stripe::Climate::Order::UpdateParams::Beneficiary), expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(beneficiary: nil, expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the + # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier + # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe + # provides 90 days advance notice and refunds the amount_total. + sig { + params(params: T.any(::Stripe::Climate::Order::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def cancel(params = {}, opts = {}); end + + # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the + # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier + # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe + # provides 90 days advance notice and refunds the amount_total. + sig { + params(order: String, params: T.any(::Stripe::Climate::Order::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def self.cancel(order, params = {}, opts = {}); end + + # Creates a Climate order object for a given Climate product. The order will be processed immediately + # after creation and payment will be deducted your Stripe balance. + sig { + params(params: T.any(::Stripe::Climate::Order::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def self.create(params = {}, opts = {}); end + + # Lists all Climate order objects. The orders are returned sorted by creation date, with the + # most recently created orders appearing first. + sig { + params(params: T.any(::Stripe::Climate::Order::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified order by setting the values of the parameters passed. + sig { + params(id: String, params: T.any(::Stripe::Climate::Order::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/climate/product.rbi b/rbi/stripe/resources/climate/product.rbi index f2c914179..b84100efe 100644 --- a/rbi/stripe/resources/climate/product.rbi +++ b/rbi/stripe/resources/climate/product.rbi @@ -8,42 +8,75 @@ module Stripe # You can retrieve it to see the current price and availability. class Product < APIResource class CurrentPricesPerMetricTon < Stripe::StripeObject + # Fees for one metric ton of carbon removal in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_fees + # Subtotal for one metric ton of carbon removal (excluding fees) in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_subtotal + # Total for one metric ton of carbon removal (including fees) in the currency's smallest unit. sig { returns(Integer) } attr_reader :amount_total end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) } # Current prices for a metric ton of carbon removal in a currency's smallest unit. + sig { returns(T::Hash[String, CurrentPricesPerMetricTon]) } attr_reader :current_prices_per_metric_ton - sig { returns(T.nilable(Integer)) } # The year in which the carbon removal is expected to be delivered. + sig { returns(T.nilable(Integer)) } attr_reader :delivery_year - sig { returns(String) } # Unique identifier for the object. For convenience, Climate product IDs are human-readable strings # that start with `climsku_`. See [carbon removal inventory](https://stripe.com/docs/climate/orders/carbon-removal-inventory) # for a list of available carbon removal products. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The quantity of metric tons available for reservation. - attr_reader :metric_tons_available sig { returns(String) } + attr_reader :metric_tons_available # The Climate product's name. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Stripe::Climate::Supplier]) } # The carbon removal suppliers that fulfill orders for this Climate product. + sig { returns(T::Array[Stripe::Climate::Supplier]) } attr_reader :suppliers + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Lists all available Climate product objects. + sig { + params(params: T.any(::Stripe::Climate::Product::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/climate/supplier.rbi b/rbi/stripe/resources/climate/supplier.rbi index 04d8561d9..63819dbf2 100644 --- a/rbi/stripe/resources/climate/supplier.rbi +++ b/rbi/stripe/resources/climate/supplier.rbi @@ -7,38 +7,73 @@ module Stripe # A supplier of carbon removal. class Supplier < APIResource class Location < Stripe::StripeObject + # The city where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter ISO code representing the country where the supplier is located. sig { returns(String) } attr_reader :country + # The geographic latitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :latitude + # The geographic longitude where the supplier is located. sig { returns(T.nilable(Float)) } attr_reader :longitude + # The state/county/province/region where the supplier is located. sig { returns(T.nilable(String)) } attr_reader :region end - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # Link to a webpage to learn more about the supplier. + sig { returns(String) } attr_reader :info_url - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Array[Location]) } # The locations in which this supplier operates. + sig { returns(T::Array[Location]) } attr_reader :locations - sig { returns(String) } # Name of this carbon removal supplier. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object’s type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The scientific pathway used for carbon removal. + sig { returns(String) } attr_reader :removal_pathway + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Lists all available Climate supplier objects. + sig { + params(params: T.any(::Stripe::Climate::Supplier::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/confirmation_token.rbi b/rbi/stripe/resources/confirmation_token.rbi index 5ec7cd00f..247c9ea1d 100644 --- a/rbi/stripe/resources/confirmation_token.rbi +++ b/rbi/stripe/resources/confirmation_token.rbi @@ -14,37 +14,49 @@ module Stripe class MandateData < Stripe::StripeObject class CustomerAcceptance < Stripe::StripeObject class Online < Stripe::StripeObject + # The IP address from which the Mandate was accepted by the customer. sig { returns(T.nilable(String)) } attr_reader :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # If this is a Mandate accepted online, this hash contains details about the online acceptance. sig { returns(T.nilable(Online)) } attr_reader :online + # The type of customer acceptance information included with the Mandate. sig { returns(String) } attr_reader :type end + # This hash contains details about the customer acceptance of the Mandate. sig { returns(CustomerAcceptance) } attr_reader :customer_acceptance end class PaymentMethodOptions < Stripe::StripeObject class Card < Stripe::StripeObject + # The `cvc_update` Token collected from the Payment Element. sig { returns(T.nilable(String)) } attr_reader :cvc_token end + # This hash contains the card payment method options. sig { returns(T.nilable(Card)) } attr_reader :card end class PaymentMethodPreview < Stripe::StripeObject class AcssDebit < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Institution number of the bank account. sig { returns(T.nilable(String)) } attr_reader :institution_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end @@ -54,57 +66,77 @@ module Stripe class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # Six-digit number identifying bank and branch associated with this bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 end class BacsDebit < Stripe::StripeObject + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end @@ -112,105 +144,152 @@ module Stripe class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. sig { returns(String) } attr_reader :type end + # The charge that created this object. sig { returns(T.nilable(String)) } attr_reader :charge + # Transaction-specific details of the payment method used in the payment. sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. sig { returns(T::Boolean) } attr_reader :supported end @@ -221,201 +300,290 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type + # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand + # Checks on Card address and CVC if provided. sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. sig { returns(T.nilable(String)) } attr_reader :display_brand + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } attr_reader :funding + # Details of the original PaymentMethod that created this object. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(String) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Status of a card based on the card issuer. sig { returns(T.nilable(String)) } attr_reader :regulated_status + # Contains details on how this Card may be used for 3D Secure authentication. sig { returns(T.nilable(ThreeDSecureUsage)) } attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject + # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank end class Fpx < Stripe::StripeObject + # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank end @@ -423,80 +591,112 @@ module Stripe class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field display_name sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. sig { returns(T.nilable(String)) } attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end + # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end + # The customer's date of birth, if provided. sig { returns(T.nilable(Dob)) } attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject + # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject + # Account owner's email address. sig { returns(T.nilable(String)) } attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(String) } attr_reader :persistent_token end @@ -504,31 +704,42 @@ module Stripe class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. sig { returns(String) } attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. sig { returns(T.nilable(String)) } attr_reader :bank end class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end @@ -537,13 +748,17 @@ module Stripe class Qris < Stripe::StripeObject; end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(Integer) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(Integer) } attr_reader :month + # The four-digit year of birth. sig { returns(Integer) } attr_reader :year end + # Attribute for field dob sig { returns(Dob) } attr_reader :dob end @@ -551,26 +766,35 @@ module Stripe class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject + # The ID of the Charge that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country end @@ -578,222 +802,972 @@ module Stripe class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject + # The preferred network. sig { returns(T.nilable(String)) } attr_reader :preferred + # All supported networks. sig { returns(T::Array[String]) } attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject + # The ACH network code that resulted in this block. sig { returns(T.nilable(String)) } attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked sig { returns(T.nilable(String)) } attr_reader :reason end + # Attribute for field blocked sig { returns(Blocked) } attr_reader :blocked end + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account number of the bank account. sig { returns(T.nilable(String)) } attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # The name of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. sig { returns(T.nilable(String)) } attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about US bank account networks that can be used. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. sig { returns(String) } attr_reader :allow_redisplay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay + # Attribute for field qris sig { returns(Qris) } attr_reader :qris + # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field twint sig { returns(Twint) } attr_reader :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } # Time at which this ConfirmationToken expires and can no longer be used to confirm a PaymentIntent or SetupIntent. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(MandateData)) } # Data used for generating a Mandate. + sig { returns(T.nilable(MandateData)) } attr_reader :mandate_data - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # ID of the PaymentIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + sig { returns(T.nilable(String)) } attr_reader :payment_intent - sig { returns(T.nilable(PaymentMethodOptions)) } # Payment-method-specific configuration for this ConfirmationToken. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T.nilable(PaymentMethodPreview)) } # Payment details collected by the Payment Element, used to create a PaymentMethod when a PaymentIntent or SetupIntent is confirmed with this ConfirmationToken. + sig { returns(T.nilable(PaymentMethodPreview)) } attr_reader :payment_method_preview - sig { returns(T.nilable(String)) } # Return URL used to confirm the Intent. - attr_reader :return_url sig { returns(T.nilable(String)) } + attr_reader :return_url # Indicates that you intend to make future payments with this ConfirmationToken's payment method. # # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. - attr_reader :setup_future_usage sig { returns(T.nilable(String)) } + attr_reader :setup_future_usage # ID of the SetupIntent that this ConfirmationToken was used to confirm, or null if this ConfirmationToken has not yet been used. + sig { returns(T.nilable(String)) } attr_reader :setup_intent - sig { returns(T.nilable(Shipping)) } # Shipping information collected on this ConfirmationToken. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping - sig { returns(T::Boolean) } # Indicates whether the Stripe SDK is used to handle confirmation flow. Defaults to `true` on ConfirmationToken. + sig { returns(T::Boolean) } attr_reader :use_stripe_sdk + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Blik, boleto: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Eps, fpx: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Fpx, giropay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Giropay, gopay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Klarna, konbini: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::KrCard, link: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Link, mb_way: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Oxxo, p24: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::P24, payco: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payco, paynow: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paynow, paypal: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Paypal, payto: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Payto, pix: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Pix, promptpay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Promptpay, qris: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Qris, radar_options: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Sofort, swish: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Swish, twint: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::WechatPay, zip: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address + sig { returns(::Stripe::ConfirmationToken::CreateParams::Shipping::Address) } + attr_accessor :address + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension) + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::ConfirmationToken::CreateParams::Shipping::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of an existing PaymentMethod. + sig { returns(String) } + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. + sig { returns(::Stripe::ConfirmationToken::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Return URL used to confirm the Intent. + sig { returns(String) } + attr_accessor :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. + # + # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + sig { returns(String) } + attr_accessor :setup_future_usage + # Shipping information for this ConfirmationToken. + sig { returns(::Stripe::ConfirmationToken::CreateParams::Shipping) } + attr_accessor :shipping + sig { + params(expand: T::Array[String], payment_method: String, payment_method_data: ::Stripe::ConfirmationToken::CreateParams::PaymentMethodData, return_url: String, setup_future_usage: String, shipping: ::Stripe::ConfirmationToken::CreateParams::Shipping).void + } + def initialize( + expand: nil, + payment_method: nil, + payment_method_data: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil + ); end + end end end \ No newline at end of file diff --git a/rbi/stripe/resources/connect_collection_transfer.rbi b/rbi/stripe/resources/connect_collection_transfer.rbi index 716c92fd2..f84fb50e0 100644 --- a/rbi/stripe/resources/connect_collection_transfer.rbi +++ b/rbi/stripe/resources/connect_collection_transfer.rbi @@ -4,23 +4,23 @@ # typed: true module Stripe class ConnectCollectionTransfer < APIResource - sig { returns(Integer) } # Amount transferred, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Account)) } # ID of the account that funds are being collected for. + sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/country_spec.rbi b/rbi/stripe/resources/country_spec.rbi index 3b006e099..1c3e80d33 100644 --- a/rbi/stripe/resources/country_spec.rbi +++ b/rbi/stripe/resources/country_spec.rbi @@ -12,45 +12,81 @@ module Stripe class CountrySpec < APIResource class VerificationFields < Stripe::StripeObject class Company < Stripe::StripeObject + # Additional fields which are only required for some users. sig { returns(T::Array[String]) } attr_reader :additional + # Fields which every account must eventually provide. sig { returns(T::Array[String]) } attr_reader :minimum end class Individual < Stripe::StripeObject + # Additional fields which are only required for some users. sig { returns(T::Array[String]) } attr_reader :additional + # Fields which every account must eventually provide. sig { returns(T::Array[String]) } attr_reader :minimum end + # Attribute for field company sig { returns(Company) } attr_reader :company + # Attribute for field individual sig { returns(Individual) } attr_reader :individual end - sig { returns(String) } # The default currency for this country. This applies to both payment methods and bank accounts. - attr_reader :default_currency sig { returns(String) } + attr_reader :default_currency # Unique identifier for the object. Represented as the ISO country code for this country. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, T::Array[String]]) } # Currencies that can be accepted in the specific country (for transfers). + sig { returns(T::Hash[String, T::Array[String]]) } attr_reader :supported_bank_account_currencies - sig { returns(T::Array[String]) } # Currencies that can be accepted in the specified country (for payments). - attr_reader :supported_payment_currencies sig { returns(T::Array[String]) } + attr_reader :supported_payment_currencies # Payment methods available in the specified country. You may need to enable some payment methods (e.g., [ACH](https://stripe.com/docs/ach)) on your account before they appear in this list. The `stripe` payment method refers to [charging through your platform](https://stripe.com/docs/connect/destination-charges). - attr_reader :supported_payment_methods sig { returns(T::Array[String]) } + attr_reader :supported_payment_methods # Countries that can accept transfers from the specified country. + sig { returns(T::Array[String]) } attr_reader :supported_transfer_countries - sig { returns(VerificationFields) } # Attribute for field verification_fields + sig { returns(VerificationFields) } attr_reader :verification_fields + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Lists all Country Spec objects available in the API. + sig { + params(params: T.any(::Stripe::CountrySpec::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/coupon.rbi b/rbi/stripe/resources/coupon.rbi index 711b2c7c6..9703158bf 100644 --- a/rbi/stripe/resources/coupon.rbi +++ b/rbi/stripe/resources/coupon.rbi @@ -8,66 +8,250 @@ module Stripe # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). class Coupon < APIResource class AppliesTo < Stripe::StripeObject + # A list of product IDs this coupon applies to sig { returns(T::Array[String]) } attr_reader :products end class CurrencyOptions < Stripe::StripeObject + # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. sig { returns(Integer) } attr_reader :amount_off end - sig { returns(T.nilable(Integer)) } # Amount (in the `currency` specified) that will be taken off the subtotal of any invoices for this customer. + sig { returns(T.nilable(Integer)) } attr_reader :amount_off - sig { returns(AppliesTo) } # Attribute for field applies_to + sig { returns(AppliesTo) } attr_reader :applies_to - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # If `amount_off` has been set, the three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the amount to take off. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T::Hash[String, CurrencyOptions]) } # Coupons defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options - sig { returns(String) } # One of `forever`, `once`, and `repeating`. Describes how long a customer who applies this coupon will get the discount. + sig { returns(String) } attr_reader :duration - sig { returns(T.nilable(Integer)) } # If `duration` is `repeating`, the number of months the coupon applies. Null if coupon `duration` is `forever` or `once`. + sig { returns(T.nilable(Integer)) } attr_reader :duration_in_months - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(Integer)) } # Maximum number of times this coupon can be redeemed, in total, across all customers, before it is no longer valid. + sig { returns(T.nilable(Integer)) } attr_reader :max_redemptions - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } # Name of the coupon displayed to customers on for instance invoices or receipts. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Float)) } # Percent that will be taken off the subtotal of any invoices for this customer for the duration of the coupon. For example, a coupon with percent_off of 50 will make a $ (or local equivalent)100 invoice $ (or local equivalent)50 instead. + sig { returns(T.nilable(Float)) } attr_reader :percent_off - sig { returns(T.nilable(Integer)) } # Date after which the coupon can no longer be redeemed. + sig { returns(T.nilable(Integer)) } attr_reader :redeem_by - sig { returns(Integer) } # Number of times this coupon has been applied to a customer. + sig { returns(Integer) } attr_reader :times_redeemed - sig { returns(T::Boolean) } # Taking account of the above properties, whether this coupon can still be applied to a customer. - attr_reader :valid sig { returns(T::Boolean) } + attr_reader :valid # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + sig { returns(Integer) } + attr_accessor :amount_off + sig { params(amount_off: Integer).void } + def initialize(amount_off: nil); end + end + # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, ::Stripe::Coupon::UpdateParams::CurrencyOptions]) } + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + sig { returns(String) } + attr_accessor :name + sig { + params(currency_options: T::Hash[String, ::Stripe::Coupon::UpdateParams::CurrencyOptions], expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), name: String).void + } + def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::Coupon::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Coupon::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # An array of Product IDs that this Coupon will apply to. + sig { returns(T::Array[String]) } + attr_accessor :products + sig { params(products: T::Array[String]).void } + def initialize(products: nil); end + end + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + sig { returns(Integer) } + attr_accessor :amount_off + sig { params(amount_off: Integer).void } + def initialize(amount_off: nil); end + end + # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + sig { returns(Integer) } + attr_accessor :amount_off + # A hash containing directions for what this Coupon will apply discounts to. + sig { returns(::Stripe::Coupon::CreateParams::AppliesTo) } + attr_accessor :applies_to + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + sig { returns(String) } + attr_accessor :currency + # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, ::Stripe::Coupon::CreateParams::CurrencyOptions]) } + attr_accessor :currency_options + # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + sig { returns(String) } + attr_accessor :duration + # Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. + sig { returns(Integer) } + attr_accessor :duration_in_months + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. + sig { returns(String) } + attr_accessor :id + # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. + sig { returns(Integer) } + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + sig { returns(String) } + attr_accessor :name + # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + sig { returns(Float) } + attr_accessor :percent_off + # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + sig { returns(Integer) } + attr_accessor :redeem_by + sig { + params(amount_off: Integer, applies_to: ::Stripe::Coupon::CreateParams::AppliesTo, currency: String, currency_options: T::Hash[String, ::Stripe::Coupon::CreateParams::CurrencyOptions], duration: String, duration_in_months: Integer, expand: T::Array[String], id: String, max_redemptions: Integer, metadata: T.nilable(T::Hash[String, String]), name: String, percent_off: Float, redeem_by: Integer).void + } + def initialize( + amount_off: nil, + applies_to: nil, + currency: nil, + currency_options: nil, + duration: nil, + duration_in_months: nil, + expand: nil, + id: nil, + max_redemptions: nil, + metadata: nil, + name: nil, + percent_off: nil, + redeem_by: nil + ); end + end + # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. + # + # A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it. + sig { + params(params: T.any(::Stripe::Coupon::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def self.create(params = {}, opts = {}); end + + # You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. + sig { + params(id: String, params: T.any(::Stripe::Coupon::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def self.delete(id, params = {}, opts = {}); end + + # You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. + sig { + params(params: T.any(::Stripe::Coupon::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your coupons. + sig { + params(params: T.any(::Stripe::Coupon::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. + sig { + params(id: String, params: T.any(::Stripe::Coupon::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note.rbi b/rbi/stripe/resources/credit_note.rbi index d179e2935..1216ec112 100644 --- a/rbi/stripe/resources/credit_note.rbi +++ b/rbi/stripe/resources/credit_note.rbi @@ -8,162 +8,752 @@ module Stripe # Related guide: [Credit notes](https://stripe.com/docs/billing/invoices/credit-notes) class CreditNote < APIResource class DiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class Refund < Stripe::StripeObject + # Amount of the refund that applies to this credit note, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_refunded + # ID of the refund. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class TaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # This is the sum of all the shipping amounts. - attr_reader :amount_shipping sig { returns(Integer) } + attr_reader :amount_shipping # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } # ID of the customer. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) } # Customer balance transaction related to this credit note. + sig { returns(T.nilable(T.any(String, Stripe::CustomerBalanceTransaction))) } attr_reader :customer_balance_transaction - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the total amount of discount that was credited. + sig { returns(Integer) } attr_reader :discount_amount - sig { returns(T::Array[DiscountAmount]) } # The aggregate amounts calculated per discount for all line items. + sig { returns(T::Array[DiscountAmount]) } attr_reader :discount_amounts - sig { returns(T.nilable(Integer)) } # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(T.nilable(Integer)) } attr_reader :effective_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.any(String, Stripe::Invoice)) } # ID of the invoice. + sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - sig { returns(Stripe::ListObject) } # Line items that make up the credit note + sig { returns(Stripe::ListObject) } attr_reader :lines - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # Customer-facing text that appears on the credit note PDF. + sig { returns(T.nilable(String)) } attr_reader :memo - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # A unique number that identifies this particular credit note and appears on the PDF of the credit note and its associated invoice. - attr_reader :number sig { returns(String) } + attr_reader :number # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Integer)) } # Amount that was credited outside of Stripe. + sig { returns(T.nilable(Integer)) } attr_reader :out_of_band_amount - sig { returns(String) } # The link to download the PDF of the credit note. + sig { returns(String) } attr_reader :pdf - sig { returns(Integer) } # Attribute for field post_payment_amount - attr_reader :post_payment_amount sig { returns(Integer) } + attr_reader :post_payment_amount # Attribute for field pre_payment_amount + sig { returns(Integer) } attr_reader :pre_payment_amount - sig { returns(T::Array[PretaxCreditAmount]) } # The pretax credit amounts (ex: discount, credit grants, etc) for all line items. + sig { returns(T::Array[PretaxCreditAmount]) } attr_reader :pretax_credit_amounts - sig { returns(T.nilable(String)) } # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(T.nilable(String)) } attr_reader :reason - sig { returns(T.nilable(T.any(String, Stripe::Refund))) } # Refund related to this credit note. + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } attr_reader :refund - sig { returns(T::Array[Refund]) } # Refunds related to this credit note. + sig { returns(T::Array[Refund]) } attr_reader :refunds - sig { returns(T.nilable(ShippingCost)) } # The details of the cost of shipping, including the ShippingRate applied to the invoice. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(String) } # Status of this credit note, one of `issued` or `void`. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + sig { returns(String) } attr_reader :status - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding exclusive tax and invoice level discounts. + sig { returns(Integer) } attr_reader :subtotal - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the amount of the credit note, excluding all tax and invoice level discounts. + sig { returns(T.nilable(Integer)) } attr_reader :subtotal_excluding_tax - sig { returns(T::Array[TaxAmount]) } # The aggregate amounts calculated per tax rate for all line items. + sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the total amount of the credit note, including tax and all discount. + sig { returns(Integer) } attr_reader :total - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the total amount of the credit note, excluding tax, but including discounts. + sig { returns(T.nilable(Integer)) } attr_reader :total_excluding_tax - sig { returns(String) } # Type of this credit note, one of `pre_payment` or `post_payment`. A `pre_payment` credit note means it was issued when the invoice was open. A `post_payment` credit note means it was issued when the invoice was paid. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Integer)) } # The time that the credit note was voided. + sig { returns(T.nilable(Integer)) } attr_reader :voided_at + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return credit notes that were created during the given date interval. + sig { returns(T.any(::Stripe::CreditNote::ListParams::Created, Integer)) } + attr_accessor :created + # Only return credit notes for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return credit notes for the invoice specified by this invoice ID. + sig { returns(String) } + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::CreditNote::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], invoice: String, limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + sig { returns(String) } + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void } + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + sig { returns(Integer) } + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + sig { returns(String) } + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + sig { returns(String) } + attr_accessor :invoice_line_item + # The line item quantity to credit. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + sig { returns(T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Line::TaxAmount])) } + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + sig { returns(String) } + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, invoice_line_item: String, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::CreditNote::CreateParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String]), type: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + sig { returns(Integer) } + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + sig { params(amount_refunded: Integer, refund: String).void } + def initialize(amount_refunded: nil, refund: nil); end + end + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + sig { returns(Integer) } + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + sig { returns(Integer) } + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(Integer) } + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + sig { returns(String) } + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the invoice. + sig { returns(String) } + attr_accessor :invoice + # Line items that make up the credit note. + sig { returns(T::Array[::Stripe::CreditNote::CreateParams::Line]) } + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + sig { returns(Integer) } + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(String) } + attr_accessor :reason + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + sig { returns(Integer) } + attr_accessor :refund_amount + # Refunds to link to this credit note. + sig { returns(T::Array[::Stripe::CreditNote::CreateParams::Refund]) } + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + sig { returns(::Stripe::CreditNote::CreateParams::ShippingCost) } + attr_accessor :shipping_cost + sig { + params(amount: Integer, credit_amount: Integer, effective_at: Integer, email_type: String, expand: T::Array[String], invoice: String, lines: T::Array[::Stripe::CreditNote::CreateParams::Line], memo: String, metadata: T::Hash[String, String], out_of_band_amount: Integer, reason: String, refund: String, refund_amount: Integer, refunds: T::Array[::Stripe::CreditNote::CreateParams::Refund], shipping_cost: ::Stripe::CreditNote::CreateParams::ShippingCost).void + } + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Credit note memo. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { params(expand: T::Array[String], memo: String, metadata: T::Hash[String, String]).void } + def initialize(expand: nil, memo: nil, metadata: nil); end + end + class PreviewParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + sig { returns(String) } + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void } + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + sig { returns(Integer) } + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + sig { returns(String) } + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + sig { returns(String) } + attr_accessor :invoice_line_item + # The line item quantity to credit. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + sig { returns(T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Line::TaxAmount])) } + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + sig { returns(String) } + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, invoice_line_item: String, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::CreditNote::PreviewParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String]), type: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + sig { returns(Integer) } + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + sig { params(amount_refunded: Integer, refund: String).void } + def initialize(amount_refunded: nil, refund: nil); end + end + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + sig { returns(Integer) } + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + sig { returns(Integer) } + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(Integer) } + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + sig { returns(String) } + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the invoice. + sig { returns(String) } + attr_accessor :invoice + # Line items that make up the credit note. + sig { returns(T::Array[::Stripe::CreditNote::PreviewParams::Line]) } + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + sig { returns(Integer) } + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(String) } + attr_accessor :reason + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + sig { returns(Integer) } + attr_accessor :refund_amount + # Refunds to link to this credit note. + sig { returns(T::Array[::Stripe::CreditNote::PreviewParams::Refund]) } + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + sig { returns(::Stripe::CreditNote::PreviewParams::ShippingCost) } + attr_accessor :shipping_cost + sig { + params(amount: Integer, credit_amount: Integer, effective_at: Integer, email_type: String, expand: T::Array[String], invoice: String, lines: T::Array[::Stripe::CreditNote::PreviewParams::Line], memo: String, metadata: T::Hash[String, String], out_of_band_amount: Integer, reason: String, refund: String, refund_amount: Integer, refunds: T::Array[::Stripe::CreditNote::PreviewParams::Refund], shipping_cost: ::Stripe::CreditNote::PreviewParams::ShippingCost).void + } + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ); end + end + class ListPreviewLineItemsParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + sig { returns(String) } + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void } + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + sig { returns(Integer) } + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + sig { returns(String) } + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + sig { returns(String) } + attr_accessor :invoice_line_item + # The line item quantity to credit. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + sig { + returns(T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + sig { returns(String) } + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, invoice_line_item: String, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String]), type: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + sig { returns(Integer) } + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + sig { params(amount_refunded: Integer, refund: String).void } + def initialize(amount_refunded: nil, refund: nil); end + end + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + sig { returns(Integer) } + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + sig { returns(Integer) } + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(Integer) } + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + sig { returns(String) } + attr_accessor :email_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the invoice. + sig { returns(String) } + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Line items that make up the credit note. + sig { returns(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line]) } + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + sig { returns(Integer) } + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(String) } + attr_accessor :reason + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + sig { returns(Integer) } + attr_accessor :refund_amount + # Refunds to link to this credit note. + sig { returns(T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Refund]) } + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + sig { returns(::Stripe::CreditNote::ListPreviewLineItemsParams::ShippingCost) } + attr_accessor :shipping_cost + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(amount: Integer, credit_amount: Integer, effective_at: Integer, email_type: String, ending_before: String, expand: T::Array[String], invoice: String, limit: Integer, lines: T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Line], memo: String, metadata: T::Hash[String, String], out_of_band_amount: Integer, reason: String, refund: String, refund_amount: Integer, refunds: T::Array[::Stripe::CreditNote::ListPreviewLineItemsParams::Refund], shipping_cost: ::Stripe::CreditNote::ListPreviewLineItemsParams::ShippingCost, starting_after: String).void + } + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil, + starting_after: nil + ); end + end + class VoidCreditNoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces + # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result + # in any combination of the following: + # + # + # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. + # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). + # + # + # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # + # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount + # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + sig { + params(params: T.any(::Stripe::CreditNote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of credit notes. + sig { + params(params: T.any(::Stripe::CreditNote::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::CreditNote::ListPreviewLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_preview_line_items(params = {}, opts = {}); end + + # Get a preview of a credit note without creating it. + sig { + params(params: T.any(::Stripe::CreditNote::PreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def self.preview(params = {}, opts = {}); end + + # Updates an existing credit note. + sig { + params(id: String, params: T.any(::Stripe::CreditNote::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def self.update(id, params = {}, opts = {}); end + + # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + sig { + params(params: T.any(::Stripe::CreditNote::VoidCreditNoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def void_credit_note(params = {}, opts = {}); end + + # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + sig { + params(id: String, params: T.any(::Stripe::CreditNote::VoidCreditNoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def self.void_credit_note(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/credit_note_line_item.rbi b/rbi/stripe/resources/credit_note_line_item.rbi index e3ea6442d..9a0fa62b2 100644 --- a/rbi/stripe/resources/credit_note_line_item.rbi +++ b/rbi/stripe/resources/credit_note_line_item.rbi @@ -6,83 +6,94 @@ module Stripe # The credit note line item object class CreditNoteLineItem < StripeObject class DiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class PretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Billing::CreditBalanceTransaction)) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the gross amount being credited for this line item, excluding (exclusive) tax and discounts. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the amount being credited for this line item, excluding all tax and discounts. + sig { returns(T.nilable(Integer)) } attr_reader :amount_excluding_tax - sig { returns(T.nilable(String)) } # Description of the item being credited. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(Integer) } # The integer amount in cents (or local equivalent) representing the discount being credited for this line item. + sig { returns(Integer) } attr_reader :discount_amount - sig { returns(T::Array[DiscountAmount]) } # The amount of discount calculated per discount for this line item + sig { returns(T::Array[DiscountAmount]) } attr_reader :discount_amounts - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # ID of the invoice line item being credited + sig { returns(String) } attr_reader :invoice_line_item - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[PretaxCreditAmount]) } # The pretax credit amounts (ex: discount, credit grants, etc) for this line item. + sig { returns(T::Array[PretaxCreditAmount]) } attr_reader :pretax_credit_amounts - sig { returns(T.nilable(Integer)) } # The number of units of product being credited. + sig { returns(T.nilable(Integer)) } attr_reader :quantity - sig { returns(T::Array[TaxAmount]) } # The amount of tax calculated per tax rate for this line item + sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts - sig { returns(T::Array[Stripe::TaxRate]) } # The tax rates which apply to the line item. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :tax_rates - sig { returns(String) } # The type of the credit note line item, one of `invoice_line_item` or `custom_line_item`. When the type is `invoice_line_item` there is an additional `invoice_line_item` property on the resource the value of which is the id of the credited line item on the invoice. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Integer)) } # The cost of each unit of product being credited. + sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - sig { returns(T.nilable(String)) } # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. - attr_reader :unit_amount_decimal sig { returns(T.nilable(String)) } + attr_reader :unit_amount_decimal # The amount in cents (or local equivalent) representing the unit amount being credited for this line item, excluding all tax and discounts. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_excluding_tax end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer.rbi b/rbi/stripe/resources/customer.rbi index 588078036..65c679d22 100644 --- a/rbi/stripe/resources/customer.rbi +++ b/rbi/stripe/resources/customer.rbi @@ -7,177 +7,993 @@ module Stripe # and track payments that belong to the same customer. class Customer < APIResource class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class InvoiceSettings < Stripe::StripeObject class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display + # ID of the invoice rendering template to be used for this customer's invoices. If set, the template will be used on all invoices for this customer unless a template is set directly on the invoice. sig { returns(T.nilable(String)) } attr_reader :template end + # Default custom fields to be displayed on invoices for this customer. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # Default footer to be displayed on invoices for this customer. sig { returns(T.nilable(String)) } attr_reader :footer + # Default options for invoice PDF rendering for this customer. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class Tax < Stripe::StripeObject class Location < Stripe::StripeObject + # The customer's country as identified by Stripe Tax. sig { returns(String) } attr_reader :country + # The data source used to infer the customer's location. sig { returns(String) } attr_reader :source + # The customer's state, county, province, or region as identified by Stripe Tax. sig { returns(T.nilable(String)) } attr_reader :state end + # Surfaces if automatic tax computation is possible given the current customer location information. sig { returns(String) } attr_reader :automatic_tax + # A recent IP address of the customer used for tax reporting and tax location inference. sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer's location as identified by Stripe Tax. sig { returns(T.nilable(Location)) } attr_reader :location end - sig { returns(T.nilable(Address)) } # The customer's address. + sig { returns(T.nilable(Address)) } attr_reader :address - sig { returns(Integer) } # The current balance, if any, that's stored on the customer. If negative, the customer has credit to apply to their next invoice. If positive, the customer has an amount owed that's added to their next invoice. The balance only considers amounts that Stripe hasn't successfully applied to any invoice. It doesn't reflect unpaid invoices. This balance is only taken into account after invoices finalize. + sig { returns(Integer) } attr_reader :balance - sig { returns(T.nilable(Stripe::CashBalance)) } # The current funds being held by Stripe on behalf of the customer. You can apply these funds towards payment intents when the source is "cash_balance". The `settings[reconciliation_mode]` field describes if these funds apply to these payment intents manually or automatically. + sig { returns(T.nilable(Stripe::CashBalance)) } attr_reader :cash_balance - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) the customer can be charged in for recurring billing purposes. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { - returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) - } # ID of the default payment source for the customer. # # If you use payment methods created through the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) field instead. + sig { + returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) + } attr_reader :default_source - sig { returns(T.nilable(T::Boolean)) } # Tracks the most recent state change on any invoice belonging to the customer. Paying an invoice or marking it uncollectible via the API will set this field to false. An automatic payment failure or passing the `invoice.due_date` will set this field to `true`. # # If an invoice becomes uncollectible by [dunning](https://stripe.com/docs/billing/automatic-collection), `delinquent` doesn't reset to `false`. # # If you care whether the customer has paid their most recent subscription invoice, use `subscription.status` instead. Paying or marking uncollectible any customer invoice regardless of whether it is the latest invoice for a subscription will always set this field to `false`. + sig { returns(T.nilable(T::Boolean)) } attr_reader :delinquent - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } # Describes the current discount active on the customer, if there is one. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T.nilable(String)) } # The customer's email address. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Hash[String, Integer]) } # The current multi-currency balances, if any, that's stored on the customer. If positive in a currency, the customer has a credit to apply to their next invoice denominated in that currency. If negative, the customer has an amount owed that's added to their next invoice denominated in that currency. These balances don't apply to unpaid invoices. They solely track amounts that Stripe hasn't successfully applied to any invoice. Stripe only applies a balance in a specific currency to an invoice after that invoice (which is in the same currency) finalizes. + sig { returns(T::Hash[String, Integer]) } attr_reader :invoice_credit_balance - sig { returns(T.nilable(String)) } # The prefix for the customer used to generate unique invoice numbers. + sig { returns(T.nilable(String)) } attr_reader :invoice_prefix - sig { returns(InvoiceSettings) } # Attribute for field invoice_settings + sig { returns(InvoiceSettings) } attr_reader :invoice_settings - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } # The customer's full name or business name. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(Integer) } # The suffix of the customer's next invoice number (for example, 0001). When the account uses account level sequencing, this parameter is ignored in API requests and the field omitted in API responses. + sig { returns(Integer) } attr_reader :next_invoice_sequence - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The customer's phone number. + sig { returns(T.nilable(String)) } attr_reader :phone - sig { returns(T.nilable(T::Array[String])) } # The customer's preferred locales (languages), ordered by preference. + sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - sig { returns(T.nilable(Shipping)) } # Mailing and shipping address for the customer. Appears on invoices emailed to this customer. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping - sig { returns(Stripe::ListObject) } # The customer's payment sources, if any. - attr_reader :sources sig { returns(Stripe::ListObject) } + attr_reader :sources # The customer's current subscriptions, if any. + sig { returns(Stripe::ListObject) } attr_reader :subscriptions - sig { returns(Tax) } # Attribute for field tax + sig { returns(Tax) } attr_reader :tax - sig { returns(T.nilable(String)) } # Describes the customer's tax exemption status, which is `none`, `exempt`, or `reverse`. When set to `reverse`, invoice and receipt PDFs include the following text: **"Reverse charge"**. + sig { returns(T.nilable(String)) } attr_reader :tax_exempt - sig { returns(Stripe::ListObject) } # The customer's tax IDs. + sig { returns(Stripe::ListObject) } attr_reader :tax_ids - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock that this customer belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + sig { returns(String) } + attr_accessor :reconciliation_mode + sig { params(reconciliation_mode: String).void } + def initialize(reconciliation_mode: nil); end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + sig { returns(::Stripe::Customer::UpdateParams::CashBalance::Settings) } + attr_accessor :settings + sig { params(settings: ::Stripe::Customer::UpdateParams::CashBalance::Settings).void } + def initialize(settings: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + sig { returns(String) } + attr_accessor :template + sig { params(amount_tax_display: T.nilable(String), template: String).void } + def initialize(amount_tax_display: nil, template: nil); end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + sig { + returns(T.nilable(T::Array[::Stripe::Customer::UpdateParams::InvoiceSettings::CustomField])) + } + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + sig { returns(String) } + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::Customer::UpdateParams::InvoiceSettings::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(custom_fields: T.nilable(T::Array[::Stripe::Customer::UpdateParams::InvoiceSettings::CustomField]), default_payment_method: String, footer: String, rendering_options: T.nilable(::Stripe::Customer::UpdateParams::InvoiceSettings::RenderingOptions)).void + } + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { returns(::Stripe::Customer::UpdateParams::Shipping::Address) } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Customer::UpdateParams::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. + sig { returns(String) } + attr_accessor :validate_location + sig { params(ip_address: T.nilable(String), validate_location: String).void } + def initialize(ip_address: nil, validate_location: nil); end + end + # The customer's address. + sig { returns(T.nilable(::Stripe::Customer::UpdateParams::Address)) } + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + sig { returns(Integer) } + attr_accessor :balance + # Balance information and default balance settings for this customer. + sig { returns(::Stripe::Customer::UpdateParams::CashBalance) } + attr_accessor :cash_balance + # Attribute for param field coupon + sig { returns(String) } + attr_accessor :coupon + # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + # + # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + # + # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + sig { returns(String) } + attr_accessor :default_source + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + sig { returns(String) } + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + sig { returns(String) } + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + sig { returns(::Stripe::Customer::UpdateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The customer's full name or business name. + sig { returns(String) } + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + sig { returns(Integer) } + attr_accessor :next_invoice_sequence + # The customer's phone number. + sig { returns(String) } + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + sig { returns(String) } + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { returns(T.nilable(::Stripe::Customer::UpdateParams::Shipping)) } + attr_accessor :shipping + # Attribute for param field source + sig { returns(String) } + attr_accessor :source + # Tax details about the customer. + sig { returns(::Stripe::Customer::UpdateParams::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # Attribute for param field validate + sig { returns(T::Boolean) } + attr_accessor :validate + sig { + params(address: T.nilable(::Stripe::Customer::UpdateParams::Address), balance: Integer, cash_balance: ::Stripe::Customer::UpdateParams::CashBalance, coupon: String, default_source: String, description: String, email: String, expand: T::Array[String], invoice_prefix: String, invoice_settings: ::Stripe::Customer::UpdateParams::InvoiceSettings, metadata: T.nilable(T::Hash[String, String]), name: String, next_invoice_sequence: Integer, phone: String, preferred_locales: T::Array[String], promotion_code: String, shipping: T.nilable(::Stripe::Customer::UpdateParams::Shipping), source: String, tax: ::Stripe::Customer::UpdateParams::Tax, tax_exempt: T.nilable(String), validate: T::Boolean).void + } + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + default_source: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + validate: nil + ); end + end + class DeleteDiscountParams < Stripe::RequestParams + + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return customers that were created during the given date interval. + sig { returns(T.any(::Stripe::Customer::ListParams::Created, Integer)) } + attr_accessor :created + # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + sig { returns(String) } + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. + sig { returns(String) } + attr_accessor :test_clock + sig { + params(created: T.any(::Stripe::Customer::ListParams::Created, Integer), email: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, test_clock: String).void + } + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + test_clock: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + sig { returns(String) } + attr_accessor :reconciliation_mode + sig { params(reconciliation_mode: String).void } + def initialize(reconciliation_mode: nil); end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + sig { returns(::Stripe::Customer::CreateParams::CashBalance::Settings) } + attr_accessor :settings + sig { params(settings: ::Stripe::Customer::CreateParams::CashBalance::Settings).void } + def initialize(settings: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + sig { returns(String) } + attr_accessor :template + sig { params(amount_tax_display: T.nilable(String), template: String).void } + def initialize(amount_tax_display: nil, template: nil); end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + sig { + returns(T.nilable(T::Array[::Stripe::Customer::CreateParams::InvoiceSettings::CustomField])) + } + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + sig { returns(String) } + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::Customer::CreateParams::InvoiceSettings::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(custom_fields: T.nilable(T::Array[::Stripe::Customer::CreateParams::InvoiceSettings::CustomField]), default_payment_method: String, footer: String, rendering_options: T.nilable(::Stripe::Customer::CreateParams::InvoiceSettings::RenderingOptions)).void + } + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { returns(::Stripe::Customer::CreateParams::Shipping::Address) } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Customer::CreateParams::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. + sig { returns(String) } + attr_accessor :validate_location + sig { params(ip_address: T.nilable(String), validate_location: String).void } + def initialize(ip_address: nil, validate_location: nil); end + end + class TaxIdDatum < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { returns(T.nilable(::Stripe::Customer::CreateParams::Address)) } + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + sig { returns(Integer) } + attr_accessor :balance + # Balance information and default balance settings for this customer. + sig { returns(::Stripe::Customer::CreateParams::CashBalance) } + attr_accessor :cash_balance + # Attribute for param field coupon + sig { returns(String) } + attr_accessor :coupon + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + sig { returns(String) } + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + sig { returns(String) } + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + sig { returns(::Stripe::Customer::CreateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The customer's full name or business name. + sig { returns(String) } + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + sig { returns(Integer) } + attr_accessor :next_invoice_sequence + # Attribute for param field payment_method + sig { returns(String) } + attr_accessor :payment_method + # The customer's phone number. + sig { returns(String) } + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + sig { returns(String) } + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { returns(T.nilable(::Stripe::Customer::CreateParams::Shipping)) } + attr_accessor :shipping + # Attribute for param field source + sig { returns(String) } + attr_accessor :source + # Tax details about the customer. + sig { returns(::Stripe::Customer::CreateParams::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { returns(T::Array[::Stripe::Customer::CreateParams::TaxIdDatum]) } + attr_accessor :tax_id_data + # ID of the test clock to attach to the customer. + sig { returns(String) } + attr_accessor :test_clock + # Attribute for param field validate + sig { returns(T::Boolean) } + attr_accessor :validate + sig { + params(address: T.nilable(::Stripe::Customer::CreateParams::Address), balance: Integer, cash_balance: ::Stripe::Customer::CreateParams::CashBalance, coupon: String, description: String, email: String, expand: T::Array[String], invoice_prefix: String, invoice_settings: ::Stripe::Customer::CreateParams::InvoiceSettings, metadata: T.nilable(T::Hash[String, String]), name: String, next_invoice_sequence: Integer, payment_method: String, phone: String, preferred_locales: T::Array[String], promotion_code: String, shipping: T.nilable(::Stripe::Customer::CreateParams::Shipping), source: String, tax: ::Stripe::Customer::CreateParams::Tax, tax_exempt: T.nilable(String), tax_id_data: T::Array[::Stripe::Customer::CreateParams::TaxIdDatum], test_clock: String, validate: T::Boolean).void + } + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + payment_method: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + tax_id_data: nil, + test_clock: nil, + validate: nil + ); end + end + class ListPaymentMethodsParams < Stripe::RequestParams + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + sig { returns(String) } + attr_accessor :type + sig { + params(allow_redisplay: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String).void + } + def initialize( + allow_redisplay: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ); end + end + class RetrievePaymentMethodParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class CreateFundingInstructionsParams < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The type of the `bank_transfer` + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Additional parameters for `bank_transfer` funding types + sig { returns(::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer) } + attr_accessor :bank_transfer + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The `funding_type` to get the instructions for. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::Customer::CreateFundingInstructionsParams::BankTransfer, currency: String, expand: T::Array[String], funding_type: String).void + } + def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil); end + end + class FundCashBalanceParams < Stripe::RequestParams + # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + sig { returns(String) } + attr_accessor :reference + sig { + params(amount: Integer, currency: String, expand: T::Array[String], reference: String).void + } + def initialize(amount: nil, currency: nil, expand: nil, reference: nil); end + end + # Creates a new customer object. + sig { + params(params: T.any(::Stripe::Customer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def self.create(params = {}, opts = {}); end + + # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + # funding instructions will be created. If funding instructions have already been created for a given customer, the same + # funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + sig { + params(params: T.any(::Stripe::Customer::CreateFundingInstructionsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FundingInstructions) + } + def create_funding_instructions(params = {}, opts = {}); end + + # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + # funding instructions will be created. If funding instructions have already been created for a given customer, the same + # funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + sig { + params(customer: String, params: T.any(::Stripe::Customer::CreateFundingInstructionsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FundingInstructions) + } + def self.create_funding_instructions(customer, params = {}, opts = {}); end + + # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. + sig { + params(id: String, params: T.any(::Stripe::Customer::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def self.delete(id, params = {}, opts = {}); end + + # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. + sig { + params(params: T.any(::Stripe::Customer::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def delete(params = {}, opts = {}); end + + # Removes the currently applied discount on a customer. + sig { + params(params: T.any(::Stripe::Customer::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount) + } + def delete_discount(params = {}, opts = {}); end + + # Removes the currently applied discount on a customer. + sig { + params(customer: String, params: T.any(::Stripe::Customer::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount) + } + def self.delete_discount(customer, params = {}, opts = {}); end + + # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. + sig { + params(params: T.any(::Stripe::Customer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Returns a list of PaymentMethods for a given Customer + sig { + params(params: T.any(::Stripe::Customer::ListPaymentMethodsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_payment_methods(params = {}, opts = {}); end + + # Returns a list of PaymentMethods for a given Customer + sig { + params(customer: String, params: T.any(::Stripe::Customer::ListPaymentMethodsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_payment_methods(customer, params = {}, opts = {}); end + + # Retrieves a customer's cash balance. + sig { + params(customer: String, params: T.any(::Stripe::Customer::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).void + } + def self.retrieve_cash_balance(customer, params = {}, opts = {}); end + + # Retrieves a PaymentMethod object for a given Customer. + sig { + params(payment_method: String, params: T.any(::Stripe::Customer::RetrievePaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def retrieve_payment_method(payment_method, params = {}, opts = {}); end + + # Retrieves a PaymentMethod object for a given Customer. + sig { + params(customer: String, payment_method: String, params: T.any(::Stripe::Customer::RetrievePaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def self.retrieve_payment_method(customer, payment_method, params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior. + # + # This request accepts mostly the same arguments as the customer creation call. + sig { + params(id: String, params: T.any(::Stripe::Customer::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def self.update(id, params = {}, opts = {}); end + + # Changes the settings on a customer's cash balance. + sig { + params(customer: String, params: T.any(::Stripe::Customer::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).void + } + def self.update_cash_balance(customer, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_balance_transaction.rbi b/rbi/stripe/resources/customer_balance_transaction.rbi index 0dd62d98b..81916e307 100644 --- a/rbi/stripe/resources/customer_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_balance_transaction.rbi @@ -10,44 +10,44 @@ module Stripe # # Related guide: [Customer balance](https://stripe.com/docs/billing/customer/balance) class CustomerBalanceTransaction < APIResource - sig { returns(Integer) } # The amount of the transaction. A negative value is a credit for the customer's balance, and a positive value is a debit to the customer's `balance`. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) } # The ID of the credit note (if any) related to the transaction. + sig { returns(T.nilable(T.any(String, Stripe::CreditNote))) } attr_reader :credit_note - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } # The ID of the customer the transaction belongs to. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(Integer) } # The customer's `balance` after the transaction was applied. A negative value decreases the amount due on the customer's next invoice. A positive value increases the amount due on the customer's next invoice. + sig { returns(Integer) } attr_reader :ending_balance - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # The ID of the invoice (if any) related to the transaction. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Transaction type: `adjustment`, `applied_to_invoice`, `credit_note`, `initial`, `invoice_overpaid`, `invoice_too_large`, `invoice_too_small`, `unspent_receiver_credit`, or `unapplied_from_invoice`. See the [Customer Balance page](https://stripe.com/docs/billing/customer/balance#types) to learn more about transaction types. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_cash_balance_transaction.rbi b/rbi/stripe/resources/customer_cash_balance_transaction.rbi index 4864d51b8..32f584722 100644 --- a/rbi/stripe/resources/customer_cash_balance_transaction.rbi +++ b/rbi/stripe/resources/customer_cash_balance_transaction.rbi @@ -9,119 +9,143 @@ module Stripe # to payments, and refunds to the customer. class CustomerCashBalanceTransaction < APIResource class AdjustedForOverdraft < Stripe::StripeObject + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds taken out of your Stripe balance. sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :balance_transaction + # The [Cash Balance Transaction](https://stripe.com/docs/api/cash_balance_transactions/object) that brought the customer balance negative, triggering the clawback of funds. sig { returns(T.any(String, Stripe::CustomerCashBalanceTransaction)) } attr_reader :linked_transaction end class AppliedToPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were applied to. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end class Funded < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The BIC of the bank of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :bic + # The last 4 digits of the IBAN of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end class GbBankTransfer < Stripe::StripeObject + # The last 4 digits of the account number of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :account_number_last4 + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name + # The sort code of the bank of the sender of the funding sig { returns(T.nilable(String)) } attr_reader :sort_code end class JpBankTransfer < Stripe::StripeObject + # The name of the bank of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :sender_bank + # The name of the bank branch of the sender of the funding. sig { returns(T.nilable(String)) } attr_reader :sender_branch + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end class UsBankTransfer < Stripe::StripeObject + # The banking network used for this funding. sig { returns(String) } attr_reader :network + # The full name of the sender, as supplied by the sending bank. sig { returns(T.nilable(String)) } attr_reader :sender_name end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer sig { returns(GbBankTransfer) } attr_reader :gb_bank_transfer + # Attribute for field jp_bank_transfer sig { returns(JpBankTransfer) } attr_reader :jp_bank_transfer + # The user-supplied reference field on the bank transfer. sig { returns(T.nilable(String)) } attr_reader :reference + # The funding method type used to fund the customer balance. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_transfer sig { returns(UsBankTransfer) } attr_reader :us_bank_transfer end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer end class RefundedFromPayment < Stripe::StripeObject + # The [Refund](https://stripe.com/docs/api/refunds/object) that moved these funds into the customer's cash balance. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund end class TransferredToBalance < Stripe::StripeObject + # The [Balance Transaction](https://stripe.com/docs/api/balance_transactions/object) that corresponds to funds transferred to your Stripe balance. sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :balance_transaction end class UnappliedFromPayment < Stripe::StripeObject + # The [Payment Intent](https://stripe.com/docs/api/payment_intents/object) that funds were unapplied from. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent end - sig { returns(AdjustedForOverdraft) } # Attribute for field adjusted_for_overdraft + sig { returns(AdjustedForOverdraft) } attr_reader :adjusted_for_overdraft - sig { returns(AppliedToPayment) } # Attribute for field applied_to_payment + sig { returns(AppliedToPayment) } attr_reader :applied_to_payment - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } # The customer whose available cash balance changed as a result of this transaction. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(Integer) } # The total available cash balance for the specified currency after this transaction was applied. Represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :ending_balance - sig { returns(Funded) } # Attribute for field funded + sig { returns(Funded) } attr_reader :funded - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Integer) } # The amount by which the cash balance changed, represented in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). A positive value represents funds being added to the cash balance, a negative value represents funds being removed from the cash balance. + sig { returns(Integer) } attr_reader :net_amount - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(RefundedFromPayment) } # Attribute for field refunded_from_payment + sig { returns(RefundedFromPayment) } attr_reader :refunded_from_payment - sig { returns(TransferredToBalance) } # Attribute for field transferred_to_balance + sig { returns(TransferredToBalance) } attr_reader :transferred_to_balance - sig { returns(String) } # The type of the cash balance transaction. New types may be added in future. See [Customer Balance](https://stripe.com/docs/payments/customer-balance#types) to learn more about these types. + sig { returns(String) } attr_reader :type - sig { returns(UnappliedFromPayment) } # Attribute for field unapplied_from_payment + sig { returns(UnappliedFromPayment) } attr_reader :unapplied_from_payment end end \ No newline at end of file diff --git a/rbi/stripe/resources/customer_session.rbi b/rbi/stripe/resources/customer_session.rbi index 55e768f7b..0b8e29b30 100644 --- a/rbi/stripe/resources/customer_session.rbi +++ b/rbi/stripe/resources/customer_session.rbi @@ -12,62 +12,185 @@ module Stripe class CustomerSession < APIResource class Components < Stripe::StripeObject class BuyButton < Stripe::StripeObject + # Whether the buy button is enabled. sig { returns(T::Boolean) } attr_reader :enabled end class PaymentElement < Stripe::StripeObject class Features < Stripe::StripeObject + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. sig { returns(T::Array[String]) } attr_reader :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. sig { returns(String) } attr_reader :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. sig { returns(T.nilable(Integer)) } attr_reader :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). sig { returns(String) } attr_reader :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. sig { returns(String) } attr_reader :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. sig { returns(T.nilable(String)) } attr_reader :payment_method_save_usage end + # Whether the Payment Element is enabled. sig { returns(T::Boolean) } attr_reader :enabled + # This hash defines whether the Payment Element supports certain features. sig { returns(T.nilable(Features)) } attr_reader :features end class PricingTable < Stripe::StripeObject + # Whether the pricing table is enabled. sig { returns(T::Boolean) } attr_reader :enabled end + # This hash contains whether the buy button is enabled. sig { returns(BuyButton) } attr_reader :buy_button + # This hash contains whether the Payment Element is enabled and the features it supports. sig { returns(PaymentElement) } attr_reader :payment_element + # This hash contains whether the pricing table is enabled. sig { returns(PricingTable) } attr_reader :pricing_table end - sig { returns(String) } # The client secret of this Customer Session. Used on the client to set up secure access to the given `customer`. # # The client secret can be used to provide access to `customer` from your frontend. It should not be stored, logged, or exposed to anyone other than the relevant customer. Make sure that you have TLS enabled on any page that includes the client secret. + sig { returns(String) } attr_reader :client_secret - sig { returns(Components) } # Configuration for the components supported by this Customer Session. + sig { returns(Components) } attr_reader :components - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.any(String, Stripe::Customer)) } # The Customer the Customer Session was created for. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(Integer) } # The timestamp at which this Customer Session will expire. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class BuyButton < Stripe::RequestParams + # Whether the buy button is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class PaymentElement < Stripe::RequestParams + class Features < Stripe::RequestParams + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + sig { returns(T::Array[String]) } + attr_accessor :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + sig { returns(String) } + attr_accessor :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + sig { returns(Integer) } + attr_accessor :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + sig { returns(String) } + attr_accessor :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + sig { returns(String) } + attr_accessor :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + sig { returns(String) } + attr_accessor :payment_method_save_usage + sig { + params(payment_method_allow_redisplay_filters: T::Array[String], payment_method_redisplay: String, payment_method_redisplay_limit: Integer, payment_method_remove: String, payment_method_save: String, payment_method_save_usage: String).void + } + def initialize( + payment_method_allow_redisplay_filters: nil, + payment_method_redisplay: nil, + payment_method_redisplay_limit: nil, + payment_method_remove: nil, + payment_method_save: nil, + payment_method_save_usage: nil + ); end + end + # Whether the Payment Element is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # This hash defines whether the Payment Element supports certain features. + sig { + returns(::Stripe::CustomerSession::CreateParams::Components::PaymentElement::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::CustomerSession::CreateParams::Components::PaymentElement::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PricingTable < Stripe::RequestParams + # Whether the pricing table is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # Configuration for buy button. + sig { returns(::Stripe::CustomerSession::CreateParams::Components::BuyButton) } + attr_accessor :buy_button + # Configuration for the Payment Element. + sig { returns(::Stripe::CustomerSession::CreateParams::Components::PaymentElement) } + attr_accessor :payment_element + # Configuration for the pricing table. + sig { returns(::Stripe::CustomerSession::CreateParams::Components::PricingTable) } + attr_accessor :pricing_table + sig { + params(buy_button: ::Stripe::CustomerSession::CreateParams::Components::BuyButton, payment_element: ::Stripe::CustomerSession::CreateParams::Components::PaymentElement, pricing_table: ::Stripe::CustomerSession::CreateParams::Components::PricingTable).void + } + def initialize(buy_button: nil, payment_element: nil, pricing_table: nil); end + end + # Configuration for each component. Exactly 1 component must be enabled. + sig { returns(::Stripe::CustomerSession::CreateParams::Components) } + attr_accessor :components + # The ID of an existing customer for which to create the Customer Session. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(components: ::Stripe::CustomerSession::CreateParams::Components, customer: String, expand: T::Array[String]).void + } + def initialize(components: nil, customer: nil, expand: nil); end + end + # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. + sig { + params(params: T.any(::Stripe::CustomerSession::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerSession) + } + def self.create(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/discount.rbi b/rbi/stripe/resources/discount.rbi index cc007e93d..f7c6b367e 100644 --- a/rbi/stripe/resources/discount.rbi +++ b/rbi/stripe/resources/discount.rbi @@ -8,46 +8,46 @@ module Stripe # # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) class Discount < StripeObject - sig { returns(T.nilable(String)) } # The Checkout session that this coupon is applied to, if it is applied to a particular session in payment mode. Will not be present for subscription mode. + sig { returns(T.nilable(String)) } attr_reader :checkout_session - sig { returns(Stripe::Coupon) } # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + sig { returns(Stripe::Coupon) } attr_reader :coupon - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The ID of the customer associated with this discount. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(Integer)) } # If the coupon has a duration of `repeating`, the date that this discount will end. If the coupon has a duration of `once` or `forever`, this attribute will be null. + sig { returns(T.nilable(Integer)) } attr_reader :end - sig { returns(String) } # The ID of the discount object. Discounts cannot be fetched by ID. Use `expand[]=discounts` in API calls to expand discount IDs in an array. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The invoice that the discount's coupon was applied to, if it was applied directly to a particular invoice. - attr_reader :invoice sig { returns(T.nilable(String)) } + attr_reader :invoice # The invoice item `id` (or invoice line item `id` for invoice line items of type='subscription') that the discount's coupon was applied to, if it was applied directly to a particular invoice item or invoice line item. + sig { returns(T.nilable(String)) } attr_reader :invoice_item - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } # The promotion code applied to create this discount. + sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code - sig { returns(Integer) } # Date that the coupon was applied. + sig { returns(Integer) } attr_reader :start - sig { returns(T.nilable(String)) } # The subscription that this coupon is applied to, if it is applied to a particular subscription. - attr_reader :subscription sig { returns(T.nilable(String)) } + attr_reader :subscription # The subscription item that this coupon is applied to, if it is applied to a particular subscription item. + sig { returns(T.nilable(String)) } attr_reader :subscription_item - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/dispute.rbi b/rbi/stripe/resources/dispute.rbi index ad7c74254..16957aacf 100644 --- a/rbi/stripe/resources/dispute.rbi +++ b/rbi/stripe/resources/dispute.rbi @@ -14,254 +14,751 @@ module Stripe class VisaCompellingEvidence3 < Stripe::StripeObject class DisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # User Account ID used to log into business platform. Must be recognizable by the user. sig { returns(T.nilable(String)) } attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_id + # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip + # Categorization of disputed payment. sig { returns(T.nilable(String)) } attr_reader :merchandise_or_services + # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class PriorUndisputedTransaction < Stripe::StripeObject class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. sig { returns(String) } attr_reader :charge + # User Account ID used to log into business platform. Must be recognizable by the user. sig { returns(T.nilable(String)) } attr_reader :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. sig { returns(T.nilable(String)) } attr_reader :customer_device_id + # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address + # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip + # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T.nilable(DisputedTransaction)) } attr_reader :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T::Array[PriorUndisputedTransaction]) } attr_reader :prior_undisputed_transactions end class VisaCompliance < Stripe::StripeObject + # A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. sig { returns(T::Boolean) } attr_reader :fee_acknowledged end + # Attribute for field visa_compelling_evidence_3 sig { returns(VisaCompellingEvidence3) } attr_reader :visa_compelling_evidence_3 + # Attribute for field visa_compliance sig { returns(VisaCompliance) } attr_reader :visa_compliance end + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. sig { returns(T.nilable(String)) } attr_reader :access_activity_log + # The billing address provided by the customer. sig { returns(T.nilable(String)) } attr_reader :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. sig { returns(T.nilable(String)) } attr_reader :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. sig { returns(T.nilable(String)) } attr_reader :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :customer_communication + # The email address of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_email_address + # The name of the customer. sig { returns(T.nilable(String)) } attr_reader :customer_name + # The IP address that the customer used when making the purchase. sig { returns(T.nilable(String)) } attr_reader :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. sig { returns(T.nilable(String)) } attr_reader :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. sig { returns(T.nilable(String)) } attr_reader :duplicate_charge_id + # Attribute for field enhanced_evidence sig { returns(EnhancedEvidence) } attr_reader :enhanced_evidence + # A description of the product or service that was sold. sig { returns(T.nilable(String)) } attr_reader :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. sig { returns(T.nilable(String)) } attr_reader :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. sig { returns(T.nilable(String)) } attr_reader :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. sig { returns(T.nilable(String)) } attr_reader :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. sig { returns(T.nilable(String)) } attr_reader :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. sig { returns(T.nilable(String)) } attr_reader :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :uncategorized_file + # Any additional evidence or statements. sig { returns(T.nilable(String)) } attr_reader :uncategorized_text end class EvidenceDetails < Stripe::StripeObject class EnhancedEligibility < Stripe::StripeObject class VisaCompellingEvidence3 < Stripe::StripeObject + # List of actions required to qualify dispute for Visa Compelling Evidence 3.0 evidence submission. sig { returns(T::Array[String]) } attr_reader :required_actions + # Visa Compelling Evidence 3.0 eligibility status. sig { returns(String) } attr_reader :status end class VisaCompliance < Stripe::StripeObject + # Visa Compelling Evidence 3.0 eligibility status. sig { returns(String) } attr_reader :status end + # Attribute for field visa_compelling_evidence_3 sig { returns(VisaCompellingEvidence3) } attr_reader :visa_compelling_evidence_3 + # Attribute for field visa_compliance sig { returns(VisaCompliance) } attr_reader :visa_compliance end + # Date by which evidence must be submitted in order to successfully challenge dispute. Will be 0 if the customer's bank or credit card company doesn't allow a response for this particular dispute. sig { returns(T.nilable(Integer)) } attr_reader :due_by + # Attribute for field enhanced_eligibility sig { returns(EnhancedEligibility) } attr_reader :enhanced_eligibility + # Whether evidence has been staged for this dispute. sig { returns(T::Boolean) } attr_reader :has_evidence + # Whether the last evidence submission was submitted past the due date. Defaults to `false` if no evidence submissions have occurred. If `true`, then delivery of the latest evidence is *not* guaranteed. sig { returns(T::Boolean) } attr_reader :past_due + # The number of times evidence has been submitted. Typically, you may only submit evidence once. sig { returns(Integer) } attr_reader :submission_count end class PaymentMethodDetails < Stripe::StripeObject class AmazonPay < Stripe::StripeObject + # The AmazonPay dispute type, chargeback or claim sig { returns(T.nilable(String)) } attr_reader :dispute_type end class Card < Stripe::StripeObject + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand + # The type of dispute opened. Different case types may have varying fees and financial impact. sig { returns(String) } attr_reader :case_type + # The card network's specific dispute reason code, which maps to one of Stripe's primary dispute categories to simplify response guidance. The [Network code map](https://stripe.com/docs/disputes/categories#network-code-map) lists all available dispute reason codes by network. sig { returns(T.nilable(String)) } attr_reader :network_reason_code end class Klarna < Stripe::StripeObject + # The reason for the dispute as defined by Klarna sig { returns(T.nilable(String)) } attr_reader :reason_code end class Paypal < Stripe::StripeObject + # The ID of the dispute in PayPal. sig { returns(T.nilable(String)) } attr_reader :case_id + # The reason for the dispute as defined by PayPal sig { returns(T.nilable(String)) } attr_reader :reason_code end + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Payment method type. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Disputed amount. Usually the amount of the charge, but it can differ (usually because of currency fluctuation or because only part of the order is disputed). + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Array[Stripe::BalanceTransaction]) } # List of zero, one, or two balance transactions that show funds withdrawn and reinstated to your Stripe account as a result of this dispute. + sig { returns(T::Array[Stripe::BalanceTransaction]) } attr_reader :balance_transactions - sig { returns(T.any(String, Stripe::Charge)) } # ID of the charge that's disputed. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T::Array[String]) } # List of eligibility types that are included in `enhanced_evidence`. + sig { returns(T::Array[String]) } attr_reader :enhanced_eligibility_types - sig { returns(Evidence) } # Attribute for field evidence + sig { returns(Evidence) } attr_reader :evidence - sig { returns(EvidenceDetails) } # Attribute for field evidence_details + sig { returns(EvidenceDetails) } attr_reader :evidence_details - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # If true, it's still possible to refund the disputed payment. After the payment has been fully refunded, no further funds are withdrawn from your Stripe account as a result of this dispute. - attr_reader :is_charge_refundable sig { returns(T::Boolean) } + attr_reader :is_charge_refundable # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } # Network-dependent reason code for the dispute. + sig { returns(T.nilable(String)) } attr_reader :network_reason_code - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } # ID of the PaymentIntent that's disputed. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(PaymentMethodDetails) } # Attribute for field payment_method_details + sig { returns(PaymentMethodDetails) } attr_reader :payment_method_details - sig { returns(String) } # Reason given by cardholder for dispute. Possible values are `bank_cannot_process`, `check_returned`, `credit_not_processed`, `customer_initiated`, `debit_not_authorized`, `duplicate`, `fraudulent`, `general`, `incorrect_account_details`, `insufficient_funds`, `product_not_received`, `product_unacceptable`, `subscription_canceled`, or `unrecognized`. Learn more about [dispute reasons](https://stripe.com/docs/disputes/categories). - attr_reader :reason sig { returns(String) } + attr_reader :reason # Current status of dispute. Possible values are `warning_needs_response`, `warning_under_review`, `warning_closed`, `needs_response`, `under_review`, `won`, or `lost`. + sig { returns(String) } attr_reader :status + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return disputes associated to the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return disputes that were created during the given date interval. + sig { returns(T.any(::Stripe::Dispute::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::Dispute::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class EnhancedEvidence < Stripe::RequestParams + class VisaCompellingEvidence3 < Stripe::RequestParams + class DisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # User Account ID used to log into business platform. Must be recognizable by the user. + sig { returns(T.nilable(String)) } + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_id + # The email address of the customer. + sig { returns(T.nilable(String)) } + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + sig { returns(T.nilable(String)) } + attr_accessor :customer_purchase_ip + # Categorization of disputed payment. + sig { returns(String) } + attr_accessor :merchandise_or_services + # A description of the product or service that was sold. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress) + } + attr_accessor :shipping_address + sig { + params(customer_account_id: T.nilable(String), customer_device_fingerprint: T.nilable(String), customer_device_id: T.nilable(String), customer_email_address: T.nilable(String), customer_purchase_ip: T.nilable(String), merchandise_or_services: String, product_description: T.nilable(String), shipping_address: ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress).void + } + def initialize( + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + merchandise_or_services: nil, + product_description: nil, + shipping_address: nil + ); end + end + class PriorUndisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + sig { returns(String) } + attr_accessor :charge + # User Account ID used to log into business platform. Must be recognizable by the user. + sig { returns(T.nilable(String)) } + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_id + # The email address of the customer. + sig { returns(T.nilable(String)) } + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + sig { returns(T.nilable(String)) } + attr_accessor :customer_purchase_ip + # A description of the product or service that was sold. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress) + } + attr_accessor :shipping_address + sig { + params(charge: String, customer_account_id: T.nilable(String), customer_device_fingerprint: T.nilable(String), customer_device_id: T.nilable(String), customer_email_address: T.nilable(String), customer_purchase_ip: T.nilable(String), product_description: T.nilable(String), shipping_address: ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress).void + } + def initialize( + charge: nil, + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + product_description: nil, + shipping_address: nil + ); end + end + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction) + } + attr_accessor :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(T::Array[::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction]) + } + attr_accessor :prior_undisputed_transactions + sig { + params(disputed_transaction: ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction, prior_undisputed_transactions: T::Array[::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction]).void + } + def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil); end + end + class VisaCompliance < Stripe::RequestParams + # A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. + sig { returns(T::Boolean) } + attr_accessor :fee_acknowledged + sig { params(fee_acknowledged: T::Boolean).void } + def initialize(fee_acknowledged: nil); end + end + # Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3) + } + attr_accessor :visa_compelling_evidence_3 + # Evidence provided for Visa Compliance evidence submission. + sig { + returns(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance) + } + attr_accessor :visa_compliance + sig { + params(visa_compelling_evidence_3: ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3, visa_compliance: ::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance).void + } + def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil); end + end + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :access_activity_log + # The billing address provided by the customer. + sig { returns(String) } + attr_accessor :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + sig { returns(String) } + attr_accessor :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + sig { returns(String) } + attr_accessor :customer_communication + # The email address of the customer. + sig { returns(String) } + attr_accessor :customer_email_address + # The name of the customer. + sig { returns(String) } + attr_accessor :customer_name + # The IP address that the customer used when making the purchase. + sig { returns(String) } + attr_accessor :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + sig { returns(String) } + attr_accessor :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + sig { returns(String) } + attr_accessor :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + sig { returns(String) } + attr_accessor :duplicate_charge_id + # Additional evidence for qualifying evidence programs. + sig { returns(T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence)) } + attr_accessor :enhanced_evidence + # A description of the product or service that was sold. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + sig { returns(String) } + attr_accessor :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + sig { returns(String) } + attr_accessor :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + sig { returns(String) } + attr_accessor :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + sig { returns(String) } + attr_accessor :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. + sig { returns(String) } + attr_accessor :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. + sig { returns(String) } + attr_accessor :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + sig { returns(String) } + attr_accessor :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + sig { returns(String) } + attr_accessor :uncategorized_file + # Any additional evidence or statements. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :uncategorized_text + sig { + params(access_activity_log: String, billing_address: String, cancellation_policy: String, cancellation_policy_disclosure: String, cancellation_rebuttal: String, customer_communication: String, customer_email_address: String, customer_name: String, customer_purchase_ip: String, customer_signature: String, duplicate_charge_documentation: String, duplicate_charge_explanation: String, duplicate_charge_id: String, enhanced_evidence: T.nilable(::Stripe::Dispute::UpdateParams::Evidence::EnhancedEvidence), product_description: String, receipt: String, refund_policy: String, refund_policy_disclosure: String, refund_refusal_explanation: String, service_date: String, service_documentation: String, shipping_address: String, shipping_carrier: String, shipping_date: String, shipping_documentation: String, shipping_tracking_number: String, uncategorized_file: String, uncategorized_text: String).void + } + def initialize( + access_activity_log: nil, + billing_address: nil, + cancellation_policy: nil, + cancellation_policy_disclosure: nil, + cancellation_rebuttal: nil, + customer_communication: nil, + customer_email_address: nil, + customer_name: nil, + customer_purchase_ip: nil, + customer_signature: nil, + duplicate_charge_documentation: nil, + duplicate_charge_explanation: nil, + duplicate_charge_id: nil, + enhanced_evidence: nil, + product_description: nil, + receipt: nil, + refund_policy: nil, + refund_policy_disclosure: nil, + refund_refusal_explanation: nil, + service_date: nil, + service_documentation: nil, + shipping_address: nil, + shipping_carrier: nil, + shipping_date: nil, + shipping_documentation: nil, + shipping_tracking_number: nil, + uncategorized_file: nil, + uncategorized_text: nil + ); end + end + # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + sig { returns(::Stripe::Dispute::UpdateParams::Evidence) } + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + sig { returns(T::Boolean) } + attr_accessor :submit + sig { + params(evidence: ::Stripe::Dispute::UpdateParams::Evidence, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), submit: T::Boolean).void + } + def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil); end + end + class CloseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. + # + # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible. + sig { + params(params: T.any(::Stripe::Dispute::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute) + } + def close(params = {}, opts = {}); end + + # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. + # + # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible. + sig { + params(dispute: String, params: T.any(::Stripe::Dispute::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute) + } + def self.close(dispute, params = {}, opts = {}); end + + # Returns a list of your disputes. + sig { + params(params: T.any(::Stripe::Dispute::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. + # + # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories). + sig { + params(id: String, params: T.any(::Stripe::Dispute::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/active_entitlement.rbi b/rbi/stripe/resources/entitlements/active_entitlement.rbi index a62340126..4722dc77a 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement.rbi @@ -6,21 +6,60 @@ module Stripe module Entitlements # An active entitlement describes access to a feature for a customer. class ActiveEntitlement < APIResource - sig { returns(T.any(String, Stripe::Entitlements::Feature)) } # The [Feature](https://stripe.com/docs/api/entitlements/feature) that the customer is entitled to. + sig { returns(T.any(String, Stripe::Entitlements::Feature)) } attr_reader :feature - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # A unique key you provide as your own system identifier. This may be up to 80 characters. - attr_reader :lookup_key sig { returns(String) } + attr_reader :lookup_key # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class ListParams < Stripe::RequestParams + # The ID of the customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieve a list of active entitlements for a customer + sig { + params(params: T.any(::Stripe::Entitlements::ActiveEntitlement::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi index 44b1d8031..fb9d06064 100644 --- a/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi +++ b/rbi/stripe/resources/entitlements/active_entitlement_summary.rbi @@ -6,17 +6,17 @@ module Stripe module Entitlements # A summary of a customer's active entitlements. class ActiveEntitlementSummary < APIResource - sig { returns(String) } # The customer that is entitled to this feature. + sig { returns(String) } attr_reader :customer - sig { returns(Stripe::ListObject) } # The list of entitlements this customer has. + sig { returns(Stripe::ListObject) } attr_reader :entitlements - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/entitlements/feature.rbi b/rbi/stripe/resources/entitlements/feature.rbi index aecd2d91b..ca60f06b3 100644 --- a/rbi/stripe/resources/entitlements/feature.rbi +++ b/rbi/stripe/resources/entitlements/feature.rbi @@ -7,27 +7,118 @@ module Stripe # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. class Feature < APIResource - sig { returns(T::Boolean) } # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # A unique key you provide as your own system identifier. This may be up to 80 characters. + sig { returns(String) } attr_reader :lookup_key - sig { returns(T::Hash[String, String]) } # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The feature's name, for your own purpose, not meant to be displayable to the customer. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class ListParams < Stripe::RequestParams + # If set, filter results to only include features with the given archive status. + sig { returns(T::Boolean) } + attr_accessor :archived + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # If set, filter results to only include features with the given lookup_key. + sig { returns(String) } + attr_accessor :lookup_key + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(archived: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, lookup_key: String, starting_after: String).void + } + def initialize( + archived: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_key: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A unique key you provide as your own system identifier. This may be up to 80 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + sig { + params(expand: T::Array[String], lookup_key: String, metadata: T::Hash[String, String], name: String).void + } + def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), name: String).void + } + def initialize(active: nil, expand: nil, metadata: nil, name: nil); end + end + # Creates a feature + sig { + params(params: T.any(::Stripe::Entitlements::Feature::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature) + } + def self.create(params = {}, opts = {}); end + + # Retrieve a list of features + sig { + params(params: T.any(::Stripe::Entitlements::Feature::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Update a feature's metadata or permanently deactivate it. + sig { + params(id: String, params: T.any(::Stripe::Entitlements::Feature::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/ephemeral_key.rbi b/rbi/stripe/resources/ephemeral_key.rbi index 76524e224..10e038547 100644 --- a/rbi/stripe/resources/ephemeral_key.rbi +++ b/rbi/stripe/resources/ephemeral_key.rbi @@ -4,23 +4,41 @@ # typed: true module Stripe class EphemeralKey < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created # Time at which the key will expire. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :expires - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The key's secret. You can use this value to make authorized requests to the Stripe API. + sig { returns(String) } attr_reader :secret + class DeleteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Invalidates a short-lived API key for a given resource. + sig { + params(id: String, params: T.any(::Stripe::EphemeralKey::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey) + } + def self.delete(id, params = {}, opts = {}); end + + # Invalidates a short-lived API key for a given resource. + sig { + params(params: T.any(::Stripe::EphemeralKey::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey) + } + def delete(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/event.rbi b/rbi/stripe/resources/event.rbi index 390290e2a..7ec42d235 100644 --- a/rbi/stripe/resources/event.rbi +++ b/rbi/stripe/resources/event.rbi @@ -35,75 +35,156 @@ module Stripe # for 30 days. class Event < APIResource class Data < Stripe::StripeObject + # Object containing the API resource relevant to the event. For example, an `invoice.created` event will have a full [invoice object](https://stripe.com/docs/api#invoice_object) as the value of the object key. sig { returns(T::Hash[String, T.untyped]) } attr_reader :object + # Object containing the names of the updated attributes and their values prior to the event (only included in events of type `*.updated`). If an array attribute has any updated elements, this object contains the entire array. In Stripe API versions 2017-04-06 or earlier, an updated array attribute in this object includes only the updated array elements. sig { returns(T::Hash[String, T.untyped]) } attr_reader :previous_attributes end class Reason < Stripe::StripeObject class AutomationAction < Stripe::StripeObject class StripeSendWebhookCustomEvent < Stripe::StripeObject + # Set of key-value pairs attached to the action when creating an Automation. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :custom_data end + # Attribute for field stripe_send_webhook_custom_event sig { returns(StripeSendWebhookCustomEvent) } attr_reader :stripe_send_webhook_custom_event + # The trigger name of the automation that triggered this action. + # Please visit [Revenue and retention automations](https://docs.stripe.com/billing/automations#choose-a-trigger) for all possible trigger names. sig { returns(String) } attr_reader :trigger + # The type of the `automation_action`. sig { returns(String) } attr_reader :type end class Request < Stripe::StripeObject + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. sig { returns(T.nilable(String)) } attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. sig { returns(T.nilable(String)) } attr_reader :idempotency_key end + # Attribute for field automation_action sig { returns(AutomationAction) } attr_reader :automation_action + # Attribute for field request sig { returns(Request) } attr_reader :request + # The type of the reason for the event. sig { returns(String) } attr_reader :type end class Request < Stripe::StripeObject + # ID of the API request that caused the event. If null, the event was automatic (e.g., Stripe's automatic subscription handling). Request logs are available in the [dashboard](https://dashboard.stripe.com/logs), but currently not in the API. sig { returns(T.nilable(String)) } attr_reader :id + # The idempotency key transmitted during the request, if any. *Note: This property is populated only for events on or after May 23, 2017*. sig { returns(T.nilable(String)) } attr_reader :idempotency_key end - sig { returns(String) } # The connected account that originates the event. + sig { returns(String) } attr_reader :account - sig { returns(T.nilable(String)) } # The Stripe API version used to render `data`. This property is populated only for events on or after October 31, 2014. + sig { returns(T.nilable(String)) } attr_reader :api_version - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Data) } # Attribute for field data + sig { returns(Data) } attr_reader :data - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # Number of webhooks that haven't been successfully delivered (for example, to return a 20x response) to the URLs you specify. + sig { returns(Integer) } attr_reader :pending_webhooks - sig { returns(T.nilable(Reason)) } # Information about the action that causes the event. Only present when the event is triggered by an API request or an [Automation](https://docs.stripe.com/billing/automations) action. + sig { returns(T.nilable(Reason)) } attr_reader :reason - sig { returns(T.nilable(Request)) } # Information on the API request that triggers the event. + sig { returns(T.nilable(Request)) } attr_reader :request - sig { returns(String) } # Description of the event (for example, `invoice.created` or `charge.refunded`). + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return events that were created during the given date interval. + sig { returns(T.any(::Stripe::Event::ListParams::Created, Integer)) } + attr_accessor :created + # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. + sig { returns(T::Boolean) } + attr_accessor :delivery_success + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. + sig { returns(String) } + attr_accessor :type + # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. + sig { returns(T::Array[String]) } + attr_accessor :types + sig { + params(created: T.any(::Stripe::Event::ListParams::Created, Integer), delivery_success: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String, types: T::Array[String]).void + } + def initialize( + created: nil, + delivery_success: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + types: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + sig { + params(params: T.any(::Stripe::Event::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/exchange_rate.rbi b/rbi/stripe/resources/exchange_rate.rbi index f4510f618..ede663f05 100644 --- a/rbi/stripe/resources/exchange_rate.rbi +++ b/rbi/stripe/resources/exchange_rate.rbi @@ -30,14 +30,44 @@ module Stripe # # *Using this Exchange Rates API beta for any purpose other than to transact on Stripe is strictly prohibited and constitutes a violation of Stripe's terms of service.* class ExchangeRate < APIResource - sig { returns(String) } # Unique identifier for the object. Represented as the three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, Float]) } # Hash where the keys are supported currencies and the values are the exchange rate at which the base id currency converts to the key currency. + sig { returns(T::Hash[String, Float]) } attr_reader :rates + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. + sig { + params(params: T.any(::Stripe::ExchangeRate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/file.rbi b/rbi/stripe/resources/file.rbi index 0523f5149..38fe83f8c 100644 --- a/rbi/stripe/resources/file.rbi +++ b/rbi/stripe/resources/file.rbi @@ -11,38 +11,138 @@ module Stripe # # Related guide: [File upload guide](https://stripe.com/docs/file-upload) class File < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } # The file expires and isn't available at this time in epoch seconds. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(T.nilable(String)) } # The suitable name for saving the file to a filesystem. + sig { returns(T.nilable(String)) } attr_reader :filename - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(Stripe::ListObject)) } # A list of [file links](https://stripe.com/docs/api#file_links) that point at this file. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :links - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + sig { returns(String) } attr_reader :purpose - sig { returns(Integer) } # The size of the file object in bytes. + sig { returns(Integer) } attr_reader :size - sig { returns(T.nilable(String)) } # A suitable title for the document. - attr_reader :title sig { returns(T.nilable(String)) } + attr_reader :title # The returned file type (for example, `csv`, `pdf`, `jpg`, or `png`). - attr_reader :type sig { returns(T.nilable(String)) } + attr_reader :type # Use your live secret API key to download the file from this URL. + sig { returns(T.nilable(String)) } attr_reader :url + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return files that were created during the given date interval. + sig { returns(T.any(::Stripe::File::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + sig { returns(String) } + attr_accessor :purpose + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::File::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, purpose: String, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + purpose: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class FileLinkData < Stripe::RequestParams + # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + sig { returns(T::Boolean) } + attr_accessor :create + # The link isn't available after this future timestamp. + sig { returns(Integer) } + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(create: T::Boolean, expires_at: Integer, metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(create: nil, expires_at: nil, metadata: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. + sig { returns(T.untyped) } + attr_accessor :file + # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + sig { returns(::Stripe::File::CreateParams::FileLinkData) } + attr_accessor :file_link_data + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + sig { returns(String) } + attr_accessor :purpose + sig { + params(expand: T::Array[String], file: T.untyped, file_link_data: ::Stripe::File::CreateParams::FileLinkData, purpose: String).void + } + def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. + # + # All of Stripe's officially supported Client libraries support sending multipart/form-data. + sig { + params(params: T.any(::Stripe::File::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::File) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. + sig { + params(params: T.any(::Stripe::File::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/file_link.rbi b/rbi/stripe/resources/file_link.rbi index d371d092b..7158108cb 100644 --- a/rbi/stripe/resources/file_link.rbi +++ b/rbi/stripe/resources/file_link.rbi @@ -7,32 +7,140 @@ module Stripe # create a `FileLink`. `FileLink`s contain a URL that you can use to # retrieve the contents of the file without authentication. class FileLink < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Boolean) } # Returns if the link is already expired. + sig { returns(T::Boolean) } attr_reader :expired - sig { returns(T.nilable(Integer)) } # Time that the link expires. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(T.any(String, Stripe::File)) } # The file object this link points to. + sig { returns(T.any(String, Stripe::File)) } attr_reader :file - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The publicly accessible URL to download the file. + sig { returns(T.nilable(String)) } attr_reader :url + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return links that were created during the given date interval. + sig { returns(T.any(::Stripe::FileLink::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Filter links by their expiration status. By default, Stripe returns all links. + sig { returns(T::Boolean) } + attr_accessor :expired + # Only return links for the given file. + sig { returns(String) } + attr_accessor :file + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::FileLink::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], expired: T::Boolean, file: String, limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + expired: nil, + file: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The link isn't usable after this future timestamp. + sig { returns(Integer) } + attr_accessor :expires_at + # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + sig { returns(String) } + attr_accessor :file + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], expires_at: Integer, file: String, metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], expires_at: T.nilable(T.any(String, Integer)), metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(expand: nil, expires_at: nil, metadata: nil); end + end + # Creates a new file link object. + sig { + params(params: T.any(::Stripe::FileLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of file links. + sig { + params(params: T.any(::Stripe::FileLink::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates an existing file link object. Expired links can no longer be updated. + sig { + params(id: String, params: T.any(::Stripe::FileLink::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account.rbi b/rbi/stripe/resources/financial_connections/account.rbi index 8162395c5..81bd9c4d9 100644 --- a/rbi/stripe/resources/financial_connections/account.rbi +++ b/rbi/stripe/resources/financial_connections/account.rbi @@ -7,116 +7,150 @@ module Stripe # A Financial Connections Account represents an account that exists outside of Stripe, to which you have been granted some degree of access. class Account < APIResource class AccountHolder < Stripe::StripeObject + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer + # Type of account holder that this account belongs to. sig { returns(String) } attr_reader :type end class Balance < Stripe::StripeObject class Cash < Stripe::StripeObject + # The funds available to the account holder. Typically this is the current balance after subtracting any outbound pending transactions and adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :available end class Credit < Stripe::StripeObject + # The credit that has been used by the account holder. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T.nilable(T::Hash[String, Integer])) } attr_reader :used end + # The time that the external institution calculated this balance. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :as_of + # Attribute for field cash sig { returns(Cash) } attr_reader :cash + # Attribute for field credit sig { returns(Credit) } attr_reader :credit + # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. + # + # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + # + # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. sig { returns(T::Hash[String, Integer]) } attr_reader :current + # The `type` of the balance. An additional hash is included on the balance with a name matching this value. sig { returns(String) } attr_reader :type end class BalanceRefresh < Stripe::StripeObject + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class InferredBalancesRefresh < Stripe::StripeObject + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next inferred balance refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class OwnershipRefresh < Stripe::StripeObject + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next ownership refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end class TransactionRefresh < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id + # The time at which the last refresh attempt was initiated. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :last_attempted_at + # Time at which the next transaction refresh can be initiated. This value will be `null` when `status` is `pending`. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :next_refresh_available_at + # The status of the last refresh attempt. sig { returns(String) } attr_reader :status end - sig { returns(T.nilable(AccountHolder)) } # The account holder that this account belongs to. + sig { returns(T.nilable(AccountHolder)) } attr_reader :account_holder - sig { returns(T.nilable(Balance)) } # The most recent information about the account's balance. + sig { returns(T.nilable(Balance)) } attr_reader :balance - sig { returns(T.nilable(BalanceRefresh)) } # The state of the most recent attempt to refresh the account balance. + sig { returns(T.nilable(BalanceRefresh)) } attr_reader :balance_refresh - sig { returns(String) } # The type of the account. Account category is further divided in `subcategory`. + sig { returns(String) } attr_reader :category - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # A human-readable name that has been assigned to this account, either by the account holder or by the institution. + sig { returns(T.nilable(String)) } attr_reader :display_name - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(InferredBalancesRefresh)) } # The state of the most recent attempt to refresh the account's inferred balance history. + sig { returns(T.nilable(InferredBalancesRefresh)) } attr_reader :inferred_balances_refresh - sig { returns(String) } # The name of the institution that holds this account. + sig { returns(String) } attr_reader :institution_name - sig { returns(T.nilable(String)) } # The last 4 digits of the account number. If present, this will be 4 numeric characters. + sig { returns(T.nilable(String)) } attr_reader :last4 - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) } # The most recent information about the account's owners. + sig { returns(T.nilable(T.any(String, Stripe::FinancialConnections::AccountOwnership))) } attr_reader :ownership - sig { returns(T.nilable(OwnershipRefresh)) } # The state of the most recent attempt to refresh the account owners. + sig { returns(T.nilable(OwnershipRefresh)) } attr_reader :ownership_refresh - sig { returns(T.nilable(T::Array[String])) } # The list of permissions granted by this account. + sig { returns(T.nilable(T::Array[String])) } attr_reader :permissions - sig { returns(String) } # The status of the link to the account. - attr_reader :status sig { returns(String) } + attr_reader :status # If `category` is `cash`, one of: # # - `checking` @@ -131,16 +165,194 @@ module Stripe # - `other` # # If `category` is `investment` or `other`, this will be `other`. + sig { returns(String) } attr_reader :subcategory - sig { returns(T.nilable(T::Array[String])) } # The list of data refresh subscriptions requested on this account. + sig { returns(T.nilable(T::Array[String])) } attr_reader :subscriptions - sig { returns(T::Array[String]) } # The [PaymentMethod type](https://stripe.com/docs/api/payment_methods/object#payment_method_object-type)(s) that can be created from this account. + sig { returns(T::Array[String]) } attr_reader :supported_payment_method_types - sig { returns(T.nilable(TransactionRefresh)) } # The state of the most recent attempt to refresh the account transactions. + sig { returns(T.nilable(TransactionRefresh)) } attr_reader :transaction_refresh + class ListParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. + sig { returns(String) } + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. + sig { returns(String) } + attr_accessor :customer + sig { params(account: String, customer: String).void } + def initialize(account: nil, customer: nil); end + end + # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. + sig { returns(::Stripe::FinancialConnections::Account::ListParams::AccountHolder) } + attr_accessor :account_holder + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # If present, only return accounts that were collected as part of the given session. + sig { returns(String) } + attr_accessor :session + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(account_holder: ::Stripe::FinancialConnections::Account::ListParams::AccountHolder, ending_before: String, expand: T::Array[String], limit: Integer, session: String, starting_after: String).void + } + def initialize( + account_holder: nil, + ending_before: nil, + expand: nil, + limit: nil, + session: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListOwnersParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The ID of the ownership object to fetch owners from. + sig { returns(String) } + attr_accessor :ownership + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, ownership: String, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + ownership: nil, + starting_after: nil + ); end + end + class DisconnectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RefreshAccountParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The list of account features that you would like to refresh. + sig { returns(T::Array[String]) } + attr_accessor :features + sig { params(expand: T::Array[String], features: T::Array[String]).void } + def initialize(expand: nil, features: nil); end + end + class SubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The list of account features to which you would like to subscribe. + sig { returns(T::Array[String]) } + attr_accessor :features + sig { params(expand: T::Array[String], features: T::Array[String]).void } + def initialize(expand: nil, features: nil); end + end + class UnsubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The list of account features from which you would like to unsubscribe. + sig { returns(T::Array[String]) } + attr_accessor :features + sig { params(expand: T::Array[String], features: T::Array[String]).void } + def initialize(expand: nil, features: nil); end + end + # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). + sig { + params(params: T.any(::Stripe::FinancialConnections::Account::DisconnectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def disconnect(params = {}, opts = {}); end + + # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::Account::DisconnectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def self.disconnect(account, params = {}, opts = {}); end + + # Returns a list of Financial Connections Account objects. + sig { + params(params: T.any(::Stripe::FinancialConnections::Account::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Lists all owners for a given Account + sig { + params(params: T.any(::Stripe::FinancialConnections::Account::ListOwnersParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_owners(params = {}, opts = {}); end + + # Lists all owners for a given Account + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::Account::ListOwnersParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_owners(account, params = {}, opts = {}); end + + # Refreshes the data associated with a Financial Connections Account. + sig { + params(params: T.any(::Stripe::FinancialConnections::Account::RefreshAccountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def refresh_account(params = {}, opts = {}); end + + # Refreshes the data associated with a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::Account::RefreshAccountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def self.refresh_account(account, params = {}, opts = {}); end + + # Subscribes to periodic refreshes of data associated with a Financial Connections Account. + sig { + params(params: T.any(::Stripe::FinancialConnections::Account::SubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def subscribe(params = {}, opts = {}); end + + # Subscribes to periodic refreshes of data associated with a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::Account::SubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def self.subscribe(account, params = {}, opts = {}); end + + # Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. + sig { + params(params: T.any(::Stripe::FinancialConnections::Account::UnsubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def unsubscribe(params = {}, opts = {}); end + + # Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::Account::UnsubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def self.unsubscribe(account, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi index 4c61210cc..b9965a54c 100644 --- a/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi +++ b/rbi/stripe/resources/financial_connections/account_inferred_balance.rbi @@ -6,21 +6,21 @@ module Stripe module FinancialConnections # A historical balance for the account on a particular day. It may be sourced from a balance snapshot provided by a financial institution, or inferred using transactions data. class AccountInferredBalance < APIResource - sig { returns(Integer) } # The time for which this balance was calculated, measured in seconds since the Unix epoch. If the balance was computed by Stripe and not provided directly by a financial institution, it will always be 23:59:59 UTC. + sig { returns(Integer) } attr_reader :as_of - sig { returns(T::Hash[String, Integer]) } # The balances owed to (or by) the account holder, before subtracting any outbound pending transactions or adding any inbound pending transactions. # # Each key is a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. # # Each value is a integer amount. A positive amount indicates money owed to the account holder. A negative amount indicates money owed by the account holder. + sig { returns(T::Hash[String, Integer]) } attr_reader :current - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/financial_connections/account_owner.rbi b/rbi/stripe/resources/financial_connections/account_owner.rbi index cc68f2f8d..7990b4e3f 100644 --- a/rbi/stripe/resources/financial_connections/account_owner.rbi +++ b/rbi/stripe/resources/financial_connections/account_owner.rbi @@ -6,29 +6,29 @@ module Stripe module FinancialConnections # Describes an owner of an account. class AccountOwner < StripeObject - sig { returns(T.nilable(String)) } # The email address of the owner. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # The full name of the owner. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The ownership object that this owner belongs to. + sig { returns(String) } attr_reader :ownership - sig { returns(T.nilable(String)) } # The raw phone number of the owner. - attr_reader :phone sig { returns(T.nilable(String)) } + attr_reader :phone # The raw physical address of the owner. + sig { returns(T.nilable(String)) } attr_reader :raw_address - sig { returns(T.nilable(Integer)) } # The timestamp of the refresh that updated this owner. + sig { returns(T.nilable(Integer)) } attr_reader :refreshed_at end end diff --git a/rbi/stripe/resources/financial_connections/account_ownership.rbi b/rbi/stripe/resources/financial_connections/account_ownership.rbi index 25918d1fa..2ea4836bc 100644 --- a/rbi/stripe/resources/financial_connections/account_ownership.rbi +++ b/rbi/stripe/resources/financial_connections/account_ownership.rbi @@ -6,17 +6,17 @@ module Stripe module FinancialConnections # Describes a snapshot of the owners of an account at a particular point in time. class AccountOwnership < StripeObject - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::ListObject) } # A paginated list of owners for this account. + sig { returns(Stripe::ListObject) } attr_reader :owners end end diff --git a/rbi/stripe/resources/financial_connections/institution.rbi b/rbi/stripe/resources/financial_connections/institution.rbi index 3474fadef..d06fe5b52 100644 --- a/rbi/stripe/resources/financial_connections/institution.rbi +++ b/rbi/stripe/resources/financial_connections/institution.rbi @@ -8,54 +8,92 @@ module Stripe class Institution < APIResource class Features < Stripe::StripeObject class Balances < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class Ownership < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class PaymentMethod < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end class Transactions < Stripe::StripeObject + # Whether the given feature is supported by this institution. sig { returns(T::Boolean) } attr_reader :supported end + # Attribute for field balances sig { returns(Balances) } attr_reader :balances + # Attribute for field ownership sig { returns(Ownership) } attr_reader :ownership + # Attribute for field payment_method sig { returns(PaymentMethod) } attr_reader :payment_method + # Attribute for field transactions sig { returns(Transactions) } attr_reader :transactions end - sig { returns(Features) } # Attribute for field features + sig { returns(Features) } attr_reader :features - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The name of this institution. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[String]) } # A list of routing numbers which are known to correspond to this institution. Due to the many to many relationship between institutions and routing numbers, this list may not be comprehensive and routing numbers may also be shared between institutions. + sig { returns(T::Array[String]) } attr_reader :routing_numbers - sig { returns(String) } # The status of this institution in the Financial Connections authentication flow. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(String)) } # A URL corresponding to this institution. This URL is also displayed in the authentication flow to help end users confirm that they are authenticating with the right institution. + sig { returns(T.nilable(String)) } attr_reader :url + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Financial Connections Institution objects. + sig { + params(params: T.any(::Stripe::FinancialConnections::Institution::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/session.rbi b/rbi/stripe/resources/financial_connections/session.rbi index 11a654d5f..50c648f06 100644 --- a/rbi/stripe/resources/financial_connections/session.rbi +++ b/rbi/stripe/resources/financial_connections/session.rbi @@ -7,76 +7,180 @@ module Stripe # A Financial Connections Session is the secure way to programmatically launch the client-side Stripe.js modal that lets your users link their accounts. class Session < APIResource class AccountHolder < Stripe::StripeObject + # The ID of the Stripe account this account belongs to. Should only be present if `account_holder.type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # ID of the Stripe customer this account belongs to. Present if and only if `account_holder.type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer + # Type of account holder that this account belongs to. sig { returns(String) } attr_reader :type end class Filters < Stripe::StripeObject + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. sig { returns(T.nilable(T::Array[String])) } attr_reader :account_subcategories + # List of countries from which to filter accounts. sig { returns(T.nilable(T::Array[String])) } attr_reader :countries + # Stripe ID of the institution with which the customer should be directed to log in. sig { returns(String) } attr_reader :institution end class Limits < Stripe::StripeObject + # The number of accounts that can be linked in this Session. sig { returns(Integer) } attr_reader :accounts end class ManualEntry < Stripe::StripeObject; end class StatusDetails < Stripe::StripeObject class Cancelled < Stripe::StripeObject + # The reason for the Session being cancelled. sig { returns(String) } attr_reader :reason end + # Attribute for field cancelled sig { returns(Cancelled) } attr_reader :cancelled end - sig { returns(T.nilable(AccountHolder)) } # The account holder for whom accounts are collected in this session. + sig { returns(T.nilable(AccountHolder)) } attr_reader :account_holder - sig { returns(Stripe::ListObject) } # The accounts that were collected as part of this Session. + sig { returns(Stripe::ListObject) } attr_reader :accounts - sig { returns(String) } # A value that will be passed to the client to launch the authentication flow. + sig { returns(String) } attr_reader :client_secret - sig { returns(Filters) } # Attribute for field filters + sig { returns(Filters) } attr_reader :filters - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Limits) } # Attribute for field limits + sig { returns(Limits) } attr_reader :limits - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(ManualEntry) } # Attribute for field manual_entry + sig { returns(ManualEntry) } attr_reader :manual_entry - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[String]) } # Permissions requested for accounts collected during this session. + sig { returns(T::Array[String]) } attr_reader :permissions - sig { returns(T.nilable(T::Array[String])) } # Data features requested to be retrieved upon account creation. + sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch - sig { returns(String) } # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. - attr_reader :return_url sig { returns(String) } + attr_reader :return_url # The current state of the session. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + sig { returns(String) } + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. + sig { returns(String) } + attr_accessor :customer + # Type of account holder to collect accounts for. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, customer: String, type: String).void } + def initialize(account: nil, customer: nil, type: nil); end + end + class Filters < Stripe::RequestParams + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # List of countries from which to collect accounts. + sig { returns(T::Array[String]) } + attr_accessor :countries + # Stripe ID of the institution with which the customer should be directed to log in. + sig { returns(String) } + attr_accessor :institution + sig { + params(account_subcategories: T::Array[String], countries: T::Array[String], institution: String).void + } + def initialize(account_subcategories: nil, countries: nil, institution: nil); end + end + class Limits < Stripe::RequestParams + # The number of accounts that can be linked in this Session. + sig { returns(Integer) } + attr_accessor :accounts + sig { params(accounts: Integer).void } + def initialize(accounts: nil); end + end + class ManualEntry < Stripe::RequestParams + # Whether manual entry will be handled by Stripe during the Session. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # The account holder to link accounts for. + sig { returns(::Stripe::FinancialConnections::Session::CreateParams::AccountHolder) } + attr_accessor :account_holder + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Filters to restrict the kinds of accounts to collect. + sig { returns(::Stripe::FinancialConnections::Session::CreateParams::Filters) } + attr_accessor :filters + # Settings for configuring Session-specific limits. + sig { returns(::Stripe::FinancialConnections::Session::CreateParams::Limits) } + attr_accessor :limits + # Settings for configuring manual entry of account details for this Session. + sig { returns(::Stripe::FinancialConnections::Session::CreateParams::ManualEntry) } + attr_accessor :manual_entry + # List of data features that you would like to request access to. + # + # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(account_holder: ::Stripe::FinancialConnections::Session::CreateParams::AccountHolder, expand: T::Array[String], filters: ::Stripe::FinancialConnections::Session::CreateParams::Filters, limits: ::Stripe::FinancialConnections::Session::CreateParams::Limits, manual_entry: ::Stripe::FinancialConnections::Session::CreateParams::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + account_holder: nil, + expand: nil, + filters: nil, + limits: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js. + sig { + params(params: T.any(::Stripe::FinancialConnections::Session::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Session) + } + def self.create(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/financial_connections/transaction.rbi b/rbi/stripe/resources/financial_connections/transaction.rbi index c5e6585d8..19fdca644 100644 --- a/rbi/stripe/resources/financial_connections/transaction.rbi +++ b/rbi/stripe/resources/financial_connections/transaction.rbi @@ -7,47 +7,121 @@ module Stripe # A Transaction represents a real transaction that affects a Financial Connections Account balance. class Transaction < APIResource class StatusTransitions < Stripe::StripeObject + # Time at which this transaction posted. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Time at which this transaction was voided. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :void_at end - sig { returns(String) } # The ID of the Financial Connections Account this transaction belongs to. + sig { returns(String) } attr_reader :account - sig { returns(Integer) } # The amount of this transaction, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # The description of this transaction. - attr_reader :description sig { returns(String) } + attr_reader :description # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The status of the transaction. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(Integer) } # Time at which the transaction was transacted. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :transacted_at - sig { returns(String) } # The token of the transaction refresh that last updated or created this transaction. + sig { returns(String) } attr_reader :transaction_refresh - sig { returns(Integer) } # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated + class ListParams < Stripe::RequestParams + class TransactedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class TransactionRefresh < Stripe::RequestParams + # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). + sig { returns(String) } + attr_accessor :after + sig { params(after: String).void } + def initialize(after: nil); end + end + # The ID of the Stripe account whose transactions will be retrieved. + sig { returns(String) } + attr_accessor :account + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: + sig { + returns(T.any(::Stripe::FinancialConnections::Transaction::ListParams::TransactedAt, Integer)) + } + attr_accessor :transacted_at + # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: + sig { returns(::Stripe::FinancialConnections::Transaction::ListParams::TransactionRefresh) } + attr_accessor :transaction_refresh + sig { + params(account: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, transacted_at: T.any(::Stripe::FinancialConnections::Transaction::ListParams::TransactedAt, Integer), transaction_refresh: ::Stripe::FinancialConnections::Transaction::ListParams::TransactionRefresh).void + } + def initialize( + account: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transacted_at: nil, + transaction_refresh: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Financial Connections Transaction objects. + sig { + params(params: T.any(::Stripe::FinancialConnections::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/forwarding/request.rbi b/rbi/stripe/resources/forwarding/request.rbi index 7f3373b2c..f02587a53 100644 --- a/rbi/stripe/resources/forwarding/request.rbi +++ b/rbi/stripe/resources/forwarding/request.rbi @@ -22,72 +22,198 @@ module Stripe # Related guide: [Forward card details to third-party API endpoints](https://docs.stripe.com/payments/forwarding). class Request < APIResource class RequestContext < Stripe::StripeObject + # The time it took in milliseconds for the destination endpoint to respond. sig { returns(Integer) } attr_reader :destination_duration + # The IP address of the destination. sig { returns(String) } attr_reader :destination_ip_address end class RequestDetails < Stripe::StripeObject class Header < Stripe::StripeObject + # The header name. sig { returns(String) } attr_reader :name + # The header value. sig { returns(String) } attr_reader :value end + # The body payload to send to the destination endpoint. sig { returns(String) } attr_reader :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. sig { returns(T::Array[Header]) } attr_reader :headers + # The HTTP method used to call the destination endpoint. sig { returns(String) } attr_reader :http_method end class ResponseDetails < Stripe::StripeObject class Header < Stripe::StripeObject + # The header name. sig { returns(String) } attr_reader :name + # The header value. sig { returns(String) } attr_reader :value end + # The response body from the destination endpoint to Stripe. sig { returns(String) } attr_reader :body + # HTTP headers that the destination endpoint returned. sig { returns(T::Array[Header]) } attr_reader :headers + # The HTTP status code that the destination endpoint returned. sig { returns(Integer) } attr_reader :status end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + sig { returns(String) } attr_reader :payment_method - sig { returns(T::Array[String]) } # The field kinds to be replaced in the forwarded request. + sig { returns(T::Array[String]) } attr_reader :replacements - sig { returns(T.nilable(RequestContext)) } # Context about the request from Stripe's servers to the destination endpoint. + sig { returns(T.nilable(RequestContext)) } attr_reader :request_context - sig { returns(T.nilable(RequestDetails)) } # The request that was sent to the destination endpoint. We redact any sensitive fields. + sig { returns(T.nilable(RequestDetails)) } attr_reader :request_details - sig { returns(T.nilable(ResponseDetails)) } # The response that the destination endpoint returned to us. We redact any sensitive fields. + sig { returns(T.nilable(ResponseDetails)) } attr_reader :response_details - sig { returns(T.nilable(String)) } # The destination URL for the forwarded request. Must be supported by the config. + sig { returns(T.nilable(String)) } attr_reader :url + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Return results where the `created` field is greater than this value. + sig { returns(Integer) } + attr_accessor :gt + # Return results where the `created` field is greater than or equal to this value. + sig { returns(Integer) } + attr_accessor :gte + # Return results where the `created` field is less than this value. + sig { returns(Integer) } + attr_accessor :lt + # Return results where the `created` field is less than or equal to this value. + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. + sig { returns(::Stripe::Forwarding::Request::ListParams::Created) } + attr_accessor :created + # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: ::Stripe::Forwarding::Request::ListParams::Created, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Request < Stripe::RequestParams + class Header < Stripe::RequestParams + # The header name. + sig { returns(String) } + attr_accessor :name + # The header value. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + # The body payload to send to the destination endpoint. + sig { returns(String) } + attr_accessor :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + sig { returns(T::Array[::Stripe::Forwarding::Request::CreateParams::Request::Header]) } + attr_accessor :headers + sig { + params(body: String, headers: T::Array[::Stripe::Forwarding::Request::CreateParams::Request::Header]).void + } + def initialize(body: nil, headers: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + sig { returns(String) } + attr_accessor :payment_method + # The field kinds to be replaced in the forwarded request. + sig { returns(T::Array[String]) } + attr_accessor :replacements + # The request body and headers to be sent to the destination endpoint. + sig { returns(::Stripe::Forwarding::Request::CreateParams::Request) } + attr_accessor :request + # The destination URL for the forwarded request. Must be supported by the config. + sig { returns(String) } + attr_accessor :url + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], payment_method: String, replacements: T::Array[String], request: ::Stripe::Forwarding::Request::CreateParams::Request, url: String).void + } + def initialize( + expand: nil, + metadata: nil, + payment_method: nil, + replacements: nil, + request: nil, + url: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a ForwardingRequest object. + sig { + params(params: T.any(::Stripe::Forwarding::Request::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Forwarding::Request) + } + def self.create(params = {}, opts = {}); end + + # Lists all ForwardingRequest objects. + sig { + params(params: T.any(::Stripe::Forwarding::Request::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/funding_instructions.rbi b/rbi/stripe/resources/funding_instructions.rbi index a2c73620f..ffc68028a 100644 --- a/rbi/stripe/resources/funding_instructions.rbi +++ b/rbi/stripe/resources/funding_instructions.rbi @@ -13,302 +13,425 @@ module Stripe class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The ABA account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The ABA routing number sig { returns(String) } attr_reader :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # The IBAN of the account. sig { returns(String) } attr_reader :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The three-digit bank code sig { returns(String) } attr_reader :bank_code + # The short banking institution name sig { returns(String) } attr_reader :bank_name + # The CLABE number sig { returns(String) } attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The SWIFT code sig { returns(String) } attr_reader :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name + # The account number sig { returns(T.nilable(String)) } attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code + # The bank name of the account sig { returns(T.nilable(String)) } attr_reader :bank_name + # The branch code of the account sig { returns(T.nilable(String)) } attr_reader :branch_code + # The branch name of the account sig { returns(T.nilable(String)) } attr_reader :branch_name end + # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. sig { returns(Iban) } attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. sig { returns(SortCode) } attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. sig { returns(Spei) } attr_reader :spei + # The payment networks supported by this FinancialAddress sig { returns(T::Array[String]) } attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. sig { returns(Swift) } attr_reader :swift + # The type of financial address sig { returns(String) } attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. sig { returns(Zengin) } attr_reader :zengin end + # The country of the bank account to fund sig { returns(String) } attr_reader :country + # A list of financial addresses that can be used to fund a particular balance sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses + # The bank_transfer type sig { returns(String) } attr_reader :type end - sig { returns(BankTransfer) } # Attribute for field bank_transfer + sig { returns(BankTransfer) } attr_reader :bank_transfer - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # The `funding_type` of the returned instructions + sig { returns(String) } attr_reader :funding_type - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/gift_cards/card.rbi b/rbi/stripe/resources/gift_cards/card.rbi index 066816800..4f0bdd438 100644 --- a/rbi/stripe/resources/gift_cards/card.rbi +++ b/rbi/stripe/resources/gift_cards/card.rbi @@ -9,63 +9,198 @@ module Stripe class Card < APIResource class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject + # The Stripe CheckoutSession that created this object. sig { returns(String) } attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item end class Order < Stripe::StripeObject + # The Stripe Order LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item + # The Stripe Order that created this object. sig { returns(String) } attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. sig { returns(String) } attr_reader :payment_intent end + # Attribute for field checkout sig { returns(Checkout) } attr_reader :checkout + # Attribute for field order sig { returns(Order) } attr_reader :order + # Attribute for field payment sig { returns(Payment) } attr_reader :payment + # The type of event that created this object. sig { returns(String) } attr_reader :type end - sig { returns(T::Boolean) } # Whether this gift card can be used or not. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } # The amount of funds available for new transactions. - attr_reader :amount_available sig { returns(Integer) } + attr_reader :amount_available # The amount of funds marked as held. + sig { returns(Integer) } attr_reader :amount_held - sig { returns(T.nilable(String)) } # Code used to redeem this gift card. + sig { returns(T.nilable(String)) } attr_reader :code - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CreatedBy)) } # The related Stripe objects that created this gift card. + sig { returns(T.nilable(CreatedBy)) } attr_reader :created_by - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::ListObject) } # Transactions on this gift card. + sig { returns(Stripe::ListObject) } attr_reader :transactions + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + sig { returns(String) } + attr_accessor :payment_intent + sig { params(payment_intent: String).void } + def initialize(payment_intent: nil); end + end + # The details for the payment that created this object. + sig { returns(::Stripe::GiftCards::Card::CreateParams::CreatedBy::Payment) } + attr_accessor :payment + # The type of event that created this object. + sig { returns(String) } + attr_accessor :type + sig { + params(payment: ::Stripe::GiftCards::Card::CreateParams::CreatedBy::Payment, type: String).void + } + def initialize(payment: nil, type: nil); end + end + # The active state for the new gift card, defaults to false. The active state can be updated after creation. + sig { returns(T::Boolean) } + attr_accessor :active + # Related objects which created this gift card. + sig { returns(::Stripe::GiftCards::Card::CreateParams::CreatedBy) } + attr_accessor :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The initial amount to load onto the new gift card, defaults to 0. + sig { returns(Integer) } + attr_accessor :initial_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(active: T::Boolean, created_by: ::Stripe::GiftCards::Card::CreateParams::CreatedBy, currency: String, expand: T::Array[String], initial_amount: Integer, metadata: T::Hash[String, String]).void + } + def initialize( + active: nil, + created_by: nil, + currency: nil, + expand: nil, + initial_amount: nil, + metadata: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # The new active state for the gift card. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(active: nil, expand: nil, metadata: nil); end + end + class ValidateParams < Stripe::RequestParams + # The gift card code to be validated. + sig { returns(String) } + attr_accessor :code + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The pin associated with the gift card. Not all gift cards have pins. + sig { returns(String) } + attr_accessor :giftcard_pin + sig { params(code: String, expand: T::Array[String], giftcard_pin: String).void } + def initialize(code: nil, expand: nil, giftcard_pin: nil); end + end + # Creates a new gift card object. + sig { + params(params: T.any(::Stripe::GiftCards::Card::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def self.create(params = {}, opts = {}); end + + # List gift cards for an account + sig { + params(params: T.any(::Stripe::GiftCards::Card::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Update a gift card + sig { + params(id: String, params: T.any(::Stripe::GiftCards::Card::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def self.update(id, params = {}, opts = {}); end + + # Validates a gift card code, returning the matching gift card object if it exists. + sig { + params(params: T.any(::Stripe::GiftCards::Card::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def self.validate(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/gift_cards/transaction.rbi b/rbi/stripe/resources/gift_cards/transaction.rbi index 8d486f84d..ae13eb921 100644 --- a/rbi/stripe/resources/gift_cards/transaction.rbi +++ b/rbi/stripe/resources/gift_cards/transaction.rbi @@ -13,66 +13,245 @@ module Stripe class Transaction < APIResource class CreatedBy < Stripe::StripeObject class Checkout < Stripe::StripeObject + # The Stripe CheckoutSession that created this object. sig { returns(String) } attr_reader :checkout_session + # The Stripe CheckoutSession LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item end class Order < Stripe::StripeObject + # The Stripe Order LineItem that created this object. sig { returns(T.nilable(String)) } attr_reader :line_item + # The Stripe Order that created this object. sig { returns(String) } attr_reader :order end class Payment < Stripe::StripeObject + # The PaymentIntent that created this object. sig { returns(String) } attr_reader :payment_intent end + # Attribute for field checkout sig { returns(Checkout) } attr_reader :checkout + # Attribute for field order sig { returns(Order) } attr_reader :order + # Attribute for field payment sig { returns(Payment) } attr_reader :payment + # The type of event that created this object. sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(Integer)) } # The amount of this transaction. A positive value indicates that funds were added to the gift card. A negative value indicates that funds were removed from the gift card. - attr_reader :amount sig { returns(T.nilable(Integer)) } + attr_reader :amount # Time at which the transaction was confirmed. Measured in seconds since the Unix epoch. - attr_reader :confirmed_at sig { returns(T.nilable(Integer)) } + attr_reader :confirmed_at # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :created - sig { returns(T.nilable(CreatedBy)) } # The related Stripe objects that created this gift card transaction. + sig { returns(T.nilable(CreatedBy)) } attr_reader :created_by - sig { returns(T.nilable(String)) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(T.nilable(String)) } + attr_reader :currency # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description sig { returns(T.nilable(String)) } + attr_reader :description # The gift card that this transaction occurred on + sig { returns(T.nilable(String)) } attr_reader :gift_card - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # Status of this transaction, one of `held`, `confirmed`, or `canceled`. - attr_reader :status sig { returns(T.nilable(String)) } + attr_reader :status # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(T.nilable(String)) } attr_reader :transfer_group + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The gift card to list transactions for. + sig { returns(String) } + attr_accessor :gift_card + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(ending_before: String, expand: T::Array[String], gift_card: String, limit: Integer, starting_after: String, transfer_group: String).void + } + def initialize( + ending_before: nil, + expand: nil, + gift_card: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + sig { returns(String) } + attr_accessor :payment_intent + sig { params(payment_intent: String).void } + def initialize(payment_intent: nil); end + end + # The details for the payment that created this object. + sig { returns(::Stripe::GiftCards::Transaction::CreateParams::CreatedBy::Payment) } + attr_accessor :payment + # The type of event that created this object. + sig { returns(String) } + attr_accessor :type + sig { + params(payment: ::Stripe::GiftCards::Transaction::CreateParams::CreatedBy::Payment, type: String).void + } + def initialize(payment: nil, type: nil); end + end + # The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds. + sig { returns(Integer) } + attr_accessor :amount + # Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the `amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card. + sig { returns(T::Boolean) } + attr_accessor :confirm + # Related objects which created this transaction. + sig { returns(::Stripe::GiftCards::Transaction::CreateParams::CreatedBy) } + attr_accessor :created_by + # The currency of the transaction. This must match the currency of the gift card. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The gift card to create a new transaction on. + sig { returns(String) } + attr_accessor :gift_card + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, confirm: T::Boolean, created_by: ::Stripe::GiftCards::Transaction::CreateParams::CreatedBy, currency: String, description: String, expand: T::Array[String], gift_card: String, metadata: T::Hash[String, String], transfer_group: String).void + } + def initialize( + amount: nil, + confirm: nil, + created_by: nil, + currency: nil, + description: nil, + expand: nil, + gift_card: nil, + metadata: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ConfirmParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancel a gift card transaction + sig { + params(params: T.any(::Stripe::GiftCards::Transaction::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def cancel(params = {}, opts = {}); end + + # Cancel a gift card transaction + sig { + params(id: String, params: T.any(::Stripe::GiftCards::Transaction::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def self.cancel(id, params = {}, opts = {}); end + + # Confirm a gift card transaction + sig { + params(params: T.any(::Stripe::GiftCards::Transaction::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def confirm(params = {}, opts = {}); end + + # Confirm a gift card transaction + sig { + params(id: String, params: T.any(::Stripe::GiftCards::Transaction::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def self.confirm(id, params = {}, opts = {}); end + + # Create a gift card transaction + sig { + params(params: T.any(::Stripe::GiftCards::Transaction::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def self.create(params = {}, opts = {}); end + + # List gift card transactions for a gift card + sig { + params(params: T.any(::Stripe::GiftCards::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Update a gift card transaction + sig { + params(id: String, params: T.any(::Stripe::GiftCards::Transaction::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/identity/verification_report.rbi b/rbi/stripe/resources/identity/verification_report.rbi index aa18b876f..bd64b6bac 100644 --- a/rbi/stripe/resources/identity/verification_report.rbi +++ b/rbi/stripe/resources/identity/verification_report.rbi @@ -18,207 +18,337 @@ module Stripe class VerificationReport < APIResource class Document < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Dob < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end class ExpirationDate < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class IssuedDate < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end + # Address as it appears in the document. sig { returns(T.nilable(Address)) } attr_reader :address + # Date of birth as it appears in the document. sig { returns(T.nilable(Dob)) } attr_reader :dob + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # Expiration date of the document. sig { returns(T.nilable(ExpirationDate)) } attr_reader :expiration_date + # Array of [File](https://stripe.com/docs/api/files) ids containing images for this document. sig { returns(T.nilable(T::Array[String])) } attr_reader :files + # First name as it appears in the document. sig { returns(T.nilable(String)) } attr_reader :first_name + # Issued date of the document. sig { returns(T.nilable(IssuedDate)) } attr_reader :issued_date + # Issuing country of the document. sig { returns(T.nilable(String)) } attr_reader :issuing_country + # Last name as it appears in the document. sig { returns(T.nilable(String)) } attr_reader :last_name + # Document ID number. sig { returns(T.nilable(String)) } attr_reader :number + # Status of this `document` check. sig { returns(String) } attr_reader :status + # Type of the document. sig { returns(T.nilable(String)) } attr_reader :type end class Email < Stripe::StripeObject class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # Email to be verified. sig { returns(T.nilable(String)) } attr_reader :email + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # Status of this `email` check. sig { returns(String) } attr_reader :status end class IdNumber < Stripe::StripeObject class Dob < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # Date of birth. sig { returns(T.nilable(Dob)) } attr_reader :dob + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # First name. sig { returns(T.nilable(String)) } attr_reader :first_name + # ID number. When `id_number_type` is `us_ssn`, only the last 4 digits are present. sig { returns(T.nilable(String)) } attr_reader :id_number + # Type of ID number. sig { returns(T.nilable(String)) } attr_reader :id_number_type + # Last name. sig { returns(T.nilable(String)) } attr_reader :last_name + # Status of this `id_number` check. sig { returns(String) } attr_reader :status end class Options < Stripe::StripeObject class Document < Stripe::StripeObject + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. sig { returns(T::Array[String]) } attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. sig { returns(T::Boolean) } attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. sig { returns(T::Boolean) } attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). sig { returns(T::Boolean) } attr_reader :require_matching_selfie end class IdNumber < Stripe::StripeObject; end + # Attribute for field document sig { returns(Document) } attr_reader :document + # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number end class Phone < Stripe::StripeObject class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # Phone to be verified. sig { returns(T.nilable(String)) } attr_reader :phone + # Status of this `phone` check. sig { returns(String) } attr_reader :status end class Selfie < Stripe::StripeObject class Error < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification failure. sig { returns(T.nilable(String)) } attr_reader :code + # A human-readable message giving the reason for the failure. These messages can be shown to your users. sig { returns(T.nilable(String)) } attr_reader :reason end + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the identity document used in this check. sig { returns(T.nilable(String)) } attr_reader :document + # Details on the verification error. Present when status is `unverified`. sig { returns(T.nilable(Error)) } attr_reader :error + # ID of the [File](https://stripe.com/docs/api/files) holding the image of the selfie used in this check. sig { returns(T.nilable(String)) } attr_reader :selfie + # Status of this `selfie` check. sig { returns(String) } attr_reader :status end - sig { returns(T.nilable(String)) } # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(T.nilable(String)) } attr_reader :client_reference_id - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Document) } # Result from a document check + sig { returns(Document) } attr_reader :document - sig { returns(Email) } # Result from a email check + sig { returns(Email) } attr_reader :email - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(IdNumber) } # Result from an id_number check + sig { returns(IdNumber) } attr_reader :id_number - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Options) } # Attribute for field options + sig { returns(Options) } attr_reader :options - sig { returns(Phone) } # Result from a phone check + sig { returns(Phone) } attr_reader :phone - sig { returns(Selfie) } # Result from a selfie check + sig { returns(Selfie) } attr_reader :selfie - sig { returns(String) } # Type of report. - attr_reader :type sig { returns(String) } + attr_reader :type # The configuration token of a verification flow from the dashboard. + sig { returns(String) } attr_reader :verification_flow - sig { returns(T.nilable(String)) } # ID of the VerificationSession that created this report. + sig { returns(T.nilable(String)) } attr_reader :verification_session + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Only return VerificationReports that were created during the given date interval. + sig { returns(T.any(::Stripe::Identity::VerificationReport::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return VerificationReports of this type + sig { returns(String) } + attr_accessor :type + # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + sig { returns(String) } + attr_accessor :verification_session + sig { + params(client_reference_id: String, created: T.any(::Stripe::Identity::VerificationReport::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String, verification_session: String).void + } + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + verification_session: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # List all verification reports. + sig { + params(params: T.any(::Stripe::Identity::VerificationReport::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/identity/verification_session.rbi b/rbi/stripe/resources/identity/verification_session.rbi index a6bb69001..cfae590d0 100644 --- a/rbi/stripe/resources/identity/verification_session.rbi +++ b/rbi/stripe/resources/identity/verification_session.rbi @@ -17,144 +17,502 @@ module Stripe # Related guide: [The Verification Sessions API](https://stripe.com/docs/identity/verification-sessions) class VerificationSession < APIResource class LastError < Stripe::StripeObject + # A short machine-readable string giving the reason for the verification or user-session failure. sig { returns(T.nilable(String)) } attr_reader :code + # A message that explains the reason for verification or user-session failure. sig { returns(T.nilable(String)) } attr_reader :reason end class Options < Stripe::StripeObject class Document < Stripe::StripeObject + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. sig { returns(T::Array[String]) } attr_reader :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. sig { returns(T::Boolean) } attr_reader :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. sig { returns(T::Boolean) } attr_reader :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). sig { returns(T::Boolean) } attr_reader :require_matching_selfie end class Email < Stripe::StripeObject + # Request one time password verification of `provided_details.email`. sig { returns(T::Boolean) } attr_reader :require_verification end class IdNumber < Stripe::StripeObject; end class Phone < Stripe::StripeObject + # Request one time password verification of `provided_details.phone`. sig { returns(T::Boolean) } attr_reader :require_verification end + # Attribute for field document sig { returns(Document) } attr_reader :document + # Attribute for field email sig { returns(Email) } attr_reader :email + # Attribute for field id_number sig { returns(IdNumber) } attr_reader :id_number + # Attribute for field phone sig { returns(Phone) } attr_reader :phone end class ProvidedDetails < Stripe::StripeObject + # Email of user being verified sig { returns(String) } attr_reader :email + # Phone number of user being verified sig { returns(String) } attr_reader :phone end class Redaction < Stripe::StripeObject + # Indicates whether this object and its related objects have been redacted or not. sig { returns(String) } attr_reader :status end class VerifiedOutputs < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Dob < Stripe::StripeObject + # Numerical day between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # Numerical month between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year. sig { returns(T.nilable(Integer)) } attr_reader :year end + # The user's verified address. sig { returns(T.nilable(Address)) } attr_reader :address + # The user’s verified date of birth. sig { returns(T.nilable(Dob)) } attr_reader :dob + # The user's verified email address sig { returns(T.nilable(String)) } attr_reader :email + # The user's verified first name. sig { returns(T.nilable(String)) } attr_reader :first_name + # The user's verified id number. sig { returns(T.nilable(String)) } attr_reader :id_number + # The user's verified id number type. sig { returns(T.nilable(String)) } attr_reader :id_number_type + # The user's verified last name. sig { returns(T.nilable(String)) } attr_reader :last_name + # The user's verified phone number sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(T.nilable(String)) } # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. - attr_reader :client_reference_id sig { returns(T.nilable(String)) } + attr_reader :client_reference_id # The short-lived client secret used by Stripe.js to [show a verification modal](https://stripe.com/docs/js/identity/modal) inside your app. This client secret expires after 24 hours and can only be used once. Don’t store it, log it, embed it in a URL, or expose it to anyone other than the user. Make sure that you have TLS enabled on any page that includes the client secret. Refer to our docs on [passing the client secret to the frontend](https://stripe.com/docs/identity/verification-sessions#client-secret) to learn more. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastError)) } # If present, this property tells you the last error encountered when processing the verification. + sig { returns(T.nilable(LastError)) } attr_reader :last_error - sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) } # ID of the most recent VerificationReport. [Learn more about accessing detailed verification results.](https://stripe.com/docs/identity/verification-sessions#results) + sig { returns(T.nilable(T.any(String, Stripe::Identity::VerificationReport))) } attr_reader :last_verification_report - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Options)) } # A set of options for the session’s verification checks. + sig { returns(T.nilable(Options)) } attr_reader :options - sig { returns(T.nilable(ProvidedDetails)) } # Details provided about the user being verified. These details may be shown to the user. + sig { returns(T.nilable(ProvidedDetails)) } attr_reader :provided_details - sig { returns(T.nilable(Redaction)) } # Redaction status of this VerificationSession. If the VerificationSession is not redacted, this field will be null. + sig { returns(T.nilable(Redaction)) } attr_reader :redaction - sig { returns(T.nilable(String)) } # Token referencing a Customer resource. + sig { returns(T.nilable(String)) } attr_reader :related_customer - sig { returns(String) } # Status of this VerificationSession. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). - attr_reader :status sig { returns(String) } + attr_reader :status # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } # The short-lived URL that you use to redirect a user to Stripe to submit their identity information. This URL expires after 48 hours and can only be used once. Don’t store it, log it, send it in emails or expose it to anyone other than the user. Refer to our docs on [verifying identity documents](https://stripe.com/docs/identity/verify-identity-documents?platform=web&type=redirect) to learn how to redirect users to Stripe. + sig { returns(T.nilable(String)) } attr_reader :url - sig { returns(String) } # The configuration token of a verification flow from the dashboard. + sig { returns(String) } attr_reader :verification_flow - sig { returns(T.nilable(VerifiedOutputs)) } # The user’s verified data. + sig { returns(T.nilable(VerifiedOutputs)) } attr_reader :verified_outputs + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Only return VerificationSessions that were created during the given date interval. + sig { + returns(T.any(::Stripe::Identity::VerificationSession::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Attribute for param field related_customer + sig { returns(String) } + attr_accessor :related_customer + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + sig { returns(String) } + attr_accessor :status + sig { + params(client_reference_id: String, created: T.any(::Stripe::Identity::VerificationSession::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, related_customer: String, starting_after: String, status: String).void + } + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + related_customer: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + sig { returns(T::Array[String]) } + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + sig { returns(T::Boolean) } + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + sig { returns(T::Boolean) } + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + sig { returns(T::Boolean) } + attr_accessor :require_matching_selfie + sig { + params(allowed_types: T::Array[String], require_id_number: T::Boolean, require_live_capture: T::Boolean, require_matching_selfie: T::Boolean).void + } + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ); end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + sig { + returns(T.nilable(::Stripe::Identity::VerificationSession::CreateParams::Options::Document)) + } + attr_accessor :document + sig { + params(document: T.nilable(::Stripe::Identity::VerificationSession::CreateParams::Options::Document)).void + } + def initialize(document: nil); end + end + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + sig { returns(String) } + attr_accessor :email + # Phone number of user being verified + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, phone: String).void } + def initialize(email: nil, phone: nil); end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A set of options for the session’s verification checks. + sig { returns(::Stripe::Identity::VerificationSession::CreateParams::Options) } + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + sig { returns(::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails) } + attr_accessor :provided_details + # Token referencing a Customer resource. + sig { returns(String) } + attr_accessor :related_customer + # The URL that the user will be redirected to upon completing the verification flow. + sig { returns(String) } + attr_accessor :return_url + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. + sig { returns(String) } + attr_accessor :type + # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + sig { returns(String) } + attr_accessor :verification_flow + sig { + params(client_reference_id: String, expand: T::Array[String], metadata: T::Hash[String, String], options: ::Stripe::Identity::VerificationSession::CreateParams::Options, provided_details: ::Stripe::Identity::VerificationSession::CreateParams::ProvidedDetails, related_customer: String, return_url: String, type: String, verification_flow: String).void + } + def initialize( + client_reference_id: nil, + expand: nil, + metadata: nil, + options: nil, + provided_details: nil, + related_customer: nil, + return_url: nil, + type: nil, + verification_flow: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + sig { returns(T::Array[String]) } + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + sig { returns(T::Boolean) } + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + sig { returns(T::Boolean) } + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + sig { returns(T::Boolean) } + attr_accessor :require_matching_selfie + sig { + params(allowed_types: T::Array[String], require_id_number: T::Boolean, require_live_capture: T::Boolean, require_matching_selfie: T::Boolean).void + } + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ); end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + sig { + returns(T.nilable(::Stripe::Identity::VerificationSession::UpdateParams::Options::Document)) + } + attr_accessor :document + sig { + params(document: T.nilable(::Stripe::Identity::VerificationSession::UpdateParams::Options::Document)).void + } + def initialize(document: nil); end + end + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + sig { returns(String) } + attr_accessor :email + # Phone number of user being verified + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, phone: String).void } + def initialize(email: nil, phone: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A set of options for the session’s verification checks. + sig { returns(::Stripe::Identity::VerificationSession::UpdateParams::Options) } + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + sig { returns(::Stripe::Identity::VerificationSession::UpdateParams::ProvidedDetails) } + attr_accessor :provided_details + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + sig { returns(String) } + attr_accessor :type + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], options: ::Stripe::Identity::VerificationSession::UpdateParams::Options, provided_details: ::Stripe::Identity::VerificationSession::UpdateParams::ProvidedDetails, type: String).void + } + def initialize( + expand: nil, + metadata: nil, + options: nil, + provided_details: nil, + type: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RedactParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work). + # + # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel). + sig { + params(params: T.any(::Stripe::Identity::VerificationSession::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def cancel(params = {}, opts = {}); end + + # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work). + # + # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel). + sig { + params(session: String, params: T.any(::Stripe::Identity::VerificationSession::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def self.cancel(session, params = {}, opts = {}); end + + # Creates a VerificationSession object. + # + # After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url. + # + # If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode. + # + # Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents) + sig { + params(params: T.any(::Stripe::Identity::VerificationSession::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of VerificationSessions + sig { + params(params: T.any(::Stripe::Identity::VerificationSession::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Redact a VerificationSession to remove all collected information from Stripe. This will redact + # the VerificationSession and all objects related to it, including VerificationReports, Events, + # request logs, etc. + # + # A VerificationSession object can be redacted when it is in requires_input or verified + # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action + # state will automatically cancel it. + # + # The redaction process may take up to four days. When the redaction process is in progress, the + # VerificationSession's redaction.status field will be set to processing; when the process is + # finished, it will change to redacted and an identity.verification_session.redacted event + # will be emitted. + # + # Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + # fields that contain personal data will be replaced by the string [redacted] or a similar + # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or + # used for any purpose. + # + # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact). + sig { + params(params: T.any(::Stripe::Identity::VerificationSession::RedactParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def redact(params = {}, opts = {}); end + + # Redact a VerificationSession to remove all collected information from Stripe. This will redact + # the VerificationSession and all objects related to it, including VerificationReports, Events, + # request logs, etc. + # + # A VerificationSession object can be redacted when it is in requires_input or verified + # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action + # state will automatically cancel it. + # + # The redaction process may take up to four days. When the redaction process is in progress, the + # VerificationSession's redaction.status field will be set to processing; when the process is + # finished, it will change to redacted and an identity.verification_session.redacted event + # will be emitted. + # + # Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + # fields that contain personal data will be replaced by the string [redacted] or a similar + # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or + # used for any purpose. + # + # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact). + sig { + params(session: String, params: T.any(::Stripe::Identity::VerificationSession::RedactParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def self.redact(session, params = {}, opts = {}); end + + # Updates a VerificationSession object. + # + # When the session status is requires_input, you can use this method to update the + # verification check and options. + sig { + params(id: String, params: T.any(::Stripe::Identity::VerificationSession::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice.rbi b/rbi/stripe/resources/invoice.rbi index 381e3c889..968f9ac53 100644 --- a/rbi/stripe/resources/invoice.rbi +++ b/rbi/stripe/resources/invoice.rbi @@ -37,132 +37,220 @@ module Stripe # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) class Invoice < APIResource class AmountsDue < Stripe::StripeObject + # Incremental amount due for this payment in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. sig { returns(Integer) } attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Date on which a payment plan’s payment is due. sig { returns(T.nilable(Integer)) } attr_reader :due_date + # Timestamp when the payment was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` sig { returns(String) } attr_reader :status end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. sig { returns(T.nilable(String)) } attr_reader :status end class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class CustomerAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end class FromInvoice < Stripe::StripeObject + # The relation between this invoice and the cloned invoice sig { returns(String) } attr_reader :action + # The invoice that was cloned. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class LastFinalizationError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end @@ -170,41 +258,53 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end + # Attribute for field installments sig { returns(Installments) } attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -214,234 +314,307 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Card)) } attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Konbini)) } attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. sig { returns(T.nilable(String)) } attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. sig { returns(T.nilable(String)) } attr_reader :page_size end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display + # Invoice pdf rendering options sig { returns(T.nilable(Pdf)) } attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. sig { returns(T.nilable(String)) } attr_reader :template + # Version of the rendering template that the invoice is using. sig { returns(T.nilable(Integer)) } attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject + # The time that the invoice draft was finalized. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at + # The time that the invoice was marked uncollectible. sig { returns(T.nilable(Integer)) } attr_reader :marked_uncollectible_at + # The time that the invoice was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The time that the invoice was voided. sig { returns(T.nilable(Integer)) } attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior + # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject + # The IDs of the line items that triggered the threshold invoice. sig { returns(T::Array[String]) } attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. sig { returns(Integer) } attr_reader :usage_gte end + # The total invoice amount threshold boundary if it triggered the threshold invoice. sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. sig { returns(T::Array[ItemReason]) } attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TotalTaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T.nilable(String)) } # The country of the business associated with this invoice, most often the business creating the invoice. - attr_reader :account_country sig { returns(T.nilable(String)) } + attr_reader :account_country # The public name of the business associated with this invoice, most often the business creating the invoice. + sig { returns(T.nilable(String)) } attr_reader :account_name - sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - sig { returns(Integer) } # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. - attr_reader :amount_due sig { returns(Integer) } + attr_reader :amount_due # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. - attr_reader :amount_overpaid sig { returns(Integer) } + attr_reader :amount_overpaid # The amount, in cents (or local equivalent), that was paid. - attr_reader :amount_paid sig { returns(Integer) } + attr_reader :amount_paid # The difference between amount_due and amount_paid, in cents (or local equivalent). - attr_reader :amount_remaining sig { returns(Integer) } + attr_reader :amount_remaining # This is the sum of all the shipping amounts. + sig { returns(Integer) } attr_reader :amount_shipping - sig { returns(T.nilable(T::Array[AmountsDue])) } # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + sig { returns(T.nilable(T::Array[AmountsDue])) } attr_reader :amounts_due - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the invoice. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(Integer) } # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + sig { returns(Integer) } attr_reader :attempt_count - sig { returns(T::Boolean) } # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. - attr_reader :attempted sig { returns(T::Boolean) } + attr_reader :attempted # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + sig { returns(T::Boolean) } attr_reader :auto_advance - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(Integer)) } # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + sig { returns(T.nilable(Integer)) } attr_reader :automatically_finalizes_at - sig { returns(T.nilable(String)) } # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -451,227 +624,8300 @@ module Stripe # * `subscription_threshold`: A subscription reached a billing threshold. # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + sig { returns(T.nilable(String)) } attr_reader :billing_reason - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } # ID of the latest charge generated for this invoice, if any. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - sig { returns(String) } # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + sig { returns(String) } attr_reader :collection_method - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T::Array[CustomField])) } # Custom fields displayed on the invoice. + sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The ID of the customer who will be billed. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(CustomerAddress)) } # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerAddress)) } attr_reader :customer_address - sig { returns(T.nilable(String)) } # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_email sig { returns(T.nilable(String)) } + attr_reader :customer_email # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_name sig { returns(T.nilable(String)) } + attr_reader :customer_name # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_phone - sig { returns(T.nilable(CustomerShipping)) } # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerShipping)) } attr_reader :customer_shipping - sig { returns(T.nilable(String)) } # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_tax_exempt - sig { returns(T.nilable(T::Array[CustomerTaxId])) } # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(T::Array[CustomerTaxId])) } attr_reader :customer_tax_ids - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :default_margins - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - sig { returns(T::Array[Stripe::TaxRate]) } # The tax rates applied to this invoice, if any. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(T.nilable(Integer)) } # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. - attr_reader :due_date sig { returns(T.nilable(Integer)) } + attr_reader :due_date # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - attr_reader :effective_at sig { returns(T.nilable(Integer)) } + attr_reader :effective_at # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(Integer)) } attr_reader :ending_balance - sig { returns(T.nilable(String)) } # Footer displayed on the invoice. + sig { returns(T.nilable(String)) } attr_reader :footer - sig { returns(T.nilable(FromInvoice)) } # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + sig { returns(T.nilable(FromInvoice)) } attr_reader :from_invoice - sig { returns(T.nilable(String)) } # The URL for the hosted invoice page, which allows customers to view and pay an invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(String)) } attr_reader :hosted_invoice_url - sig { returns(String) } # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The link to download the PDF for the invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(String)) } attr_reader :invoice_pdf - sig { returns(Issuer) } # Attribute for field issuer + sig { returns(Issuer) } attr_reader :issuer - sig { returns(T.nilable(LastFinalizationError)) } # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + sig { returns(T.nilable(LastFinalizationError)) } attr_reader :last_finalization_error - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # The ID of the most recent non-draft revision of this invoice + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :latest_revision - sig { returns(Stripe::ListObject) } # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + sig { returns(Stripe::ListObject) } attr_reader :lines - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(Integer)) } # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(Integer)) } attr_reader :next_payment_attempt - sig { returns(T.nilable(String)) } # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + sig { returns(T.nilable(String)) } attr_reader :number - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T::Boolean) } # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. - attr_reader :paid sig { returns(T::Boolean) } + attr_reader :paid # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + sig { returns(T::Boolean) } attr_reader :paid_out_of_band - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(PaymentSettings) } # Attribute for field payment_settings + sig { returns(PaymentSettings) } attr_reader :payment_settings - sig { returns(Stripe::ListObject) } # Payments for this invoice + sig { returns(Stripe::ListObject) } attr_reader :payments - sig { returns(Integer) } # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_end sig { returns(Integer) } + attr_reader :period_end # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_start sig { returns(Integer) } + attr_reader :period_start # Total amount of all post-payment credit notes issued for this invoice. - attr_reader :post_payment_credit_notes_amount sig { returns(Integer) } + attr_reader :post_payment_credit_notes_amount # Total amount of all pre-payment credit notes issued for this invoice. + sig { returns(Integer) } attr_reader :pre_payment_credit_notes_amount - sig { returns(T.nilable(T.any(String, Stripe::Quote))) } # The quote this invoice was generated from. + sig { returns(T.nilable(T.any(String, Stripe::Quote))) } attr_reader :quote - sig { returns(T.nilable(String)) } # This is the transaction number that appears on email receipts sent for this invoice. + sig { returns(T.nilable(String)) } attr_reader :receipt_number - sig { returns(T.nilable(Rendering)) } # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(T.nilable(Rendering)) } attr_reader :rendering - sig { returns(T.nilable(ShippingCost)) } # The details of the cost of shipping, including the ShippingRate applied on the invoice. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(Integer) } # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + sig { returns(Integer) } attr_reader :starting_balance - sig { returns(T.nilable(String)) } # Extra information about an invoice for the customer's credit card statement. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # The subscription that this invoice was prepared for, if any. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(SubscriptionDetails)) } # Details about the subscription that created this invoice. + sig { returns(T.nilable(SubscriptionDetails)) } attr_reader :subscription_details - sig { returns(Integer) } # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. - attr_reader :subscription_proration_date sig { returns(Integer) } + attr_reader :subscription_proration_date # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + sig { returns(Integer) } attr_reader :subtotal - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated - attr_reader :subtotal_excluding_tax sig { returns(T.nilable(Integer)) } + attr_reader :subtotal_excluding_tax # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + sig { returns(T.nilable(Integer)) } attr_reader :tax - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this invoice belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(ThresholdReason) } # Attribute for field threshold_reason + sig { returns(ThresholdReason) } attr_reader :threshold_reason - sig { returns(Integer) } # Total after discounts and taxes. + sig { returns(Integer) } attr_reader :total - sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } # The aggregate amounts calculated per discount across all line items. + sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } attr_reader :total_discount_amounts - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + sig { returns(T.nilable(Integer)) } attr_reader :total_excluding_tax - sig { returns(T.nilable(T::Array[TotalMarginAmount])) } # The aggregate amounts calculated per margin across all line items. + sig { returns(T.nilable(T::Array[TotalMarginAmount])) } attr_reader :total_margin_amounts - sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } attr_reader :total_pretax_credit_amounts - sig { returns(T::Array[TotalTaxAmount]) } # The aggregate amounts calculated per tax rate for all line items. + sig { returns(T::Array[TotalTaxAmount]) } attr_reader :total_tax_amounts - sig { returns(T.nilable(TransferData)) } # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(Integer)) } # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + sig { returns(T.nilable(Integer)) } attr_reader :webhooks_delivered_at - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + sig { returns(Integer) } + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Date on which a payment plan’s payment is due. + sig { returns(Integer) } + attr_accessor :due_date + sig { + params(amount: Integer, days_until_due: Integer, description: String, due_date: Integer).void + } + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Invoice::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Invoice::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this invoice. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(installments: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments, request_three_d_secure: String).void + } + def initialize(installments: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + sig { returns(T.nilable(String)) } + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + sig { returns(::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + sig { + params(default_mandate: T.nilable(String), payment_method_options: ::Stripe::Invoice::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String])).void + } + def initialize( + default_mandate: nil, + payment_method_options: nil, + payment_method_types: nil + ); end + end + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + sig { returns(String) } + attr_accessor :page_size + sig { params(page_size: String).void } + def initialize(page_size: nil); end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # Invoice pdf rendering options + sig { returns(::Stripe::Invoice::UpdateParams::Rendering::Pdf) } + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + sig { returns(String) } + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + sig { returns(T.nilable(Integer)) } + attr_accessor :template_version + sig { + params(amount_tax_display: T.nilable(String), pdf: ::Stripe::Invoice::UpdateParams::Rendering::Pdf, template: String, template_version: T.nilable(Integer)).void + } + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Invoice::UpdateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address + sig { returns(::Stripe::Invoice::UpdateParams::ShippingDetails::Address) } + attr_accessor :address + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension) + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::Invoice::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + sig { returns(Integer) } + attr_accessor :amount + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::UpdateParams::AmountsDue])) } + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + sig { returns(T::Boolean) } + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + sig { returns(::Stripe::Invoice::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + sig { returns(Integer) } + attr_accessor :automatically_finalizes_at + # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + sig { returns(String) } + attr_accessor :collection_method + # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::UpdateParams::CustomField])) } + attr_accessor :custom_fields + # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + sig { returns(Integer) } + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + sig { returns(T.nilable(String)) } + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(String) } + attr_accessor :description + # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::UpdateParams::Discount])) } + attr_accessor :discounts + # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + sig { returns(Integer) } + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + sig { returns(T.nilable(Integer)) } + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Footer to be displayed on the invoice. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Invoice::UpdateParams::Issuer) } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + sig { returns(T.nilable(String)) } + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + sig { returns(::Stripe::Invoice::UpdateParams::PaymentSettings) } + attr_accessor :payment_settings + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(::Stripe::Invoice::UpdateParams::Rendering) } + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost)) } + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::ShippingDetails)) } + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + sig { returns(String) } + attr_accessor :statement_descriptor + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + sig { returns(T.nilable(::Stripe::Invoice::UpdateParams::TransferData)) } + attr_accessor :transfer_data + sig { + params(account_tax_ids: T.nilable(T::Array[String]), amounts_due: T.nilable(T::Array[::Stripe::Invoice::UpdateParams::AmountsDue]), application_fee_amount: Integer, auto_advance: T::Boolean, automatic_tax: ::Stripe::Invoice::UpdateParams::AutomaticTax, automatically_finalizes_at: Integer, collection_method: String, custom_fields: T.nilable(T::Array[::Stripe::Invoice::UpdateParams::CustomField]), days_until_due: Integer, default_margins: T.nilable(T::Array[String]), default_payment_method: String, default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: String, discounts: T.nilable(T::Array[::Stripe::Invoice::UpdateParams::Discount]), due_date: Integer, effective_at: T.nilable(Integer), expand: T::Array[String], footer: String, issuer: ::Stripe::Invoice::UpdateParams::Issuer, metadata: T.nilable(T::Hash[String, String]), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: ::Stripe::Invoice::UpdateParams::PaymentSettings, rendering: ::Stripe::Invoice::UpdateParams::Rendering, shipping_cost: T.nilable(::Stripe::Invoice::UpdateParams::ShippingCost), shipping_details: T.nilable(::Stripe::Invoice::UpdateParams::ShippingDetails), statement_descriptor: String, transfer_data: T.nilable(::Stripe::Invoice::UpdateParams::TransferData)).void + } + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + custom_fields: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + transfer_data: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class DueDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + sig { returns(String) } + attr_accessor :collection_method + # Only return invoices that were created during the given date interval. + sig { returns(T.any(::Stripe::Invoice::ListParams::Created, Integer)) } + attr_accessor :created + # Only return invoices for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # Attribute for param field due_date + sig { returns(T.any(::Stripe::Invoice::ListParams::DueDate, Integer)) } + attr_accessor :due_date + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + sig { returns(String) } + attr_accessor :status + # Only return invoices for the subscription specified by this subscription ID. + sig { returns(String) } + attr_accessor :subscription + sig { + params(collection_method: String, created: T.any(::Stripe::Invoice::ListParams::Created, Integer), customer: String, due_date: T.any(::Stripe::Invoice::ListParams::DueDate, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String, subscription: String).void + } + def initialize( + collection_method: nil, + created: nil, + customer: nil, + due_date: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + subscription: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + sig { returns(Integer) } + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Date on which a payment plan’s payment is due. + sig { returns(Integer) } + attr_accessor :due_date + sig { + params(amount: Integer, days_until_due: Integer, description: String, due_date: Integer).void + } + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Invoice::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Invoice::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class FromInvoice < Stripe::RequestParams + # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + sig { returns(String) } + attr_accessor :action + # The `id` of the invoice that will be cloned. + sig { returns(String) } + attr_accessor :invoice + sig { params(action: String, invoice: String).void } + def initialize(action: nil, invoice: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this invoice. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(installments: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments, request_three_d_secure: String).void + } + def initialize(installments: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + sig { returns(T.nilable(String)) } + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + sig { returns(::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + sig { + params(default_mandate: T.nilable(String), payment_method_options: ::Stripe::Invoice::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String])).void + } + def initialize( + default_mandate: nil, + payment_method_options: nil, + payment_method_types: nil + ); end + end + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + sig { returns(String) } + attr_accessor :page_size + sig { params(page_size: String).void } + def initialize(page_size: nil); end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # Invoice pdf rendering options + sig { returns(::Stripe::Invoice::CreateParams::Rendering::Pdf) } + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + sig { returns(String) } + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + sig { returns(T.nilable(Integer)) } + attr_accessor :template_version + sig { + params(amount_tax_display: T.nilable(String), pdf: ::Stripe::Invoice::CreateParams::Rendering::Pdf, template: String, template_version: T.nilable(Integer)).void + } + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Invoice::CreateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address + sig { returns(::Stripe::Invoice::CreateParams::ShippingDetails::Address) } + attr_accessor :address + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension) + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::Invoice::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + sig { returns(Integer) } + attr_accessor :amount + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreateParams::AmountsDue])) } + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + sig { returns(T::Boolean) } + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + sig { returns(::Stripe::Invoice::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + sig { returns(Integer) } + attr_accessor :automatically_finalizes_at + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The currency to create this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # A list of up to 4 custom fields to be displayed on the invoice. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreateParams::CustomField])) } + attr_accessor :custom_fields + # The ID of the customer who will be billed. + sig { returns(String) } + attr_accessor :customer + # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + sig { returns(T::Array[String]) } + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + sig { returns(String) } + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. + sig { returns(T::Array[String]) } + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(String) } + attr_accessor :description + # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreateParams::Discount])) } + attr_accessor :discounts + # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(Integer) } + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + sig { returns(Integer) } + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Footer to be displayed on the invoice. + sig { returns(String) } + attr_accessor :footer + # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + sig { returns(::Stripe::Invoice::CreateParams::FromInvoice) } + attr_accessor :from_invoice + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Invoice::CreateParams::Issuer) } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + sig { returns(String) } + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(String) } + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + sig { returns(::Stripe::Invoice::CreateParams::PaymentSettings) } + attr_accessor :payment_settings + # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. + sig { returns(String) } + attr_accessor :pending_invoice_items_behavior + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(::Stripe::Invoice::CreateParams::Rendering) } + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + sig { returns(::Stripe::Invoice::CreateParams::ShippingCost) } + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(::Stripe::Invoice::CreateParams::ShippingDetails) } + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + sig { returns(String) } + attr_accessor :statement_descriptor + # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. + sig { returns(String) } + attr_accessor :subscription + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + sig { returns(::Stripe::Invoice::CreateParams::TransferData) } + attr_accessor :transfer_data + sig { + params(account_tax_ids: T.nilable(T::Array[String]), amounts_due: T.nilable(T::Array[::Stripe::Invoice::CreateParams::AmountsDue]), application_fee_amount: Integer, auto_advance: T::Boolean, automatic_tax: ::Stripe::Invoice::CreateParams::AutomaticTax, automatically_finalizes_at: Integer, collection_method: String, currency: String, custom_fields: T.nilable(T::Array[::Stripe::Invoice::CreateParams::CustomField]), customer: String, days_until_due: Integer, default_margins: T::Array[String], default_payment_method: String, default_source: String, default_tax_rates: T::Array[String], description: String, discounts: T.nilable(T::Array[::Stripe::Invoice::CreateParams::Discount]), due_date: Integer, effective_at: Integer, expand: T::Array[String], footer: String, from_invoice: ::Stripe::Invoice::CreateParams::FromInvoice, issuer: ::Stripe::Invoice::CreateParams::Issuer, metadata: T.nilable(T::Hash[String, String]), number: String, on_behalf_of: String, payment_settings: ::Stripe::Invoice::CreateParams::PaymentSettings, pending_invoice_items_behavior: String, rendering: ::Stripe::Invoice::CreateParams::Rendering, shipping_cost: ::Stripe::Invoice::CreateParams::ShippingCost, shipping_details: ::Stripe::Invoice::CreateParams::ShippingDetails, statement_descriptor: String, subscription: String, transfer_data: ::Stripe::Invoice::CreateParams::TransferData).void + } + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + currency: nil, + custom_fields: nil, + customer: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + from_invoice: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + pending_invoice_items_behavior: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + subscription: nil, + transfer_data: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class UpcomingParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Invoice::UpcomingParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::UpcomingParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { returns(::Stripe::Invoice::UpcomingParams::CustomerDetails::Shipping::Address) } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Invoice::UpcomingParams::CustomerDetails::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + sig { params(ip_address: T.nilable(String)).void } + def initialize(ip_address: nil); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { returns(T.nilable(::Stripe::Invoice::UpcomingParams::CustomerDetails::Address)) } + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { returns(T.nilable(::Stripe::Invoice::UpcomingParams::CustomerDetails::Shipping)) } + attr_accessor :shipping + # Tax details about the customer. + sig { returns(::Stripe::Invoice::UpcomingParams::CustomerDetails::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::CustomerDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(address: T.nilable(::Stripe::Invoice::UpcomingParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::Invoice::UpcomingParams::CustomerDetails::Shipping), tax: ::Stripe::Invoice::UpcomingParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::Invoice::UpcomingParams::CustomerDetails::TaxId]).void + } + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Invoice::UpcomingParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::UpcomingParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::InvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::UpcomingParams::InvoiceItem::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::InvoiceItem::Discount])) + } + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + sig { returns(String) } + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::Invoice::UpcomingParams::InvoiceItem::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::UpcomingParams::InvoiceItem::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::Invoice::UpcomingParams::InvoiceItem::Period, price: String, price_data: ::Stripe::Invoice::UpcomingParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd) + } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings) + } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item]) } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::PauseCollection) + } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::TransferData) } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The end of the prebilled time period. + sig { returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling::BillUntil) } + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { + params(bill_until: ::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void + } + def initialize(bill_until: nil, iterations: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment]) } + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase]) } + attr_accessor :phases + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling])) + } + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(amendments: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::ScheduleDetails::Prebilling]), proration_behavior: String).void + } + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + sig { returns(T.any(String, Integer)) } + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + sig { returns(T::Boolean) } + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item]) } + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + sig { returns(::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Prebilling) } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + sig { returns(Integer) } + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + sig { returns(String) } + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + sig { returns(Integer) } + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + sig { + params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Item], prebilling: ::Stripe::Invoice::UpcomingParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void + } + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ); end + end + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpcomingParams::SubscriptionItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpcomingParams::SubscriptionItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::UpcomingParams::SubscriptionItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpcomingParams::SubscriptionItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::Invoice::UpcomingParams::SubscriptionItem::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::UpcomingParams::SubscriptionItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::UpcomingParams::SubscriptionItem::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionItem::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::UpcomingParams::SubscriptionItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::UpcomingParams::SubscriptionItem::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionItem::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Invoice::UpcomingParams::SubscriptionItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Settings for automatic tax lookup for this invoice preview. + sig { returns(::Stripe::Invoice::UpcomingParams::AutomaticTax) } + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(String) } + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(::Stripe::Invoice::UpcomingParams::CustomerDetails) } + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::InvoiceItem]) } + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Invoice::UpcomingParams::Issuer) } + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + sig { returns(String) } + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + sig { returns(String) } + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + sig { returns(::Stripe::Invoice::UpcomingParams::ScheduleDetails) } + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + sig { returns(String) } + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + sig { returns(T.nilable(Integer)) } + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + sig { returns(::Stripe::Invoice::UpcomingParams::SubscriptionDetails) } + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + sig { returns(T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionItem]) } + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + sig { returns(::Stripe::Invoice::UpcomingParams::SubscriptionPrebilling) } + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + sig { returns(String) } + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + sig { returns(String) } + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :subscription_trial_from_plan + sig { + params(automatic_tax: ::Stripe::Invoice::UpcomingParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::Invoice::UpcomingParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::Invoice::UpcomingParams::Discount]), expand: T::Array[String], invoice_items: T::Array[::Stripe::Invoice::UpcomingParams::InvoiceItem], issuer: ::Stripe::Invoice::UpcomingParams::Issuer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::Invoice::UpcomingParams::ScheduleDetails, subscription: String, subscription_billing_cycle_anchor: T.any(String, Integer), subscription_cancel_at: T.nilable(Integer), subscription_cancel_at_period_end: T::Boolean, subscription_cancel_now: T::Boolean, subscription_default_tax_rates: T.nilable(T::Array[String]), subscription_details: ::Stripe::Invoice::UpcomingParams::SubscriptionDetails, subscription_items: T::Array[::Stripe::Invoice::UpcomingParams::SubscriptionItem], subscription_prebilling: ::Stripe::Invoice::UpcomingParams::SubscriptionPrebilling, subscription_proration_behavior: String, subscription_proration_date: Integer, subscription_resume_at: String, subscription_start_date: Integer, subscription_trial_end: T.any(String, Integer), subscription_trial_from_plan: T::Boolean).void + } + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ); end + end + class ListUpcomingLineItemsParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::ListUpcomingLineItemsParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Shipping::Address) + } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + sig { params(ip_address: T.nilable(String)).void } + def initialize(ip_address: nil); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { + returns(T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Address)) + } + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { + returns(T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Shipping)) + } + attr_accessor :shipping + # Tax details about the customer. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::TaxId]) + } + attr_accessor :tax_ids + sig { + params(address: T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Shipping), tax: ::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails::TaxId]).void + } + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Discount])) + } + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + sig { returns(String) } + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::Period, price: String, price_data: ::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentEnd) + } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Trial) + } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::InvoiceSettings) + } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item]) + } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::PauseCollection) + } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::TransferData) + } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The end of the prebilled time period. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling::BillUntil) + } + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { + params(bill_until: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void + } + def initialize(bill_until: nil, iterations: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment]) + } + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase]) + } + attr_accessor :phases + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling])) + } + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(amendments: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails::Prebilling]), proration_behavior: String).void + } + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::PriceData) + } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + sig { returns(T.any(String, Integer)) } + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + sig { returns(T::Boolean) } + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + sig { + returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item]) + } + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Prebilling) + } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + sig { returns(Integer) } + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + sig { returns(String) } + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + sig { returns(Integer) } + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + sig { + params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Item], prebilling: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void + } + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ); end + end + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Settings for automatic tax lookup for this invoice preview. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::AutomaticTax) } + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(String) } + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails) } + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::Discount])) } + attr_accessor :discounts + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + sig { returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem]) } + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::Issuer) } + attr_accessor :issuer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + sig { returns(String) } + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + sig { returns(String) } + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails) } + attr_accessor :schedule_details + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + sig { returns(String) } + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + sig { returns(T.nilable(Integer)) } + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails) } + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + sig { returns(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem]) } + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + sig { returns(::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionPrebilling) } + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + sig { returns(String) } + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + sig { returns(String) } + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :subscription_trial_from_plan + sig { + params(automatic_tax: ::Stripe::Invoice::ListUpcomingLineItemsParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::Invoice::ListUpcomingLineItemsParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::Discount]), ending_before: String, expand: T::Array[String], invoice_items: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::InvoiceItem], issuer: ::Stripe::Invoice::ListUpcomingLineItemsParams::Issuer, limit: Integer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::Invoice::ListUpcomingLineItemsParams::ScheduleDetails, starting_after: String, subscription: String, subscription_billing_cycle_anchor: T.any(String, Integer), subscription_cancel_at: T.nilable(Integer), subscription_cancel_at_period_end: T::Boolean, subscription_cancel_now: T::Boolean, subscription_default_tax_rates: T.nilable(T::Array[String]), subscription_details: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionDetails, subscription_items: T::Array[::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionItem], subscription_prebilling: ::Stripe::Invoice::ListUpcomingLineItemsParams::SubscriptionPrebilling, subscription_proration_behavior: String, subscription_proration_date: Integer, subscription_resume_at: String, subscription_start_date: Integer, subscription_trial_end: T.any(String, Integer), subscription_trial_from_plan: T::Boolean).void + } + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + ending_before: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + limit: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + starting_after: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ); end + end + class AddLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::AddLinesParams::Line::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::AddLinesParams::Line::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::AddLinesParams::Line::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::AddLinesParams::Line::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { returns(::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData) } + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::Invoice::AddLinesParams::Line::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void + } + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + sig { returns(::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData) } + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { + params(amount: Integer, tax_rate_data: ::Stripe::Invoice::AddLinesParams::Line::TaxAmount::TaxRateData, taxable_amount: Integer).void + } + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount])) } + attr_accessor :discounts + # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. + sig { returns(String) } + attr_accessor :invoice_item + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::Invoice::AddLinesParams::Line::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::AddLinesParams::Line::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount])) } + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::AddLinesParams::Line::Discount]), invoice_item: String, margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::Invoice::AddLinesParams::Line::Period, price: String, price_data: ::Stripe::Invoice::AddLinesParams::Line::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::Invoice::AddLinesParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + invoice_item: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :invoice_metadata + # The line items to add. + sig { returns(T::Array[::Stripe::Invoice::AddLinesParams::Line]) } + attr_accessor :lines + sig { + params(expand: T::Array[String], invoice_metadata: T.nilable(T::Hash[String, String]), lines: T::Array[::Stripe::Invoice::AddLinesParams::Line]).void + } + def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + end + class AttachPaymentParams < Stripe::RequestParams + class PaymentRecordData < Stripe::RequestParams + # The amount that was paid out of band. + sig { returns(Integer) } + attr_accessor :amount + # The currency that was paid out of band. + sig { returns(String) } + attr_accessor :currency + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The type of money movement for this out of band payment record. + sig { returns(String) } + attr_accessor :money_movement_type + # The timestamp when this out of band payment was paid. + sig { returns(Integer) } + attr_accessor :paid_at + # The reference for this out of band payment record. + sig { returns(String) } + attr_accessor :payment_reference + sig { + params(amount: Integer, currency: String, metadata: T.nilable(T::Hash[String, String]), money_movement_type: String, paid_at: Integer, payment_reference: String).void + } + def initialize( + amount: nil, + currency: nil, + metadata: nil, + money_movement_type: nil, + paid_at: nil, + payment_reference: nil + ); end + end + # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. + sig { returns(Integer) } + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + sig { returns(String) } + attr_accessor :payment_intent + # The ID of the PaymentRecord to detach from the invoice. + sig { returns(String) } + attr_accessor :payment_record + # The PaymentRecord data for attaching an out of band payment to the invoice. + sig { returns(::Stripe::Invoice::AttachPaymentParams::PaymentRecordData) } + attr_accessor :payment_record_data + sig { + params(amount_requested: Integer, expand: T::Array[String], payment_intent: String, payment_record: String, payment_record_data: ::Stripe::Invoice::AttachPaymentParams::PaymentRecordData).void + } + def initialize( + amount_requested: nil, + expand: nil, + payment_intent: nil, + payment_record: nil, + payment_record_data: nil + ); end + end + class AttachPaymentIntentParams < Stripe::RequestParams + # The portion of the PaymentIntent’s `amount` that should be applied to thisinvoice. Defaults to the entire amount. + sig { returns(Integer) } + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(amount_requested: Integer, expand: T::Array[String], payment_intent: String).void + } + def initialize(amount_requested: nil, expand: nil, payment_intent: nil); end + end + class FinalizeInvoiceParams < Stripe::RequestParams + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + sig { returns(T::Boolean) } + attr_accessor :auto_advance + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(auto_advance: T::Boolean, expand: T::Array[String]).void } + def initialize(auto_advance: nil, expand: nil); end + end + class MarkUncollectibleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PayParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + # + # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :forgive + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. + sig { returns(T.nilable(String)) } + attr_accessor :mandate + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :paid_out_of_band + # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. + sig { returns(String) } + attr_accessor :payment_method + # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. + sig { returns(String) } + attr_accessor :source + sig { + params(expand: T::Array[String], forgive: T::Boolean, mandate: T.nilable(String), off_session: T::Boolean, paid_out_of_band: T::Boolean, payment_method: String, source: String).void + } + def initialize( + expand: nil, + forgive: nil, + mandate: nil, + off_session: nil, + paid_out_of_band: nil, + payment_method: nil, + source: nil + ); end + end + class RemoveLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. + sig { returns(String) } + attr_accessor :behavior + # ID of an existing line item to remove from this invoice. + sig { returns(String) } + attr_accessor :id + sig { params(behavior: String, id: String).void } + def initialize(behavior: nil, id: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :invoice_metadata + # The line items to remove. + sig { returns(T::Array[::Stripe::Invoice::RemoveLinesParams::Line]) } + attr_accessor :lines + sig { + params(expand: T::Array[String], invoice_metadata: T.nilable(T::Hash[String, String]), lines: T::Array[::Stripe::Invoice::RemoveLinesParams::Line]).void + } + def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + end + class SendInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::UpdateLinesParams::Line::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::UpdateLinesParams::Line::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::UpdateLinesParams::Line::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData) } + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::Invoice::UpdateLinesParams::Line::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void + } + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData) } + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { + params(amount: Integer, tax_rate_data: ::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxable_amount: Integer).void + } + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount])) } + attr_accessor :discounts + # ID of an existing line item on the invoice. + sig { returns(String) } + attr_accessor :id + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::UpdateLinesParams::Line::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount])) } + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::UpdateLinesParams::Line::Discount]), id: String, margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::Invoice::UpdateLinesParams::Line::Period, price: String, price_data: ::Stripe::Invoice::UpdateLinesParams::Line::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::Invoice::UpdateLinesParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + id: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :invoice_metadata + # The line items to update. + sig { returns(T::Array[::Stripe::Invoice::UpdateLinesParams::Line]) } + attr_accessor :lines + sig { + params(expand: T::Array[String], invoice_metadata: T.nilable(T::Hash[String, String]), lines: T::Array[::Stripe::Invoice::UpdateLinesParams::Line]).void + } + def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + end + class VoidInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreatePreviewParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::CreatePreviewParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address) + } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + sig { params(ip_address: T.nilable(String)).void } + def initialize(ip_address: nil); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address)) } + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping)) + } + attr_accessor :shipping + # Tax details about the customer. + sig { returns(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { returns(T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(address: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Shipping), tax: ::Stripe::Invoice::CreatePreviewParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::Invoice::CreatePreviewParams::CustomerDetails::TaxId]).void + } + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Invoice::CreatePreviewParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Invoice::CreatePreviewParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount])) + } + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + sig { returns(String) } + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::Invoice::CreatePreviewParams::InvoiceItem::Period, price: String, price_data: ::Stripe::Invoice::CreatePreviewParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd) + } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Trial) + } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings) + } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item]) + } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::PauseCollection) + } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData) + } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The end of the prebilled time period. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil) + } + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { + params(bill_until: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void + } + def initialize(bill_until: nil, iterations: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { + returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment]) + } + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { returns(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase]) } + attr_accessor :phases + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling])) + } + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(amendments: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::ScheduleDetails::Prebilling]), proration_behavior: String).void + } + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData) + } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + sig { returns(T.any(String, Integer)) } + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + sig { returns(T::Boolean) } + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + sig { returns(T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item]) } + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + sig { returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Prebilling) } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + sig { returns(Integer) } + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + sig { returns(String) } + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + sig { returns(Integer) } + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + sig { + params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Item], prebilling: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void + } + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ); end + end + # Settings for automatic tax lookup for this invoice preview. + sig { returns(::Stripe::Invoice::CreatePreviewParams::AutomaticTax) } + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(String) } + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(::Stripe::Invoice::CreatePreviewParams::CustomerDetails) } + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + sig { returns(T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem]) } + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Invoice::CreatePreviewParams::Issuer) } + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + sig { returns(String) } + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + sig { returns(String) } + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + sig { returns(::Stripe::Invoice::CreatePreviewParams::ScheduleDetails) } + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + sig { returns(String) } + attr_accessor :subscription + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + sig { returns(::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails) } + attr_accessor :subscription_details + sig { + params(automatic_tax: ::Stripe::Invoice::CreatePreviewParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::Invoice::CreatePreviewParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::Invoice::CreatePreviewParams::Discount]), expand: T::Array[String], invoice_items: T::Array[::Stripe::Invoice::CreatePreviewParams::InvoiceItem], issuer: ::Stripe::Invoice::CreatePreviewParams::Issuer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::Invoice::CreatePreviewParams::ScheduleDetails, subscription: String, subscription_details: ::Stripe::Invoice::CreatePreviewParams::SubscriptionDetails).void + } + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_details: nil + ); end + end + # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + sig { + params(params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def add_lines(params = {}, opts = {}); end + + # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.add_lines(invoice, params = {}, opts = {}); end + + # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. + # + # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid + # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. + # + # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited + # to the invoice, increasing its amount_paid. When the invoice is fully paid, the + # invoice's status becomes paid. + # + # If the PaymentIntent's status is already succeeded when it's attached, it's + # credited to the invoice immediately. + # + # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + sig { + params(params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def attach_payment(params = {}, opts = {}); end + + # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. + # + # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid + # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. + # + # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited + # to the invoice, increasing its amount_paid. When the invoice is fully paid, the + # invoice's status becomes paid. + # + # If the PaymentIntent's status is already succeeded when it's attached, it's + # credited to the invoice immediately. + # + # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.attach_payment(invoice, params = {}, opts = {}); end + + # Attaches a PaymentIntent to the invoice, adding it to the list of payments. + # When the PaymentIntent's status changes to succeeded, the payment is credited + # to the invoice, increasing its amount_paid. When the invoice is fully paid, the + # invoice's status becomes paid. + # + # If the PaymentIntent's status is already succeeded when it is attached, it is + # credited to the invoice immediately. + # + # Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) + sig { + params(params: T.any(::Stripe::Invoice::AttachPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def attach_payment_intent(params = {}, opts = {}); end + + # Attaches a PaymentIntent to the invoice, adding it to the list of payments. + # When the PaymentIntent's status changes to succeeded, the payment is credited + # to the invoice, increasing its amount_paid. When the invoice is fully paid, the + # invoice's status becomes paid. + # + # If the PaymentIntent's status is already succeeded when it is attached, it is + # credited to the invoice immediately. + # + # Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::AttachPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.attach_payment_intent(invoice, params = {}, opts = {}); end + + # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers. + sig { + params(params: T.any(::Stripe::Invoice::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.create(params = {}, opts = {}); end + + # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + # + # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. + # + # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + # + # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + sig { + params(params: T.any(::Stripe::Invoice::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.create_preview(params = {}, opts = {}); end + + # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice). + sig { + params(id: String, params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.delete(id, params = {}, opts = {}); end + + # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice). + sig { + params(params: T.any(::Stripe::Invoice::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def delete(params = {}, opts = {}); end + + # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. + sig { + params(params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def finalize_invoice(params = {}, opts = {}); end + + # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.finalize_invoice(invoice, params = {}, opts = {}); end + + # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. + sig { + params(params: T.any(::Stripe::Invoice::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::Invoice::ListUpcomingLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_upcoming_line_items(params = {}, opts = {}); end + + # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. + sig { + params(params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def mark_uncollectible(params = {}, opts = {}); end + + # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.mark_uncollectible(invoice, params = {}, opts = {}); end + + # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. + sig { + params(params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def pay(params = {}, opts = {}); end + + # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.pay(invoice, params = {}, opts = {}); end + + # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + sig { + params(params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def remove_lines(params = {}, opts = {}); end + + # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.remove_lines(invoice, params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. + # + # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event. + sig { + params(params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def send_invoice(params = {}, opts = {}); end + + # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. + # + # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.send_invoice(invoice, params = {}, opts = {}); end + + # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + # + # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. + # + # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + # + # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + sig { + params(params: T.any(::Stripe::Invoice::UpcomingParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.upcoming(params = {}, opts = {}); end + + # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized), + # monetary values, as well as collection_method, become uneditable. + # + # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass + # auto_advance=false. + sig { + params(id: String, params: T.any(::Stripe::Invoice::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.update(id, params = {}, opts = {}); end + + # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + sig { + params(params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def update_lines(params = {}, opts = {}); end + + # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.update_lines(invoice, params = {}, opts = {}); end + + # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. + # + # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. + sig { + params(params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def void_invoice(params = {}, opts = {}); end + + # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. + # + # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. + sig { + params(invoice: String, params: T.any(::Stripe::Invoice::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def self.void_invoice(invoice, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_item.rbi b/rbi/stripe/resources/invoice_item.rbi index d0c0fc11a..c885c5b90 100644 --- a/rbi/stripe/resources/invoice_item.rbi +++ b/rbi/stripe/resources/invoice_item.rbi @@ -16,85 +16,499 @@ module Stripe # Related guides: [Integrate with the Invoicing API](https://stripe.com/docs/invoicing/integration), [Subscription Invoices](https://stripe.com/docs/billing/invoices/subscription#adding-upcoming-invoice-items). class InvoiceItem < APIResource class Period < Stripe::StripeObject + # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end + # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end - sig { returns(Integer) } # Amount (in the `currency` specified) of the invoice item. This should always be equal to `unit_amount * quantity`. + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.any(String, Stripe::Customer)) } # The ID of the customer who will be billed when this invoice item is billed. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :date - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Boolean) } # If true, discounts will apply to this invoice item. Always false for prorations. + sig { returns(T::Boolean) } attr_reader :discountable - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } # The discounts which apply to the invoice item. Item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } attr_reader :discounts - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # The ID of the invoice this invoice item belongs to. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } # The margins which apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :margins - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Period) } # Attribute for field period + sig { returns(Period) } attr_reader :period - sig { returns(T.nilable(Stripe::Plan)) } # If the invoice item is a proration, the plan of the subscription that the proration was computed for. + sig { returns(T.nilable(Stripe::Plan)) } attr_reader :plan - sig { returns(T.nilable(Stripe::Price)) } # The price of the invoice item. + sig { returns(T.nilable(Stripe::Price)) } attr_reader :price - sig { returns(T::Boolean) } # Whether the invoice item was created automatically as a proration adjustment when the customer switched plans. + sig { returns(T::Boolean) } attr_reader :proration - sig { returns(Integer) } # Quantity of units for the invoice item. If the invoice item is a proration, the quantity of the subscription that the proration was computed for. + sig { returns(Integer) } attr_reader :quantity - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # The subscription that this invoice item has been created for, if any. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(String) } # The subscription item that this invoice item has been created for, if any. + sig { returns(String) } attr_reader :subscription_item - sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this invoice item belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T.nilable(Integer)) } # Unit amount (in the `currency` specified) of the invoice item. + sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - sig { returns(T.nilable(String)) } # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::InvoiceItem::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceItem::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceItem::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceItem::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceItem::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceItem::UpdateParams::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceItem::UpdateParams::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceItem::UpdateParams::Discount]), expand: T::Array[String], margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceItem::UpdateParams::Period, price: String, price_data: ::Stripe::InvoiceItem::UpdateParams::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return invoice items that were created during the given date interval. + sig { returns(T.any(::Stripe::InvoiceItem::ListParams::Created, Integer)) } + attr_accessor :created + # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. + sig { returns(String) } + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. + sig { returns(T::Boolean) } + attr_accessor :pending + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::InvoiceItem::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], invoice: String, limit: Integer, pending: T::Boolean, starting_after: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + pending: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::InvoiceItem::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceItem::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceItem::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceItem::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the customer who will be billed when this invoice item is billed. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceItem::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. + sig { returns(String) } + attr_accessor :invoice + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + sig { returns(T::Array[String]) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceItem::CreateParams::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceItem::CreateParams::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + sig { returns(String) } + attr_accessor :subscription + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, customer: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceItem::CreateParams::Discount]), expand: T::Array[String], invoice: String, margins: T::Array[String], metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceItem::CreateParams::Period, price: String, price_data: ::Stripe::InvoiceItem::CreateParams::PriceData, quantity: Integer, subscription: String, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T::Array[String], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + invoice: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + subscription: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. + sig { + params(params: T.any(::Stripe::InvoiceItem::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def self.create(params = {}, opts = {}); end + + # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. + sig { + params(id: String, params: T.any(::Stripe::InvoiceItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. + sig { + params(params: T.any(::Stripe::InvoiceItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. + sig { + params(params: T.any(::Stripe::InvoiceItem::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. + sig { + params(id: String, params: T.any(::Stripe::InvoiceItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_line_item.rbi b/rbi/stripe/resources/invoice_line_item.rbi index 8c587d7b9..6ef2aa7f2 100644 --- a/rbi/stripe/resources/invoice_line_item.rbi +++ b/rbi/stripe/resources/invoice_line_item.rbi @@ -8,140 +8,393 @@ module Stripe # Each line item is backed by either an [invoice item](https://stripe.com/docs/api/invoiceitems) or a [subscription item](https://stripe.com/docs/api/subscription_items). class InvoiceLineItem < StripeObject class DiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class MarginAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class Period < Stripe::StripeObject + # The end of the period, which must be greater than or equal to the start. This value is inclusive. sig { returns(Integer) } attr_reader :end + # The start of the period. This value is inclusive. sig { returns(Integer) } attr_reader :start end class PretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class ProrationDetails < Stripe::StripeObject class CreditedItems < Stripe::StripeObject + # Invoice containing the credited invoice line items sig { returns(String) } attr_reader :invoice + # Credited invoice line items sig { returns(T::Array[String]) } attr_reader :invoice_line_items end + # For a credit proration `line_item`, the original debit line_items to which the credit proration applies. sig { returns(T.nilable(CreditedItems)) } attr_reader :credited_items end class TaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(Integer) } # The amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the amount for this line item, excluding all tax and discounts. + sig { returns(T.nilable(Integer)) } attr_reader :amount_excluding_tax - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T::Array[DiscountAmount])) } # The amount of discount calculated per discount for this line item. + sig { returns(T.nilable(T::Array[DiscountAmount])) } attr_reader :discount_amounts - sig { returns(T::Boolean) } # If true, discounts will apply to this line item. Always false for prorations. + sig { returns(T::Boolean) } attr_reader :discountable - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } # The discounts applied to the invoice line item. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The ID of the invoice that contains this line item. + sig { returns(T.nilable(String)) } attr_reader :invoice - sig { returns(T.any(String, Stripe::InvoiceItem)) } # The ID of the [invoice item](https://stripe.com/docs/api/invoiceitems) associated with this line item if any. + sig { returns(T.any(String, Stripe::InvoiceItem)) } attr_reader :invoice_item - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Array[MarginAmount])) } # The amount of margin calculated per margin for this line item. + sig { returns(T.nilable(T::Array[MarginAmount])) } attr_reader :margin_amounts - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } # The margins applied to the line item. When set, the `default_margins` on the invoice do not apply to the line item. Use `expand[]=margins` to expand each margin. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :margins - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Note that for line items with `type=subscription`, `metadata` reflects the current metadata from the subscription associated with the line item, unless the invoice line was directly updated with different metadata after creation. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Period) } # Attribute for field period + sig { returns(Period) } attr_reader :period - sig { returns(T.nilable(Stripe::Plan)) } # The plan of the subscription, if the line item is a subscription or a proration. + sig { returns(T.nilable(Stripe::Plan)) } attr_reader :plan - sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this line item. + sig { returns(T.nilable(T::Array[PretaxCreditAmount])) } attr_reader :pretax_credit_amounts - sig { returns(T.nilable(Stripe::Price)) } # The price of the line item. + sig { returns(T.nilable(Stripe::Price)) } attr_reader :price - sig { returns(T::Boolean) } # Whether this is a proration. + sig { returns(T::Boolean) } attr_reader :proration - sig { returns(T.nilable(ProrationDetails)) } # Additional details for proration line items + sig { returns(T.nilable(ProrationDetails)) } attr_reader :proration_details - sig { returns(T.nilable(Integer)) } # The quantity of the subscription, if the line item is a subscription or a proration. + sig { returns(T.nilable(Integer)) } attr_reader :quantity - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # The subscription that the invoice item pertains to, if any. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.any(String, Stripe::SubscriptionItem)) } # The subscription item that generated this line item. Left empty if the line item is not an explicit result of a subscription. + sig { returns(T.any(String, Stripe::SubscriptionItem)) } attr_reader :subscription_item - sig { returns(T::Array[TaxAmount]) } # The amount of tax calculated per tax rate for this line item + sig { returns(T::Array[TaxAmount]) } attr_reader :tax_amounts - sig { returns(T::Array[Stripe::TaxRate]) } # The tax rates which apply to the line item. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :tax_rates - sig { returns(String) } # A string identifying the type of the source of this line item, either an `invoiceitem` or a `subscription`. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } # The amount in cents (or local equivalent) representing the unit amount for this line item, excluding all tax and discounts. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_excluding_tax + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceLineItem::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { returns(::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData) } + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::InvoiceLineItem::UpdateParams::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void + } + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + sig { returns(::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData) } + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { + params(amount: Integer, tax_rate_data: ::Stripe::InvoiceLineItem::UpdateParams::TaxAmount::TaxRateData, taxable_amount: Integer).void + } + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceLineItem::UpdateParams::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceLineItem::UpdateParams::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount])) } + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::Discount]), expand: T::Array[String], margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceLineItem::UpdateParams::Period, price: String, price_data: ::Stripe::InvoiceLineItem::UpdateParams::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::InvoiceLineItem::UpdateParams::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ); end + end + # Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, + # so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice + # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + # Updating an invoice's line item is only possible before the invoice is finalized. + sig { + params(id: String, params: T.any(::Stripe::InvoiceLineItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceLineItem) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_payment.rbi b/rbi/stripe/resources/invoice_payment.rbi index 4dccf0f92..ffbcf03dd 100644 --- a/rbi/stripe/resources/invoice_payment.rbi +++ b/rbi/stripe/resources/invoice_payment.rbi @@ -6,59 +6,65 @@ module Stripe # The invoice payment object class InvoicePayment < APIResource class Payment < Stripe::StripeObject + # ID of the successful charge for this payment when `type` is `charge`. sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge + # ID of the PaymentIntent associated with this payment when `type` is `payment_intent`. Note: This property is only populated for invoices finalized on or after March 15th, 2019. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # ID of the PaymentRecord associated with this payment when `type` is `payment_record`. sig { returns(T.any(String, Stripe::PaymentRecord)) } attr_reader :payment_record + # Type of payment object associated with this invoice payment. sig { returns(String) } attr_reader :type end class StatusTransitions < Stripe::StripeObject + # The time that the payment was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # The time that the payment succeeded. sig { returns(T.nilable(Integer)) } attr_reader :paid_at end - sig { returns(T.nilable(Integer)) } # Excess payment that was received for this invoice and credited to the customer’s `invoice_credit_balance`. This field is null until the payment is `paid`. Overpayment can happen when you attach more than one PaymentIntent to the invoice, and each of them succeeds. To avoid overpayment, cancel any PaymentIntents that you do not need before attaching more. - attr_reader :amount_overpaid sig { returns(T.nilable(Integer)) } + attr_reader :amount_overpaid # Amount that was actually paid for this invoice, in cents (or local equivalent). This field is null until the payment is `paid`. This amount can be less than the `amount_requested` if the PaymentIntent’s `amount_received` is not sufficient to pay all of the invoices that it is attached to. + sig { returns(T.nilable(Integer)) } attr_reader :amount_paid - sig { returns(Integer) } # Amount intended to be paid toward this invoice, in cents (or local equivalent) - attr_reader :amount_requested sig { returns(Integer) } + attr_reader :amount_requested # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.any(String, Stripe::Invoice)) } # The invoice that was paid. + sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice - sig { returns(T.nilable(T::Boolean)) } # Stripe automatically creates a default InvoicePayment when the invoice is finalized, and keeps it synchronized with the invoice’s `amount_remaining`. The PaymentIntent associated with the default payment can’t be edited or canceled directly. + sig { returns(T.nilable(T::Boolean)) } attr_reader :is_default - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Payment) } # Attribute for field payment + sig { returns(Payment) } attr_reader :payment - sig { returns(String) } # The status of the payment, one of `open`, `paid`, or `canceled`. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions end end \ No newline at end of file diff --git a/rbi/stripe/resources/invoice_rendering_template.rbi b/rbi/stripe/resources/invoice_rendering_template.rbi index 5f2c3e939..6bbd6220c 100644 --- a/rbi/stripe/resources/invoice_rendering_template.rbi +++ b/rbi/stripe/resources/invoice_rendering_template.rbi @@ -6,29 +6,109 @@ module Stripe # Invoice Rendering Templates are used to configure how invoices are rendered on surfaces like the PDF. Invoice Rendering Templates # can be created from within the Dashboard, and they can be used over the API when creating invoices. class InvoiceRenderingTemplate < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } # A brief description of the template, hidden from customers + sig { returns(T.nilable(String)) } attr_reader :nickname - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The status of the template, one of `active` or `archived`. + sig { returns(String) } attr_reader :status - sig { returns(Integer) } # Version of this template; version increases by one when an update on the template changes any field that controls invoice rendering + sig { returns(Integer) } attr_reader :version + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Attribute for param field status + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field version + sig { returns(Integer) } + attr_accessor :version + sig { params(expand: T::Array[String], version: Integer).void } + def initialize(expand: nil, version: nil); end + end + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UnarchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + sig { + params(params: T.any(::Stripe::InvoiceRenderingTemplate::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def archive(params = {}, opts = {}); end + + # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + sig { + params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplate::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def self.archive(template, params = {}, opts = {}); end + + # List all templates, ordered by creation date, with the most recently created template appearing first. + sig { + params(params: T.any(::Stripe::InvoiceRenderingTemplate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Unarchive an invoice rendering template so it can be used on new Stripe objects again. + sig { + params(params: T.any(::Stripe::InvoiceRenderingTemplate::UnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def unarchive(params = {}, opts = {}); end + + # Unarchive an invoice rendering template so it can be used on new Stripe objects again. + sig { + params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplate::UnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def self.unarchive(template, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/authorization.rbi b/rbi/stripe/resources/issuing/authorization.rbi index 1681e6010..d1c0367a3 100644 --- a/rbi/stripe/resources/issuing/authorization.rbi +++ b/rbi/stripe/resources/issuing/authorization.rbi @@ -11,284 +11,1256 @@ module Stripe # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) class Authorization < APIResource class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject + # [Deprecated] An alphanumeric ID, though typical point of sales only support numeric entry. The card program can be configured to prompt for a vehicle ID, driver ID, or generic ID. sig { returns(T.nilable(String)) } attr_reader :alphanumeric_id + # Driver ID. sig { returns(T.nilable(String)) } attr_reader :driver_id + # Odometer reading. sig { returns(T.nilable(Integer)) } attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. sig { returns(T.nilable(String)) } attr_reader :unspecified_id + # User ID. sig { returns(T.nilable(String)) } attr_reader :user_id + # Vehicle number. sig { returns(T.nilable(String)) } attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Quantity multiplied by Fuel Unit Cost, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject + # Amount of state or provincial Sales Tax included in the transaction amount. `null` if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. `null` if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :national_amount_decimal end + # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. sig { returns(T.nilable(NonFuel)) } attr_reader :non_fuel + # Information about tax included in this transaction. sig { returns(T.nilable(Tax)) } attr_reader :tax end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. sig { returns(T.nilable(CardholderPromptData)) } attr_reader :cardholder_prompt_data + # The type of purchase. sig { returns(T.nilable(String)) } attr_reader :purchase_type + # More information about the total amount. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. This information is not guaranteed to be accurate as some merchants may provide unreliable data. sig { returns(T.nilable(ReportedBreakdown)) } attr_reader :reported_breakdown + # The type of fuel service. sig { returns(T.nilable(String)) } attr_reader :service_type end class FraudChallenge < Stripe::StripeObject + # The method by which the fraud challenge was delivered to the cardholder. sig { returns(String) } attr_reader :channel + # The status of the fraud challenge. sig { returns(String) } attr_reader :status + # If the challenge is not deliverable, the reason why. sig { returns(T.nilable(String)) } attr_reader :undeliverable_reason end class Fuel < Stripe::StripeObject + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. sig { returns(T.nilable(String)) } attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :quantity_decimal + # The type of fuel that was purchased. sig { returns(T.nilable(String)) } attr_reader :type + # The units for `quantity_decimal`. sig { returns(T.nilable(String)) } attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_cost_decimal end class MerchantData < Stripe::StripeObject + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. sig { returns(String) } attr_reader :category + # The merchant category code for the seller’s business sig { returns(String) } attr_reader :category_code + # City where the seller is located sig { returns(T.nilable(String)) } attr_reader :city + # Country where the seller is located sig { returns(T.nilable(String)) } attr_reader :country + # Name of the seller sig { returns(T.nilable(String)) } attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. sig { returns(String) } attr_reader :network_id + # Postal code where the seller is located sig { returns(T.nilable(String)) } attr_reader :postal_code + # State where the seller is located sig { returns(T.nilable(String)) } attr_reader :state + # The seller's tax identification number. Currently populated for French merchants only. sig { returns(T.nilable(String)) } attr_reader :tax_id + # An ID assigned by the seller to the location of the sale. sig { returns(T.nilable(String)) } attr_reader :terminal_id + # URL provided by the merchant on a 3DS request sig { returns(T.nilable(String)) } attr_reader :url end class NetworkData < Stripe::StripeObject + # Identifier assigned to the acquirer by the card network. Sometimes this value is not provided by the network; in this case, the value will be `null`. sig { returns(T.nilable(String)) } attr_reader :acquiring_institution_id + # The System Trace Audit Number (STAN) is a 6-digit identifier assigned by the acquirer. Prefer `network_data.transaction_id` if present, unless you have special requirements. sig { returns(T.nilable(String)) } attr_reader :system_trace_audit_number + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class PendingRequest < Stripe::StripeObject class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end + # The additional amount Stripe will hold if the authorization is approved, in the card's [currency](https://stripe.com/docs/api#issuing_authorization_object-pending-request-currency) and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. sig { returns(T::Boolean) } attr_reader :is_amount_controllable + # The amount the merchant is requesting to be authorized in the `merchant_currency`. The amount is in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :merchant_amount + # The local currency the merchant is requesting to authorize. sig { returns(String) } attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. sig { returns(T.nilable(Integer)) } attr_reader :network_risk_score end class RequestHistory < Stripe::StripeObject class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end + # The `pending_request.amount` at the time of the request, presented in your card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Stripe held this amount from your account to fund the authorization if the request was approved. sig { returns(Integer) } attr_reader :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details + # Whether this request was approved. sig { returns(T::Boolean) } attr_reader :approved + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # Time at which the object was created. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :created + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # The `pending_request.merchant_amount` at the time of the request, presented in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :merchant_amount + # The currency that was collected by the merchant and presented to the cardholder for the authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :merchant_currency + # The card network's estimate of the likelihood that an authorization is fraudulent. Takes on values between 1 and 99. sig { returns(T.nilable(Integer)) } attr_reader :network_risk_score + # When an authorization is approved or declined by you or by Stripe, this field provides additional detail on the reason for the outcome. sig { returns(String) } attr_reader :reason + # If the `request_history.reason` is `webhook_error` because the direct webhook response is invalid (for example, parsing errors or missing parameters), we surface a more detailed error message via this field. sig { returns(T.nilable(String)) } attr_reader :reason_message + # Time when the card network received an authorization request from the acquirer in UTC. Referred to by networks as transmission time. sig { returns(T.nilable(Integer)) } attr_reader :requested_at end class Treasury < Stripe::StripeObject + # The array of [ReceivedCredits](https://stripe.com/docs/api/treasury/received_credits) associated with this authorization sig { returns(T::Array[String]) } attr_reader :received_credits + # The array of [ReceivedDebits](https://stripe.com/docs/api/treasury/received_debits) associated with this authorization sig { returns(T::Array[String]) } attr_reader :received_debits + # The Treasury [Transaction](https://stripe.com/docs/api/treasury/transactions) associated with this authorization sig { returns(T.nilable(String)) } attr_reader :transaction end class VerificationData < Stripe::StripeObject class AuthenticationExemption < Stripe::StripeObject + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. sig { returns(String) } attr_reader :claimed_by + # The specific exemption claimed for this authorization. sig { returns(String) } attr_reader :type end class ThreeDSecure < Stripe::StripeObject + # The outcome of the 3D Secure authentication request. sig { returns(String) } attr_reader :result end + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. sig { returns(String) } attr_reader :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. sig { returns(String) } attr_reader :address_postal_code_check + # The exemption applied to this authorization. sig { returns(T.nilable(AuthenticationExemption)) } attr_reader :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. sig { returns(String) } attr_reader :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. sig { returns(String) } attr_reader :expiry_check + # The postal code submitted as part of the authorization used for postal code verification. sig { returns(T.nilable(String)) } attr_reader :postal_code + # 3D Secure details. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure end - sig { returns(Integer) } # The total amount that was authorized or rejected. This amount is in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `amount` should be the same as `merchant_amount`, unless `currency` and `merchant_currency` are different. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(AmountDetails)) } # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details - sig { returns(T::Boolean) } # Whether the authorization has been approved. + sig { returns(T::Boolean) } attr_reader :approved - sig { returns(String) } # How the card details were provided. + sig { returns(String) } attr_reader :authorization_method - sig { returns(T::Array[Stripe::BalanceTransaction]) } # List of balance transactions associated with this authorization. + sig { returns(T::Array[Stripe::BalanceTransaction]) } attr_reader :balance_transactions - sig { returns(Stripe::Issuing::Card) } # You can [create physical or virtual cards](https://stripe.com/docs/issuing) that are issued to cardholders. + sig { returns(Stripe::Issuing::Card) } attr_reader :card - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } # The cardholder to whom this authorization belongs. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } attr_reader :cardholder - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The currency of the cardholder. This currency can be different from the currency presented at authorization and the `merchant_currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(Fleet)) } # Fleet-specific information for authorizations using Fleet cards. + sig { returns(T.nilable(Fleet)) } attr_reader :fleet - sig { returns(T.nilable(T::Array[FraudChallenge])) } # Fraud challenges sent to the cardholder, if this authorization was declined for fraud risk reasons. + sig { returns(T.nilable(T::Array[FraudChallenge])) } attr_reader :fraud_challenges - sig { returns(T.nilable(Fuel)) } # Information about fuel that was purchased with this transaction. Typically this information is received from the merchant after the authorization has been approved and the fuel dispensed. + sig { returns(T.nilable(Fuel)) } attr_reader :fuel - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Integer) } # The total amount that was authorized or rejected. This amount is in the `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). `merchant_amount` should be the same as `amount`, unless `merchant_currency` and `currency` are different. + sig { returns(Integer) } attr_reader :merchant_amount - sig { returns(String) } # The local currency that was presented to the cardholder for the authorization. This currency can be different from the cardholder currency and the `currency` field on this authorization. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :merchant_currency - sig { returns(MerchantData) } # Attribute for field merchant_data + sig { returns(MerchantData) } attr_reader :merchant_data - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NetworkData)) } # Details about the authorization, such as identifiers, set by the card network. + sig { returns(T.nilable(NetworkData)) } attr_reader :network_data - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PendingRequest)) } # The pending authorization request. This field will only be non-null during an `issuing_authorization.request` webhook. + sig { returns(T.nilable(PendingRequest)) } attr_reader :pending_request - sig { returns(T::Array[RequestHistory]) } # History of every time a `pending_request` authorization was approved/declined, either by you directly or by Stripe (e.g. based on your spending_controls). If the merchant changes the authorization by performing an incremental authorization, you can look at this field to see the previous requests for the authorization. This field can be helpful in determining why a given authorization was approved/declined. + sig { returns(T::Array[RequestHistory]) } attr_reader :request_history - sig { returns(String) } # The current status of the authorization in its lifecycle. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this authorization. If a network token was not used for this authorization, this field will be null. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } attr_reader :token - sig { returns(T::Array[Stripe::Issuing::Transaction]) } # List of [transactions](https://stripe.com/docs/api/issuing/transactions) associated with this authorization. + sig { returns(T::Array[Stripe::Issuing::Transaction]) } attr_reader :transactions - sig { returns(T.nilable(Treasury)) } # [Treasury](https://stripe.com/docs/api/treasury) details related to this authorization if it was created on a [FinancialAccount](https://stripe.com/docs/api/treasury/financial_accounts). + sig { returns(T.nilable(Treasury)) } attr_reader :treasury - sig { returns(VerificationData) } # Attribute for field verification_data + sig { returns(VerificationData) } attr_reader :verification_data - sig { returns(T.nilable(T::Boolean)) } # Whether the authorization bypassed fraud risk checks because the cardholder has previously completed a fraud challenge on a similar high-risk authorization from the same merchant. + sig { returns(T.nilable(T::Boolean)) } attr_reader :verified_by_fraud_challenge - sig { returns(T.nilable(String)) } # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + sig { returns(T.nilable(String)) } attr_reader :wallet + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return authorizations that belong to the given card. + sig { returns(String) } + attr_accessor :card + # Only return authorizations that belong to the given cardholder. + sig { returns(String) } + attr_accessor :cardholder + # Only return authorizations that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::Authorization::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + sig { returns(String) } + attr_accessor :status + sig { + params(card: String, cardholder: String, created: T.any(::Stripe::Issuing::Authorization::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class ApproveParams < Stripe::RequestParams + # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). + sig { returns(Integer) } + attr_accessor :amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(amount: Integer, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(amount: nil, expand: nil, metadata: nil); end + end + class DeclineParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class CreateParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + # The ATM withdrawal fee. + sig { returns(Integer) } + attr_accessor :atm_fee + # The amount of cash requested by the cardholder. + sig { returns(Integer) } + attr_accessor :cashback_amount + sig { params(atm_fee: Integer, cashback_amount: Integer).void } + def initialize(atm_fee: nil, cashback_amount: nil); end + end + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::Issuing::Authorization::CreateParams::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { returns(::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown) } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::Issuing::Authorization::CreateParams::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::Issuing::Authorization::CreateParams::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + sig { returns(String) } + attr_accessor :category + # City where the seller is located + sig { returns(String) } + attr_accessor :city + # Country where the seller is located + sig { returns(String) } + attr_accessor :country + # Name of the seller + sig { returns(String) } + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + sig { returns(String) } + attr_accessor :network_id + # Postal code where the seller is located + sig { returns(String) } + attr_accessor :postal_code + # State where the seller is located + sig { returns(String) } + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + sig { returns(String) } + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + sig { returns(String) } + attr_accessor :url + sig { + params(category: String, city: String, country: String, name: String, network_id: String, postal_code: String, state: String, terminal_id: String, url: String).void + } + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ); end + end + class NetworkData < Stripe::RequestParams + # Identifier assigned to the acquirer by the card network. + sig { returns(String) } + attr_accessor :acquiring_institution_id + sig { params(acquiring_institution_id: String).void } + def initialize(acquiring_institution_id: nil); end + end + class VerificationData < Stripe::RequestParams + class AuthenticationExemption < Stripe::RequestParams + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. + sig { returns(String) } + attr_accessor :claimed_by + # The specific exemption claimed for this authorization. + sig { returns(String) } + attr_accessor :type + sig { params(claimed_by: String, type: String).void } + def initialize(claimed_by: nil, type: nil); end + end + class ThreeDSecure < Stripe::RequestParams + # The outcome of the 3D Secure authentication request. + sig { returns(String) } + attr_accessor :result + sig { params(result: String).void } + def initialize(result: nil); end + end + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + sig { returns(String) } + attr_accessor :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + sig { returns(String) } + attr_accessor :address_postal_code_check + # The exemption applied to this authorization. + sig { + returns(::Stripe::Issuing::Authorization::CreateParams::VerificationData::AuthenticationExemption) + } + attr_accessor :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. + sig { returns(String) } + attr_accessor :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. + sig { returns(String) } + attr_accessor :expiry_check + # 3D Secure details. + sig { + returns(::Stripe::Issuing::Authorization::CreateParams::VerificationData::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(address_line1_check: String, address_postal_code_check: String, authentication_exemption: ::Stripe::Issuing::Authorization::CreateParams::VerificationData::AuthenticationExemption, cvc_check: String, expiry_check: String, three_d_secure: ::Stripe::Issuing::Authorization::CreateParams::VerificationData::ThreeDSecure).void + } + def initialize( + address_line1_check: nil, + address_postal_code_check: nil, + authentication_exemption: nil, + cvc_check: nil, + expiry_check: nil, + three_d_secure: nil + ); end + end + # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(::Stripe::Issuing::Authorization::CreateParams::AmountDetails) } + attr_accessor :amount_details + # How the card details were provided. Defaults to online. + sig { returns(String) } + attr_accessor :authorization_method + # Card associated with this authorization. + sig { returns(String) } + attr_accessor :card + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Fleet-specific information for authorizations using Fleet cards. + sig { returns(::Stripe::Issuing::Authorization::CreateParams::Fleet) } + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + sig { returns(::Stripe::Issuing::Authorization::CreateParams::Fuel) } + attr_accessor :fuel + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + sig { returns(T::Boolean) } + attr_accessor :is_amount_controllable + # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :merchant_amount + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :merchant_currency + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + sig { returns(::Stripe::Issuing::Authorization::CreateParams::MerchantData) } + attr_accessor :merchant_data + # Details about the authorization, such as identifiers, set by the card network. + sig { returns(::Stripe::Issuing::Authorization::CreateParams::NetworkData) } + attr_accessor :network_data + # Verifications that Stripe performed on information that the cardholder provided to the merchant. + sig { returns(::Stripe::Issuing::Authorization::CreateParams::VerificationData) } + attr_accessor :verification_data + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + sig { returns(String) } + attr_accessor :wallet + sig { + params(amount: Integer, amount_details: ::Stripe::Issuing::Authorization::CreateParams::AmountDetails, authorization_method: String, card: String, currency: String, expand: T::Array[String], fleet: ::Stripe::Issuing::Authorization::CreateParams::Fleet, fuel: ::Stripe::Issuing::Authorization::CreateParams::Fuel, is_amount_controllable: T::Boolean, merchant_amount: Integer, merchant_currency: String, merchant_data: ::Stripe::Issuing::Authorization::CreateParams::MerchantData, network_data: ::Stripe::Issuing::Authorization::CreateParams::NetworkData, verification_data: ::Stripe::Issuing::Authorization::CreateParams::VerificationData, wallet: String).void + } + def initialize( + amount: nil, + amount_details: nil, + authorization_method: nil, + card: nil, + currency: nil, + expand: nil, + fleet: nil, + fuel: nil, + is_amount_controllable: nil, + merchant_amount: nil, + merchant_currency: nil, + merchant_data: nil, + network_data: nil, + verification_data: nil, + wallet: nil + ); end + end + class CaptureParams < Stripe::RequestParams + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + sig { returns(String) } + attr_accessor :arrival_airport_code + # The airline carrier code. + sig { returns(String) } + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + sig { returns(String) } + attr_accessor :departure_airport_code + # The flight number. + sig { returns(String) } + attr_accessor :flight_number + # The flight's service class. + sig { returns(String) } + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + sig { returns(T::Boolean) } + attr_accessor :stopover_allowed + sig { + params(arrival_airport_code: String, carrier: String, departure_airport_code: String, flight_number: String, service_class: String, stopover_allowed: T::Boolean).void + } + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ); end + end + # The time that the flight departed. + sig { returns(Integer) } + attr_accessor :departure_at + # The name of the passenger. + sig { returns(String) } + attr_accessor :passenger_name + # Whether the ticket is refundable. + sig { returns(T::Boolean) } + attr_accessor :refundable + # The legs of the trip. + sig { + returns(T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight::Segment]) + } + attr_accessor :segments + # The travel agency that issued the ticket. + sig { returns(String) } + attr_accessor :travel_agency + sig { + params(departure_at: Integer, passenger_name: String, refundable: T::Boolean, segments: T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight::Segment], travel_agency: String).void + } + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + sig { returns(Integer) } + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + sig { returns(Integer) } + attr_accessor :nights + sig { params(check_in_at: Integer, nights: Integer).void } + def initialize(check_in_at: nil, nights: nil); end + end + class Receipt < Stripe::RequestParams + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # Attribute for param field quantity + sig { returns(String) } + attr_accessor :quantity + # Attribute for param field total + sig { returns(Integer) } + attr_accessor :total + # Attribute for param field unit_cost + sig { returns(Integer) } + attr_accessor :unit_cost + sig { + params(description: String, quantity: String, total: Integer, unit_cost: Integer).void + } + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + end + # Fleet-specific information for transactions using Fleet cards. + sig { returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet) } + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + sig { returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight) } + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + sig { returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fuel) } + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + sig { returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Lodging) } + attr_accessor :lodging + # The line items in the purchase. + sig { + returns(T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Receipt]) + } + attr_accessor :receipt + # A merchant-specific order number. + sig { returns(String) } + attr_accessor :reference + sig { + params(fleet: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fleet, flight: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Flight, fuel: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Fuel, lodging: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Lodging, receipt: T::Array[::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails::Receipt], reference: String).void + } + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ); end + end + # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :capture_amount + # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + sig { returns(T::Boolean) } + attr_accessor :close_authorization + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Additional purchase information that is optionally provided by the merchant. + sig { returns(::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails) } + attr_accessor :purchase_details + sig { + params(capture_amount: Integer, close_authorization: T::Boolean, expand: T::Array[String], purchase_details: ::Stripe::Issuing::Authorization::CaptureParams::PurchaseDetails).void + } + def initialize( + capture_amount: nil, + close_authorization: nil, + expand: nil, + purchase_details: nil + ); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FinalizeAmountParams < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :final_amount + # Fleet-specific information for authorizations using Fleet cards. + sig { returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet) } + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + sig { returns(::Stripe::Issuing::Authorization::FinalizeAmountParams::Fuel) } + attr_accessor :fuel + sig { + params(expand: T::Array[String], final_amount: Integer, fleet: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fleet, fuel: ::Stripe::Issuing::Authorization::FinalizeAmountParams::Fuel).void + } + def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end + end + class RespondParams < Stripe::RequestParams + # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + sig { returns(T::Boolean) } + attr_accessor :confirmed + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(confirmed: T::Boolean, expand: T::Array[String]).void } + def initialize(confirmed: nil, expand: nil); end + end + class IncrementParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :increment_amount + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + sig { returns(T::Boolean) } + attr_accessor :is_amount_controllable + sig { + params(expand: T::Array[String], increment_amount: Integer, is_amount_controllable: T::Boolean).void + } + def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil); end + end + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :reverse_amount + sig { params(expand: T::Array[String], reverse_amount: Integer).void } + def initialize(expand: nil, reverse_amount: nil); end + end + # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + sig { + params(params: T.any(::Stripe::Issuing::Authorization::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def approve(params = {}, opts = {}); end + + # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + sig { + params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def self.approve(authorization, params = {}, opts = {}); end + + # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + sig { + params(params: T.any(::Stripe::Issuing::Authorization::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def decline(params = {}, opts = {}); end + + # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + sig { + params(authorization: String, params: T.any(::Stripe::Issuing::Authorization::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def self.decline(authorization, params = {}, opts = {}); end + + # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::Authorization::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Issuing::Authorization::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/card.rbi b/rbi/stripe/resources/issuing/card.rbi index c232e804e..7524b13d6 100644 --- a/rbi/stripe/resources/issuing/card.rbi +++ b/rbi/stripe/resources/issuing/card.rbi @@ -8,188 +8,731 @@ module Stripe class Card < APIResource class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressValidation < Stripe::StripeObject class NormalizedAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # The address validation capabilities to use. sig { returns(String) } attr_reader :mode + # The normalized shipping address. sig { returns(T.nilable(NormalizedAddress)) } attr_reader :normalized_address + # The validation result for the shipping address. sig { returns(T.nilable(String)) } attr_reader :result end class Customs < Stripe::StripeObject + # A registration number used for customs in Europe. See [https://www.gov.uk/eori](https://www.gov.uk/eori) for the UK and [https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en](https://ec.europa.eu/taxation_customs/business/customs-procedures-import-and-export/customs-procedures/economic-operators-registration-and-identification-number-eori_en) for the EU. sig { returns(T.nilable(String)) } attr_reader :eori_number end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Address validation details for the shipment. sig { returns(T.nilable(AddressValidation)) } attr_reader :address_validation + # The delivery company that shipped a card. sig { returns(T.nilable(String)) } attr_reader :carrier + # Additional information that may be required for clearing customs. sig { returns(T.nilable(Customs)) } attr_reader :customs + # A unix timestamp representing a best estimate of when the card will be delivered. sig { returns(T.nilable(Integer)) } attr_reader :eta + # Recipient name. sig { returns(String) } attr_reader :name + # The phone number of the receiver of the shipment. Our courier partners will use this number to contact you in the event of card delivery issues. For individual shipments to the EU/UK, if this field is empty, we will provide them with the phone number provided when the cardholder was initially created. sig { returns(T.nilable(String)) } attr_reader :phone_number + # Whether a signature is required for card delivery. This feature is only supported for US users. Standard shipping service does not support signature on delivery. The default value for standard shipping service is false and for express and priority services is true. sig { returns(T.nilable(T::Boolean)) } attr_reader :require_signature + # Shipment service, such as `standard` or `express`. sig { returns(String) } attr_reader :service + # The delivery status of the card. sig { returns(T.nilable(String)) } attr_reader :status + # A tracking number for a card shipment. sig { returns(T.nilable(String)) } attr_reader :tracking_number + # A link to the shipping carrier's site where you can view detailed information about a card shipment. sig { returns(T.nilable(String)) } attr_reader :tracking_url + # Packaging options. sig { returns(String) } attr_reader :type end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. sig { returns(T.nilable(T::Array[String])) } attr_reader :categories + # Interval (or event) to which the amount applies. sig { returns(String) } attr_reader :interval end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). sig { returns(T.nilable(T::Array[SpendingLimit])) } attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. Always the same as the currency of the card. sig { returns(T.nilable(String)) } attr_reader :spending_limits_currency end class Wallets < Stripe::StripeObject class ApplePay < Stripe::StripeObject + # Apple Pay Eligibility sig { returns(T::Boolean) } attr_reader :eligible + # Reason the card is ineligible for Apple Pay sig { returns(T.nilable(String)) } attr_reader :ineligible_reason end class GooglePay < Stripe::StripeObject + # Google Pay Eligibility sig { returns(T::Boolean) } attr_reader :eligible + # Reason the card is ineligible for Google Pay sig { returns(T.nilable(String)) } attr_reader :ineligible_reason end + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Unique identifier for a card used with digital wallets sig { returns(T.nilable(String)) } attr_reader :primary_account_identifier end - sig { returns(String) } # The brand of the card. + sig { returns(String) } attr_reader :brand - sig { returns(T.nilable(String)) } # The reason why the card was canceled. + sig { returns(T.nilable(String)) } attr_reader :cancellation_reason - sig { returns(Stripe::Issuing::Cardholder) } # An Issuing `Cardholder` object represents an individual or business entity who is [issued](https://stripe.com/docs/issuing) cards. # # Related guide: [How to create a cardholder](https://stripe.com/docs/issuing/cards/virtual/issue-cards#create-cardholder) + sig { returns(Stripe::Issuing::Cardholder) } attr_reader :cardholder - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Supported currencies are `usd` in the US, `eur` in the EU, and `gbp` in the UK. - attr_reader :currency sig { returns(String) } + attr_reader :currency # The card's CVC. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. + sig { returns(String) } attr_reader :cvc - sig { returns(Integer) } # The expiration month of the card. - attr_reader :exp_month sig { returns(Integer) } + attr_reader :exp_month # The expiration year of the card. + sig { returns(Integer) } attr_reader :exp_year - sig { returns(T.nilable(String)) } # The financial account this card is attached to. + sig { returns(T.nilable(String)) } attr_reader :financial_account - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # The last 4 digits of the card number. + sig { returns(String) } attr_reader :last4 - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The full unredacted card number. For security reasons, this is only available for virtual cards, and will be omitted unless you explicitly request it with [the `expand` parameter](https://stripe.com/docs/api/expanding_objects). Additionally, it's only available via the ["Retrieve a card" endpoint](https://stripe.com/docs/api/issuing/cards/retrieve), not via "List all cards" or any other endpoint. - attr_reader :number sig { returns(String) } + attr_reader :number # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) } # The personalization design object belonging to this card. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::PersonalizationDesign))) } attr_reader :personalization_design - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } # The latest card that replaces this card, if any. - attr_reader :replaced_by sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } + attr_reader :replaced_by # The card this card replaces, if any. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Card))) } attr_reader :replacement_for - sig { returns(T.nilable(String)) } # The reason why the previous card needed to be replaced. + sig { returns(T.nilable(String)) } attr_reader :replacement_reason - sig { returns(T.nilable(Shipping)) } # Where and how the card will be shipped. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping - sig { returns(SpendingControls) } # Attribute for field spending_controls + sig { returns(SpendingControls) } attr_reader :spending_controls - sig { returns(String) } # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. - attr_reader :status sig { returns(String) } + attr_reader :status # The type of the card. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Wallets)) } # Information relating to digital wallets (like Apple Pay and Google Pay). + sig { returns(T.nilable(Wallets)) } attr_reader :wallets + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return cards belonging to the Cardholder with the provided ID. + sig { returns(String) } + attr_accessor :cardholder + # Only return cards that were issued during the given date interval. + sig { returns(T.any(::Stripe::Issuing::Card::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Only return cards that have the given expiration month. + sig { returns(Integer) } + attr_accessor :exp_month + # Only return cards that have the given expiration year. + sig { returns(Integer) } + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return cards that have the given last four digits. + sig { returns(String) } + attr_accessor :last4 + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Attribute for param field personalization_design + sig { returns(String) } + attr_accessor :personalization_design + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + sig { returns(String) } + attr_accessor :status + # Only return cards that have the given type. One of `virtual` or `physical`. + sig { returns(String) } + attr_accessor :type + sig { + params(cardholder: String, created: T.any(::Stripe::Issuing::Card::ListParams::Created, Integer), ending_before: String, exp_month: Integer, exp_year: Integer, expand: T::Array[String], last4: String, limit: Integer, personalization_design: String, starting_after: String, status: String, type: String).void + } + def initialize( + cardholder: nil, + created: nil, + ending_before: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + last4: nil, + limit: nil, + personalization_design: nil, + starting_after: nil, + status: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + sig { returns(String) } + attr_accessor :encrypted_number + sig { params(encrypted_number: String).void } + def initialize(encrypted_number: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + sig { returns(String) } + attr_accessor :eori_number + sig { params(eori_number: String).void } + def initialize(eori_number: nil); end + end + # The address that the card is shipped to. + sig { returns(::Stripe::Issuing::Card::CreateParams::Shipping::Address) } + attr_accessor :address + # Address validation settings. + sig { returns(::Stripe::Issuing::Card::CreateParams::Shipping::AddressValidation) } + attr_accessor :address_validation + # Customs information for the shipment. + sig { returns(::Stripe::Issuing::Card::CreateParams::Shipping::Customs) } + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + sig { returns(String) } + attr_accessor :name + # Phone number of the recipient of the shipment. + sig { returns(String) } + attr_accessor :phone_number + # Whether a signature is required for card delivery. + sig { returns(T::Boolean) } + attr_accessor :require_signature + # Shipment service. + sig { returns(String) } + attr_accessor :service + # Packaging options. + sig { returns(String) } + attr_accessor :type + sig { + params(address: ::Stripe::Issuing::Card::CreateParams::Shipping::Address, address_validation: ::Stripe::Issuing::Card::CreateParams::Shipping::AddressValidation, customs: ::Stripe::Issuing::Card::CreateParams::Shipping::Customs, name: String, phone_number: String, require_signature: T::Boolean, service: String, type: String).void + } + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + sig { + returns(T::Array[::Stripe::Issuing::Card::CreateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::Card::CreateParams::SpendingControls::SpendingLimit]).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ); end + end + # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. + sig { returns(String) } + attr_accessor :cardholder + # The currency for the card. + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field financial_account + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The personalization design object belonging to this card. + sig { returns(String) } + attr_accessor :personalization_design + # The desired PIN for this card. + sig { returns(::Stripe::Issuing::Card::CreateParams::Pin) } + attr_accessor :pin + # The card this is meant to be a replacement for (if any). + sig { returns(String) } + attr_accessor :replacement_for + # If `replacement_for` is specified, this should indicate why that card is being replaced. + sig { returns(String) } + attr_accessor :replacement_reason + # The second line to print on the card. Max length: 24 characters. + sig { returns(T.nilable(String)) } + attr_accessor :second_line + # The address where the card will be shipped. + sig { returns(::Stripe::Issuing::Card::CreateParams::Shipping) } + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::Card::CreateParams::SpendingControls) } + attr_accessor :spending_controls + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + sig { returns(String) } + attr_accessor :status + # The type of card to issue. Possible values are `physical` or `virtual`. + sig { returns(String) } + attr_accessor :type + sig { + params(cardholder: String, currency: String, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], personalization_design: String, pin: ::Stripe::Issuing::Card::CreateParams::Pin, replacement_for: String, replacement_reason: String, second_line: T.nilable(String), shipping: ::Stripe::Issuing::Card::CreateParams::Shipping, spending_controls: ::Stripe::Issuing::Card::CreateParams::SpendingControls, status: String, type: String).void + } + def initialize( + cardholder: nil, + currency: nil, + expand: nil, + financial_account: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + replacement_for: nil, + replacement_reason: nil, + second_line: nil, + shipping: nil, + spending_controls: nil, + status: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + sig { returns(String) } + attr_accessor :encrypted_number + sig { params(encrypted_number: String).void } + def initialize(encrypted_number: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + sig { returns(String) } + attr_accessor :eori_number + sig { params(eori_number: String).void } + def initialize(eori_number: nil); end + end + # The address that the card is shipped to. + sig { returns(::Stripe::Issuing::Card::UpdateParams::Shipping::Address) } + attr_accessor :address + # Address validation settings. + sig { returns(::Stripe::Issuing::Card::UpdateParams::Shipping::AddressValidation) } + attr_accessor :address_validation + # Customs information for the shipment. + sig { returns(::Stripe::Issuing::Card::UpdateParams::Shipping::Customs) } + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + sig { returns(String) } + attr_accessor :name + # Phone number of the recipient of the shipment. + sig { returns(String) } + attr_accessor :phone_number + # Whether a signature is required for card delivery. + sig { returns(T::Boolean) } + attr_accessor :require_signature + # Shipment service. + sig { returns(String) } + attr_accessor :service + # Packaging options. + sig { returns(String) } + attr_accessor :type + sig { + params(address: ::Stripe::Issuing::Card::UpdateParams::Shipping::Address, address_validation: ::Stripe::Issuing::Card::UpdateParams::Shipping::AddressValidation, customs: ::Stripe::Issuing::Card::UpdateParams::Shipping::Customs, name: String, phone_number: String, require_signature: T::Boolean, service: String, type: String).void + } + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + sig { + returns(T::Array[::Stripe::Issuing::Card::UpdateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::Card::UpdateParams::SpendingControls::SpendingLimit]).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ); end + end + # Reason why the `status` of this card is `canceled`. + sig { returns(String) } + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Attribute for param field personalization_design + sig { returns(String) } + attr_accessor :personalization_design + # The desired new PIN for this card. + sig { returns(::Stripe::Issuing::Card::UpdateParams::Pin) } + attr_accessor :pin + # Updated shipping information for the card. + sig { returns(::Stripe::Issuing::Card::UpdateParams::Shipping) } + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::Card::UpdateParams::SpendingControls) } + attr_accessor :spending_controls + # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + sig { returns(String) } + attr_accessor :status + sig { + params(cancellation_reason: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), personalization_design: String, pin: ::Stripe::Issuing::Card::UpdateParams::Pin, shipping: ::Stripe::Issuing::Card::UpdateParams::Shipping, spending_controls: ::Stripe::Issuing::Card::UpdateParams::SpendingControls, status: String).void + } + def initialize( + cancellation_reason: nil, + expand: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + shipping: nil, + spending_controls: nil, + status: nil + ); end + end + class DeliverCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FailCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReturnCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ShipCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SubmitCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates an Issuing Card object. + sig { + params(params: T.any(::Stripe::Issuing::Card::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::Card::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Issuing::Card::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/cardholder.rbi b/rbi/stripe/resources/issuing/cardholder.rbi index ee2b27fe1..67a7ca638 100644 --- a/rbi/stripe/resources/issuing/cardholder.rbi +++ b/rbi/stripe/resources/issuing/cardholder.rbi @@ -10,145 +10,723 @@ module Stripe class Cardholder < APIResource class Billing < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class Company < Stripe::StripeObject + # Whether the company's business ID number was provided. sig { returns(T::Boolean) } attr_reader :tax_id_provided end class Individual < Stripe::StripeObject class CardIssuing < Stripe::StripeObject class UserTermsAcceptance < Stripe::StripeObject + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. sig { returns(T.nilable(UserTermsAcceptance)) } attr_reader :user_terms_acceptance end class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end class Verification < Stripe::StripeObject class Document < Stripe::StripeObject + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end + # An identifying document, either a passport or local ID card. sig { returns(T.nilable(Document)) } attr_reader :document end + # Information related to the card_issuing program for this cardholder. sig { returns(T.nilable(CardIssuing)) } attr_reader :card_issuing + # The date of birth of this cardholder. sig { returns(T.nilable(Dob)) } attr_reader :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. sig { returns(T.nilable(String)) } attr_reader :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. sig { returns(T.nilable(String)) } attr_reader :last_name + # Government-issued ID document for this cardholder. sig { returns(T.nilable(Verification)) } attr_reader :verification end class Requirements < Stripe::StripeObject + # If `disabled_reason` is present, all cards will decline authorizations with `cardholder_verification_required` reason. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Array of fields that need to be collected in order to verify and re-enable the cardholder. sig { returns(T.nilable(T::Array[String])) } attr_reader :past_due end class SpendingControls < Stripe::StripeObject class SpendingLimit < Stripe::StripeObject + # Maximum amount allowed to spend per interval. This amount is in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. sig { returns(T.nilable(T::Array[String])) } attr_reader :categories + # Interval (or event) to which the amount applies. sig { returns(String) } attr_reader :interval end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. sig { returns(T.nilable(T::Array[String])) } attr_reader :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. sig { returns(T.nilable(T::Array[SpendingLimit])) } attr_reader :spending_limits + # Currency of the amounts within `spending_limits`. sig { returns(T.nilable(String)) } attr_reader :spending_limits_currency end - sig { returns(Billing) } # Attribute for field billing + sig { returns(Billing) } attr_reader :billing - sig { returns(T.nilable(Company)) } # Additional information about a `company` cardholder. + sig { returns(T.nilable(Company)) } attr_reader :company - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # The cardholder's email address. + sig { returns(T.nilable(String)) } attr_reader :email - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(Individual)) } # Additional information about an `individual` cardholder. + sig { returns(T.nilable(Individual)) } attr_reader :individual - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The cardholder's name. This will be printed on cards issued to them. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + sig { returns(T.nilable(String)) } attr_reader :phone_number - sig { returns(T.nilable(T::Array[String])) } # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales - sig { returns(Requirements) } # Attribute for field requirements + sig { returns(Requirements) } attr_reader :requirements - sig { returns(T.nilable(SpendingControls)) } # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(T.nilable(SpendingControls)) } attr_reader :spending_controls - sig { returns(String) } # Specifies whether to permit authorizations on this cardholder's cards. - attr_reader :status sig { returns(String) } + attr_reader :status # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return cardholders that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::Cardholder::ListParams::Created, Integer)) } + attr_accessor :created + # Only return cardholders that have the given email address. + sig { returns(String) } + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return cardholders that have the given phone number. + sig { returns(String) } + attr_accessor :phone_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + sig { returns(String) } + attr_accessor :status + # Only return cardholders that have the given type. One of `individual` or `company`. + sig { returns(String) } + attr_accessor :type + sig { + params(created: T.any(::Stripe::Issuing::Cardholder::ListParams::Created, Integer), email: String, ending_before: String, expand: T::Array[String], limit: Integer, phone_number: String, starting_after: String, status: String, type: String).void + } + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + phone_number: nil, + starting_after: nil, + status: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The cardholder’s billing address. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Billing::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Issuing::Cardholder::CreateParams::Billing::Address).void + } + def initialize(address: nil); end + end + class Company < Stripe::RequestParams + # The entity's business ID number. + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + sig { + returns(::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing::UserTermsAcceptance) + } + attr_accessor :user_terms_acceptance + sig { + params(user_terms_acceptance: ::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing::UserTermsAcceptance).void + } + def initialize(user_terms_acceptance: nil); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(document: ::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification::Document).void + } + def initialize(document: nil); end + end + # Information related to the card_issuing program for this cardholder. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing) } + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Individual::Dob) } + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :last_name + # Government-issued ID document for this cardholder. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification) } + attr_accessor :verification + sig { + params(card_issuing: ::Stripe::Issuing::Cardholder::CreateParams::Individual::CardIssuing, dob: ::Stripe::Issuing::Cardholder::CreateParams::Individual::Dob, first_name: String, last_name: String, verification: ::Stripe::Issuing::Cardholder::CreateParams::Individual::Verification).void + } + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + sig { + returns(T::Array[::Stripe::Issuing::Cardholder::CreateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + sig { returns(String) } + attr_accessor :spending_limits_currency + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::Cardholder::CreateParams::SpendingControls::SpendingLimit], spending_limits_currency: String).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ); end + end + # The cardholder's billing address. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Billing) } + attr_accessor :billing + # Additional information about a `company` cardholder. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Company) } + attr_accessor :company + # The cardholder's email address. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Additional information about an `individual` cardholder. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. + sig { returns(String) } + attr_accessor :name + # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. + # While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + sig { returns(String) } + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::Cardholder::CreateParams::SpendingControls) } + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + sig { returns(String) } + attr_accessor :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + sig { returns(String) } + attr_accessor :type + sig { + params(billing: ::Stripe::Issuing::Cardholder::CreateParams::Billing, company: ::Stripe::Issuing::Cardholder::CreateParams::Company, email: String, expand: T::Array[String], individual: ::Stripe::Issuing::Cardholder::CreateParams::Individual, metadata: T::Hash[String, String], name: String, phone_number: String, preferred_locales: T::Array[String], spending_controls: ::Stripe::Issuing::Cardholder::CreateParams::SpendingControls, status: String, type: String).void + } + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + name: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The cardholder’s billing address. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Billing::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Issuing::Cardholder::UpdateParams::Billing::Address).void + } + def initialize(address: nil); end + end + class Company < Stripe::RequestParams + # The entity's business ID number. + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + sig { + returns(::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing::UserTermsAcceptance) + } + attr_accessor :user_terms_acceptance + sig { + params(user_terms_acceptance: ::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing::UserTermsAcceptance).void + } + def initialize(user_terms_acceptance: nil); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(document: ::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification::Document).void + } + def initialize(document: nil); end + end + # Information related to the card_issuing program for this cardholder. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing) } + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Dob) } + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :last_name + # Government-issued ID document for this cardholder. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification) } + attr_accessor :verification + sig { + params(card_issuing: ::Stripe::Issuing::Cardholder::UpdateParams::Individual::CardIssuing, dob: ::Stripe::Issuing::Cardholder::UpdateParams::Individual::Dob, first_name: String, last_name: String, verification: ::Stripe::Issuing::Cardholder::UpdateParams::Individual::Verification).void + } + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + sig { + returns(T::Array[::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + sig { returns(String) } + attr_accessor :spending_limits_currency + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls::SpendingLimit], spending_limits_currency: String).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ); end + end + # The cardholder's billing address. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Billing) } + attr_accessor :billing + # Additional information about a `company` cardholder. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Company) } + attr_accessor :company + # The cardholder's email address. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Additional information about an `individual` cardholder. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + sig { returns(String) } + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls) } + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. + sig { returns(String) } + attr_accessor :status + sig { + params(billing: ::Stripe::Issuing::Cardholder::UpdateParams::Billing, company: ::Stripe::Issuing::Cardholder::UpdateParams::Company, email: String, expand: T::Array[String], individual: ::Stripe::Issuing::Cardholder::UpdateParams::Individual, metadata: T::Hash[String, String], phone_number: String, preferred_locales: T::Array[String], spending_controls: ::Stripe::Issuing::Cardholder::UpdateParams::SpendingControls, status: String).void + } + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil + ); end + end + # Creates a new Issuing Cardholder object that can be issued cards. + sig { + params(params: T.any(::Stripe::Issuing::Cardholder::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::Cardholder::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Issuing::Cardholder::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi index 7bad74caf..6a0f87d52 100644 --- a/rbi/stripe/resources/issuing/credit_underwriting_record.rbi +++ b/rbi/stripe/resources/issuing/credit_underwriting_record.rbi @@ -9,104 +9,614 @@ module Stripe # [Follow the guide](https://stripe.com/docs/issuing/credit/report-credit-decisions-and-manage-aans) to learn about your requirements as a platform. class CreditUnderwritingRecord < APIResource class Application < Stripe::StripeObject + # The channel through which the applicant has submitted their application. sig { returns(String) } attr_reader :application_method + # Scope of demand made by the applicant. sig { returns(String) } attr_reader :purpose + # Date when the applicant submitted their application. sig { returns(Integer) } attr_reader :submitted_at end class CreditUser < Stripe::StripeObject + # Email of the applicant or accountholder. sig { returns(String) } attr_reader :email + # Full name of the company or person. sig { returns(String) } attr_reader :name end class Decision < Stripe::StripeObject class ApplicationRejected < Stripe::StripeObject + # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation + # List of reasons why the application was rejected up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end class CreditLimitApproved < Stripe::StripeObject + # Credit amount approved. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end class CreditLimitDecreased < Stripe::StripeObject + # Credit amount approved after decrease. An approved credit limit is required before you can set a amount in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy). sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end class CreditLineClosed < Stripe::StripeObject + # Details about the `reasons.other` when present. sig { returns(T.nilable(String)) } attr_reader :reason_other_explanation + # List of reasons why the existing account was closed, up to 4 reasons, in order of importance. sig { returns(T::Array[String]) } attr_reader :reasons end + # Details about a decision application_rejected. sig { returns(T.nilable(ApplicationRejected)) } attr_reader :application_rejected + # Details about a decision credit_limit_approved. sig { returns(T.nilable(CreditLimitApproved)) } attr_reader :credit_limit_approved + # Details about a decision credit_limit_decreased. sig { returns(T.nilable(CreditLimitDecreased)) } attr_reader :credit_limit_decreased + # Details about a decision credit_line_closed. sig { returns(T.nilable(CreditLineClosed)) } attr_reader :credit_line_closed + # Outcome of the decision. sig { returns(String) } attr_reader :type end class UnderwritingException < Stripe::StripeObject + # Written explanation for the exception. sig { returns(String) } attr_reader :explanation + # The decision before the exception was applied. sig { returns(String) } attr_reader :original_decision_type end - sig { returns(T.nilable(Application)) } # For decisions triggered by an application, details about the submission. + sig { returns(T.nilable(Application)) } attr_reader :application - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The event that triggered the underwriting. + sig { returns(String) } attr_reader :created_from - sig { returns(CreditUser) } # Attribute for field credit_user + sig { returns(CreditUser) } attr_reader :credit_user - sig { returns(T.nilable(Integer)) } # Date when a decision was made. + sig { returns(T.nilable(Integer)) } attr_reader :decided_at - sig { returns(T.nilable(Decision)) } # Details about the decision. + sig { returns(T.nilable(Decision)) } attr_reader :decision - sig { returns(T.nilable(Integer)) } # For underwriting initiated by an application, a decision must be taken 30 days after the submission. + sig { returns(T.nilable(Integer)) } attr_reader :decision_deadline - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + sig { returns(T.nilable(String)) } attr_reader :regulatory_reporting_file - sig { returns(T.nilable(UnderwritingException)) } # If an exception to the usual underwriting criteria was made for this application, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { returns(T.nilable(UnderwritingException)) } attr_reader :underwriting_exception + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CorrectParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + sig { returns(String) } + attr_accessor :application_method + # Scope of demand made by the applicant. + sig { returns(String) } + attr_accessor :purpose + # Date when the applicant submitted their application. + sig { returns(Integer) } + attr_accessor :submitted_at + sig { params(application_method: String, purpose: String, submitted_at: Integer).void } + def initialize(application_method: nil, purpose: nil, submitted_at: nil); end + end + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + sig { returns(String) } + attr_accessor :email + # Full name of the company or person. + sig { returns(String) } + attr_accessor :name + sig { params(email: String, name: String).void } + def initialize(email: nil, name: nil); end + end + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { + params(amount: Integer, currency: String, reason_other_explanation: String, reasons: T::Array[String]).void + } + def initialize( + amount: nil, + currency: nil, + reason_other_explanation: nil, + reasons: nil + ); end + end + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + # Details about the application rejection. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::ApplicationRejected) + } + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::CreditLimitApproved) + } + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::CreditLimitDecreased) + } + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::CreditLineClosed) + } + attr_accessor :credit_line_closed + # Outcome of the decision. + sig { returns(String) } + attr_accessor :type + sig { + params(application_rejected: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::ApplicationRejected, credit_limit_approved: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::CreditLimitApproved, credit_limit_decreased: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::CreditLimitDecreased, credit_line_closed: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision::CreditLineClosed, type: String).void + } + def initialize( + application_rejected: nil, + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ); end + end + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + sig { returns(String) } + attr_accessor :explanation + # The decision before the exception was applied. + sig { returns(String) } + attr_accessor :original_decision_type + sig { params(explanation: String, original_decision_type: String).void } + def initialize(explanation: nil, original_decision_type: nil); end + end + # Details about the application submission. + sig { returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Application) } + attr_accessor :application + # Information about the company or person applying or holding the account. + sig { returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::CreditUser) } + attr_accessor :credit_user + # Date when a decision was made. + sig { returns(Integer) } + attr_accessor :decided_at + # Details about the decision. + sig { returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision) } + attr_accessor :decision + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + sig { returns(String) } + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::UnderwritingException) + } + attr_accessor :underwriting_exception + sig { + params(application: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Application, credit_user: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::CreditUser, decided_at: Integer, decision: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::Decision, expand: T::Array[String], metadata: T::Hash[String, String], regulatory_reporting_file: String, underwriting_exception: ::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams::UnderwritingException).void + } + def initialize( + application: nil, + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ); end + end + class ReportDecisionParams < Stripe::RequestParams + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + # Details about the application rejection. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::Decision::ApplicationRejected) + } + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::Decision::CreditLimitApproved) + } + attr_accessor :credit_limit_approved + # Outcome of the decision. + sig { returns(String) } + attr_accessor :type + sig { + params(application_rejected: ::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::Decision::ApplicationRejected, credit_limit_approved: ::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::Decision::CreditLimitApproved, type: String).void + } + def initialize(application_rejected: nil, credit_limit_approved: nil, type: nil); end + end + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + sig { returns(String) } + attr_accessor :explanation + # The decision before the exception was applied. + sig { returns(String) } + attr_accessor :original_decision_type + sig { params(explanation: String, original_decision_type: String).void } + def initialize(explanation: nil, original_decision_type: nil); end + end + # Date when a decision was made. + sig { returns(Integer) } + attr_accessor :decided_at + # Details about the decision. + sig { returns(::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::Decision) } + attr_accessor :decision + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + sig { returns(String) } + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::UnderwritingException) + } + attr_accessor :underwriting_exception + sig { + params(decided_at: Integer, decision: ::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::Decision, expand: T::Array[String], metadata: T::Hash[String, String], regulatory_reporting_file: String, underwriting_exception: ::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams::UnderwritingException).void + } + def initialize( + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ); end + end + class CreateFromApplicationParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + sig { returns(String) } + attr_accessor :application_method + # Scope of demand made by the applicant. + sig { returns(String) } + attr_accessor :purpose + # Date when the applicant submitted their application. + sig { returns(Integer) } + attr_accessor :submitted_at + sig { params(application_method: String, purpose: String, submitted_at: Integer).void } + def initialize(application_method: nil, purpose: nil, submitted_at: nil); end + end + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + sig { returns(String) } + attr_accessor :email + # Full name of the company or person. + sig { returns(String) } + attr_accessor :name + sig { params(email: String, name: String).void } + def initialize(email: nil, name: nil); end + end + # Details about the application submission. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromApplicationParams::Application) + } + attr_accessor :application + # Information about the company or person applying or holding the account. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromApplicationParams::CreditUser) + } + attr_accessor :credit_user + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(application: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromApplicationParams::Application, credit_user: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromApplicationParams::CreditUser, expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(application: nil, credit_user: nil, expand: nil, metadata: nil); end + end + class CreateFromProactiveReviewParams < Stripe::RequestParams + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + sig { returns(String) } + attr_accessor :email + # Full name of the company or person. + sig { returns(String) } + attr_accessor :name + sig { params(email: String, name: String).void } + def initialize(email: nil, name: nil); end + end + class Decision < Stripe::RequestParams + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { + params(amount: Integer, currency: String, reason_other_explanation: String, reasons: T::Array[String]).void + } + def initialize( + amount: nil, + currency: nil, + reason_other_explanation: nil, + reasons: nil + ); end + end + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision::CreditLimitApproved) + } + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision::CreditLimitDecreased) + } + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision::CreditLineClosed) + } + attr_accessor :credit_line_closed + # Outcome of the decision. + sig { returns(String) } + attr_accessor :type + sig { + params(credit_limit_approved: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision::CreditLimitApproved, credit_limit_decreased: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision::CreditLimitDecreased, credit_line_closed: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision::CreditLineClosed, type: String).void + } + def initialize( + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ); end + end + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + sig { returns(String) } + attr_accessor :explanation + # The decision before the exception was applied. + sig { returns(String) } + attr_accessor :original_decision_type + sig { params(explanation: String, original_decision_type: String).void } + def initialize(explanation: nil, original_decision_type: nil); end + end + # Information about the company or person applying or holding the account. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::CreditUser) + } + attr_accessor :credit_user + # Date when a decision was made. + sig { returns(Integer) } + attr_accessor :decided_at + # Details about the decision. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision) + } + attr_accessor :decision + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + sig { returns(String) } + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::UnderwritingException) + } + attr_accessor :underwriting_exception + sig { + params(credit_user: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::CreditUser, decided_at: Integer, decision: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::Decision, expand: T::Array[String], metadata: T::Hash[String, String], regulatory_reporting_file: String, underwriting_exception: ::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams::UnderwritingException).void + } + def initialize( + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ); end + end + # Update a CreditUnderwritingRecord object to correct mistakes. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def correct(params = {}, opts = {}); end + + # Update a CreditUnderwritingRecord object to correct mistakes. + sig { + params(credit_underwriting_record: String, params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::CorrectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def self.correct(credit_underwriting_record, params = {}, opts = {}); end + + # Creates a CreditUnderwritingRecord object with information about a credit application submission. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromApplicationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def self.create_from_application(params = {}, opts = {}); end + + # Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::CreateFromProactiveReviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def self.create_from_proactive_review(params = {}, opts = {}); end + + # Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Update a CreditUnderwritingRecord object from a decision made on a credit application. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def report_decision(params = {}, opts = {}); end + + # Update a CreditUnderwritingRecord object from a decision made on a credit application. + sig { + params(credit_underwriting_record: String, params: T.any(::Stripe::Issuing::CreditUnderwritingRecord::ReportDecisionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def self.report_decision(credit_underwriting_record, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/dispute.rbi b/rbi/stripe/resources/issuing/dispute.rbi index cf2ab7e68..2fa139ad2 100644 --- a/rbi/stripe/resources/issuing/dispute.rbi +++ b/rbi/stripe/resources/issuing/dispute.rbi @@ -10,165 +10,891 @@ module Stripe class Dispute < APIResource class Evidence < Stripe::StripeObject class Canceled < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Date when order was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Whether the cardholder was provided with a cancellation policy. sig { returns(T.nilable(T::Boolean)) } attr_reader :cancellation_policy_provided + # Reason for canceling the order. sig { returns(T.nilable(String)) } attr_reader :cancellation_reason + # Date when the cardholder expected to receive the product. sig { returns(T.nilable(Integer)) } attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description + # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type + # Result of cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_status + # Date when the product was returned or attempted to be returned. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class Duplicate < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :check_image + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. sig { returns(T.nilable(String)) } attr_reader :original_transaction end class Fraudulent < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation end class MerchandiseNotAsDescribed < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Date when the product was received. sig { returns(T.nilable(Integer)) } attr_reader :received_at + # Description of the cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_description + # Result of cardholder's attempt to return the product. sig { returns(T.nilable(String)) } attr_reader :return_status + # Date when the product was returned or attempted to be returned. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class NoValidAuthorization < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation end class NotReceived < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Date when the cardholder expected to receive the product. sig { returns(T.nilable(Integer)) } attr_reader :expected_at + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description + # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type end class Other < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Description of the merchandise or service that was purchased. sig { returns(T.nilable(String)) } attr_reader :product_description + # Whether the product was a merchandise or service. sig { returns(T.nilable(String)) } attr_reader :product_type end class ServiceNotAsDescribed < Stripe::StripeObject + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :additional_documentation + # Date when order was canceled. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Reason for canceling the order. sig { returns(T.nilable(String)) } attr_reader :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. sig { returns(T.nilable(String)) } attr_reader :explanation + # Date when the product was received. sig { returns(T.nilable(Integer)) } attr_reader :received_at end + # Attribute for field canceled sig { returns(Canceled) } attr_reader :canceled + # Attribute for field duplicate sig { returns(Duplicate) } attr_reader :duplicate + # Attribute for field fraudulent sig { returns(Fraudulent) } attr_reader :fraudulent + # Attribute for field merchandise_not_as_described sig { returns(MerchandiseNotAsDescribed) } attr_reader :merchandise_not_as_described + # Attribute for field no_valid_authorization sig { returns(NoValidAuthorization) } attr_reader :no_valid_authorization + # Attribute for field not_received sig { returns(NotReceived) } attr_reader :not_received + # Attribute for field other sig { returns(Other) } attr_reader :other + # The reason for filing the dispute. Its value will match the field containing the evidence. sig { returns(String) } attr_reader :reason + # Attribute for field service_not_as_described sig { returns(ServiceNotAsDescribed) } attr_reader :service_not_as_described end class Treasury < Stripe::StripeObject + # The Treasury [DebitReversal](https://stripe.com/docs/api/treasury/debit_reversals) representing this Issuing dispute sig { returns(T.nilable(String)) } attr_reader :debit_reversal + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) that is being disputed. sig { returns(String) } attr_reader :received_debit end - sig { returns(Integer) } # Disputed amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). Usually the amount of the `transaction`, but can differ (usually because of currency fluctuation). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) } # List of balance transactions associated with the dispute. + sig { returns(T.nilable(T::Array[Stripe::BalanceTransaction])) } attr_reader :balance_transactions - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The currency the `transaction` was made in. + sig { returns(String) } attr_reader :currency - sig { returns(Evidence) } # Attribute for field evidence + sig { returns(Evidence) } attr_reader :evidence - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The enum that describes the dispute loss outcome. If the dispute is not lost, this field will be absent. New enum values may be added in the future, so be sure to handle unknown values. + sig { returns(String) } attr_reader :loss_reason - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Current status of the dispute. + sig { returns(String) } attr_reader :status - sig { returns(T.any(String, Stripe::Issuing::Transaction)) } # The transaction being disputed. + sig { returns(T.any(String, Stripe::Issuing::Transaction)) } attr_reader :transaction - sig { returns(T.nilable(Treasury)) } # [Treasury](https://stripe.com/docs/api/treasury) details related to this dispute if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + sig { returns(T.nilable(Treasury)) } attr_reader :treasury + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return Issuing disputes that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::Dispute::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Select Issuing disputes with the given status. + sig { returns(String) } + attr_accessor :status + # Select the Issuing dispute for the given transaction. + sig { returns(String) } + attr_accessor :transaction + sig { + params(created: T.any(::Stripe::Issuing::Dispute::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String, transaction: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + transaction: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_policy_provided: T.nilable(T::Boolean), cancellation_reason: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ); end + end + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + sig { returns(T.nilable(String)) } + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + sig { returns(T.nilable(String)) } + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + sig { returns(T.nilable(String)) } + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + sig { returns(String) } + attr_accessor :original_transaction + sig { + params(additional_documentation: T.nilable(String), card_statement: T.nilable(String), cash_receipt: T.nilable(String), check_image: T.nilable(String), explanation: T.nilable(String), original_transaction: String).void + } + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ); end + end + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer), return_description: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ); end + end + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_reason: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ); end + end + # Evidence provided when `reason` is 'canceled'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Canceled)) } + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Duplicate)) } + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Fraudulent)) } + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::MerchandiseNotAsDescribed)) + } + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::NoValidAuthorization)) + } + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::NotReceived)) + } + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Other)) } + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + sig { returns(String) } + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::ServiceNotAsDescribed)) + } + attr_accessor :service_not_as_described + sig { + params(canceled: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Canceled), duplicate: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Duplicate), fraudulent: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Fraudulent), merchandise_not_as_described: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::MerchandiseNotAsDescribed), no_valid_authorization: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::NoValidAuthorization), not_received: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::NotReceived), other: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::Other), reason: String, service_not_as_described: T.nilable(::Stripe::Issuing::Dispute::CreateParams::Evidence::ServiceNotAsDescribed)).void + } + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ); end + end + class Treasury < Stripe::RequestParams + # The ID of the ReceivedDebit to initiate an Issuings dispute for. + sig { returns(String) } + attr_accessor :received_debit + sig { params(received_debit: String).void } + def initialize(received_debit: nil); end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + sig { returns(Integer) } + attr_accessor :amount + # Evidence provided for the dispute. + sig { returns(::Stripe::Issuing::Dispute::CreateParams::Evidence) } + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + sig { returns(String) } + attr_accessor :transaction + # Params for disputes related to Treasury FinancialAccounts + sig { returns(::Stripe::Issuing::Dispute::CreateParams::Treasury) } + attr_accessor :treasury + sig { + params(amount: Integer, evidence: ::Stripe::Issuing::Dispute::CreateParams::Evidence, expand: T::Array[String], metadata: T::Hash[String, String], transaction: String, treasury: ::Stripe::Issuing::Dispute::CreateParams::Treasury).void + } + def initialize( + amount: nil, + evidence: nil, + expand: nil, + metadata: nil, + transaction: nil, + treasury: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_policy_provided: T.nilable(T::Boolean), cancellation_reason: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ); end + end + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + sig { returns(T.nilable(String)) } + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + sig { returns(T.nilable(String)) } + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + sig { returns(T.nilable(String)) } + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + sig { returns(String) } + attr_accessor :original_transaction + sig { + params(additional_documentation: T.nilable(String), card_statement: T.nilable(String), cash_receipt: T.nilable(String), check_image: T.nilable(String), explanation: T.nilable(String), original_transaction: String).void + } + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ); end + end + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer), return_description: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ); end + end + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_reason: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ); end + end + # Evidence provided when `reason` is 'canceled'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Canceled)) } + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Duplicate)) } + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Fraudulent)) } + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::MerchandiseNotAsDescribed)) + } + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::NoValidAuthorization)) + } + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::NotReceived)) + } + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + sig { returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Other)) } + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + sig { returns(String) } + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::ServiceNotAsDescribed)) + } + attr_accessor :service_not_as_described + sig { + params(canceled: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Canceled), duplicate: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Duplicate), fraudulent: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Fraudulent), merchandise_not_as_described: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::MerchandiseNotAsDescribed), no_valid_authorization: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::NoValidAuthorization), not_received: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::NotReceived), other: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::Other), reason: String, service_not_as_described: T.nilable(::Stripe::Issuing::Dispute::UpdateParams::Evidence::ServiceNotAsDescribed)).void + } + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ); end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Evidence provided for the dispute. + sig { returns(::Stripe::Issuing::Dispute::UpdateParams::Evidence) } + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(amount: Integer, evidence: ::Stripe::Issuing::Dispute::UpdateParams::Evidence, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil); end + end + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. + sig { + params(params: T.any(::Stripe::Issuing::Dispute::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::Dispute::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). + sig { + params(params: T.any(::Stripe::Issuing::Dispute::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def submit(params = {}, opts = {}); end + + # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). + sig { + params(dispute: String, params: T.any(::Stripe::Issuing::Dispute::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def self.submit(dispute, params = {}, opts = {}); end + + # Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string. + sig { + params(id: String, params: T.any(::Stripe::Issuing::Dispute::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi index 309ad946d..0059f22b3 100644 --- a/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi +++ b/rbi/stripe/resources/issuing/dispute_settlement_detail.rbi @@ -6,39 +6,78 @@ module Stripe module Issuing # Represents a record from the card network of a money movement or change in state for an Issuing dispute. These records are included in the settlement reports that we receive from networks and expose to users as Settlement objects. class DisputeSettlementDetail < APIResource - sig { returns(Integer) } # Disputed amount in the card’s currency and in the smallest currency unit. Usually the amount of the transaction, but can differ (usually because of currency fluctuation). + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } # The card used to make the original transaction. + sig { returns(String) } attr_reader :card - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The currency the original transaction was made in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # The ID of the linked dispute. - attr_reader :dispute sig { returns(String) } + attr_reader :dispute # The type of event corresponding to this dispute settlement detail, representing the stage in the dispute network lifecycle. - attr_reader :event_type sig { returns(String) } + attr_reader :event_type # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The card network for this dispute settlement detail. One of ["visa", "mastercard", "maestro"] - attr_reader :network sig { returns(String) } + attr_reader :network # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The ID of the linked card network settlement. + sig { returns(T.nilable(String)) } attr_reader :settlement + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Select the Issuing dispute settlement details for the given settlement. + sig { returns(String) } + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, settlement: String, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::DisputeSettlementDetail::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi index 2435ce53c..1825955f6 100644 --- a/rbi/stripe/resources/issuing/fraud_liability_debit.rbi +++ b/rbi/stripe/resources/issuing/fraud_liability_debit.rbi @@ -6,30 +6,85 @@ module Stripe module Issuing # A fraud liability debit occurs when Stripe debits a platform's account for fraud losses on Issuing transactions. class FraudLiabilityDebit < APIResource - sig { returns(Integer) } # Debited amount. This is equal to the disputed amount and is given in the card’s currency and in the smallest currency unit. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this debit. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The currency of the debit. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # The ID of the linked dispute. - attr_reader :dispute sig { returns(String) } + attr_reader :dispute # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return Issuing Fraud Liability Debits that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::FraudLiabilityDebit::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Issuing::FraudLiabilityDebit::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::FraudLiabilityDebit::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/personalization_design.rbi b/rbi/stripe/resources/issuing/personalization_design.rbi index 5501e8cb1..49b02c157 100644 --- a/rbi/stripe/resources/issuing/personalization_design.rbi +++ b/rbi/stripe/resources/issuing/personalization_design.rbi @@ -7,66 +7,327 @@ module Stripe # A Personalization Design is a logical grouping of a Physical Bundle, card logo, and carrier text that represents a product line. class PersonalizationDesign < APIResource class CarrierText < Stripe::StripeObject + # The footer body text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :footer_body + # The footer title text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :footer_title + # The header body text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :header_body + # The header title text of the carrier letter. sig { returns(T.nilable(String)) } attr_reader :header_title end class Preferences < Stripe::StripeObject + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. sig { returns(T::Boolean) } attr_reader :is_default + # Whether this personalization design is used to create cards when one is not specified and a default for this connected account does not exist. sig { returns(T.nilable(T::Boolean)) } attr_reader :is_platform_default end class RejectionReasons < Stripe::StripeObject + # The reason(s) the card logo was rejected. sig { returns(T.nilable(T::Array[String])) } attr_reader :card_logo + # The reason(s) the carrier text was rejected. sig { returns(T.nilable(T::Array[String])) } attr_reader :carrier_text end - sig { returns(T.nilable(T.any(String, Stripe::File))) } # The file for the card logo to use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :card_logo - sig { returns(T.nilable(CarrierText)) } # Hash containing carrier text, for use with physical bundles that support carrier text. + sig { returns(T.nilable(CarrierText)) } attr_reader :carrier_text - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + sig { returns(T.nilable(String)) } attr_reader :lookup_key - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } # Friendly display name. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) } # The physical bundle object belonging to this personalization design. + sig { returns(T.any(String, Stripe::Issuing::PhysicalBundle)) } attr_reader :physical_bundle - sig { returns(Preferences) } # Attribute for field preferences + sig { returns(Preferences) } attr_reader :preferences - sig { returns(RejectionReasons) } # Attribute for field rejection_reasons + sig { returns(RejectionReasons) } attr_reader :rejection_reasons - sig { returns(String) } # Whether this personalization design can be used to create cards. + sig { returns(String) } attr_reader :status + class ListParams < Stripe::RequestParams + class Preferences < Stripe::RequestParams + # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. + sig { returns(T::Boolean) } + attr_accessor :is_default + # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + sig { returns(T::Boolean) } + attr_accessor :is_platform_default + sig { params(is_default: T::Boolean, is_platform_default: T::Boolean).void } + def initialize(is_default: nil, is_platform_default: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return personalization designs with the given lookup keys. + sig { returns(T::Array[String]) } + attr_accessor :lookup_keys + # Only return personalization designs with the given preferences. + sig { returns(::Stripe::Issuing::PersonalizationDesign::ListParams::Preferences) } + attr_accessor :preferences + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return personalization designs with the given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, lookup_keys: T::Array[String], preferences: ::Stripe::Issuing::PersonalizationDesign::ListParams::Preferences, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + preferences: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_body + # The footer title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_title + # The header body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_body + # The header title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_title + sig { + params(footer_body: T.nilable(String), footer_title: T.nilable(String), header_body: T.nilable(String), header_title: T.nilable(String)).void + } + def initialize( + footer_body: nil, + footer_title: nil, + header_body: nil, + header_title: nil + ); end + end + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + sig { returns(T::Boolean) } + attr_accessor :is_default + sig { params(is_default: T::Boolean).void } + def initialize(is_default: nil); end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + sig { returns(String) } + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + sig { returns(::Stripe::Issuing::PersonalizationDesign::CreateParams::CarrierText) } + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Friendly display name. + sig { returns(String) } + attr_accessor :name + # The physical bundle object belonging to this personalization design. + sig { returns(String) } + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + sig { returns(::Stripe::Issuing::PersonalizationDesign::CreateParams::Preferences) } + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + sig { + params(card_logo: String, carrier_text: ::Stripe::Issuing::PersonalizationDesign::CreateParams::CarrierText, expand: T::Array[String], lookup_key: String, metadata: T::Hash[String, String], name: String, physical_bundle: String, preferences: ::Stripe::Issuing::PersonalizationDesign::CreateParams::Preferences, transfer_lookup_key: T::Boolean).void + } + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_body + # The footer title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_title + # The header body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_body + # The header title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_title + sig { + params(footer_body: T.nilable(String), footer_title: T.nilable(String), header_body: T.nilable(String), header_title: T.nilable(String)).void + } + def initialize( + footer_body: nil, + footer_title: nil, + header_body: nil, + header_title: nil + ); end + end + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + sig { returns(T::Boolean) } + attr_accessor :is_default + sig { params(is_default: T::Boolean).void } + def initialize(is_default: nil); end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + sig { returns(T.nilable(String)) } + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + sig { + returns(T.nilable(::Stripe::Issuing::PersonalizationDesign::UpdateParams::CarrierText)) + } + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + sig { returns(T.nilable(String)) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Friendly display name. Providing an empty string will set the field to null. + sig { returns(T.nilable(String)) } + attr_accessor :name + # The physical bundle object belonging to this personalization design. + sig { returns(String) } + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + sig { returns(::Stripe::Issuing::PersonalizationDesign::UpdateParams::Preferences) } + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + sig { + params(card_logo: T.nilable(String), carrier_text: T.nilable(::Stripe::Issuing::PersonalizationDesign::UpdateParams::CarrierText), expand: T::Array[String], lookup_key: T.nilable(String), metadata: T::Hash[String, String], name: T.nilable(String), physical_bundle: String, preferences: ::Stripe::Issuing::PersonalizationDesign::UpdateParams::Preferences, transfer_lookup_key: T::Boolean).void + } + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ); end + end + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RejectParams < Stripe::RequestParams + class RejectionReasons < Stripe::RequestParams + # The reason(s) the card logo was rejected. + sig { returns(T::Array[String]) } + attr_accessor :card_logo + # The reason(s) the carrier text was rejected. + sig { returns(T::Array[String]) } + attr_accessor :carrier_text + sig { params(card_logo: T::Array[String], carrier_text: T::Array[String]).void } + def initialize(card_logo: nil, carrier_text: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The reason(s) the personalization design was rejected. + sig { returns(::Stripe::Issuing::PersonalizationDesign::RejectParams::RejectionReasons) } + attr_accessor :rejection_reasons + sig { + params(expand: T::Array[String], rejection_reasons: ::Stripe::Issuing::PersonalizationDesign::RejectParams::RejectionReasons).void + } + def initialize(expand: nil, rejection_reasons: nil); end + end + # Creates a personalization design object. + sig { + params(params: T.any(::Stripe::Issuing::PersonalizationDesign::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::PersonalizationDesign::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a card personalization object. + sig { + params(id: String, params: T.any(::Stripe::Issuing::PersonalizationDesign::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/physical_bundle.rbi b/rbi/stripe/resources/issuing/physical_bundle.rbi index 31db54f76..7b5342109 100644 --- a/rbi/stripe/resources/issuing/physical_bundle.rbi +++ b/rbi/stripe/resources/issuing/physical_bundle.rbi @@ -7,34 +7,80 @@ module Stripe # A Physical Bundle represents the bundle of physical items - card stock, carrier letter, and envelope - that is shipped to a cardholder when you create a physical card. class PhysicalBundle < APIResource class Features < Stripe::StripeObject + # The policy for how to use card logo images in a card design with this physical bundle. sig { returns(String) } attr_reader :card_logo + # The policy for how to use carrier letter text in a card design with this physical bundle. sig { returns(String) } attr_reader :carrier_text + # The policy for how to use a second line on a card with this physical bundle. sig { returns(String) } attr_reader :second_line end - sig { returns(Features) } # Attribute for field features + sig { returns(Features) } attr_reader :features - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # Friendly display name. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Whether this physical bundle can be used to create cards. - attr_reader :status sig { returns(String) } + attr_reader :status # Whether this physical bundle is a standard Stripe offering or custom-made for you. + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return physical bundles with the given status. + sig { returns(String) } + attr_accessor :status + # Only return physical bundles with the given type. + sig { returns(String) } + attr_accessor :type + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String, type: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::PhysicalBundle::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/settlement.rbi b/rbi/stripe/resources/issuing/settlement.rbi index c754c8033..2c1cb7588 100644 --- a/rbi/stripe/resources/issuing/settlement.rbi +++ b/rbi/stripe/resources/issuing/settlement.rbi @@ -6,56 +6,56 @@ module Stripe module Issuing # When a non-stripe BIN is used, any use of an [issued card](https://stripe.com/docs/issuing) must be settled directly with the card network. The net amount owed is represented by an Issuing `Settlement` object. class Settlement < APIResource - sig { returns(String) } # The Bank Identification Number reflecting this settlement record. + sig { returns(String) } attr_reader :bin - sig { returns(Integer) } # The date that the transactions are cleared and posted to user's accounts. - attr_reader :clearing_date sig { returns(Integer) } + attr_reader :clearing_date # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Integer) } # The total interchange received as reimbursement for the transactions. + sig { returns(Integer) } attr_reader :interchange_fees - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(Integer) } # The total net amount required to settle with the network. + sig { returns(Integer) } attr_reader :net_total - sig { returns(String) } # The card network for this settlement report. One of ["visa", "maestro"] + sig { returns(String) } attr_reader :network - sig { returns(Integer) } # The total amount of fees owed to the network. + sig { returns(Integer) } attr_reader :network_fees - sig { returns(String) } # The Settlement Identification Number assigned by the network. - attr_reader :network_settlement_identifier sig { returns(String) } + attr_reader :network_settlement_identifier # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # One of `international` or `uk_national_net`. - attr_reader :settlement_service sig { returns(String) } + attr_reader :settlement_service # The current processing status of this settlement. + sig { returns(String) } attr_reader :status - sig { returns(Integer) } # The total number of transactions reflected in this settlement. - attr_reader :transaction_count sig { returns(Integer) } + attr_reader :transaction_count # The total transaction amount reflected in this settlement. + sig { returns(Integer) } attr_reader :transaction_volume end end diff --git a/rbi/stripe/resources/issuing/token.rbi b/rbi/stripe/resources/issuing/token.rbi index 6e427223f..3fb7a593d 100644 --- a/rbi/stripe/resources/issuing/token.rbi +++ b/rbi/stripe/resources/issuing/token.rbi @@ -8,114 +8,224 @@ module Stripe class Token < APIResource class NetworkData < Stripe::StripeObject class Device < Stripe::StripeObject + # An obfuscated ID derived from the device ID. sig { returns(String) } attr_reader :device_fingerprint + # The IP address of the device at provisioning time. sig { returns(String) } attr_reader :ip_address + # The geographic latitude/longitude coordinates of the device at provisioning time. The format is [+-]decimal/[+-]decimal. sig { returns(String) } attr_reader :location + # The name of the device used for tokenization. sig { returns(String) } attr_reader :name + # The phone number of the device used for tokenization. sig { returns(String) } attr_reader :phone_number + # The type of device used for tokenization. sig { returns(String) } attr_reader :type end class Mastercard < Stripe::StripeObject + # A unique reference ID from MasterCard to represent the card account number. sig { returns(String) } attr_reader :card_reference_id + # The network-unique identifier for the token. sig { returns(String) } attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to MasterCard. sig { returns(String) } attr_reader :token_requestor_id + # The name of the entity requesting tokenization, if known. This is directly provided from MasterCard. sig { returns(String) } attr_reader :token_requestor_name end class Visa < Stripe::StripeObject + # A unique reference ID from Visa to represent the card account number. sig { returns(String) } attr_reader :card_reference_id + # The network-unique identifier for the token. sig { returns(String) } attr_reader :token_reference_id + # The ID of the entity requesting tokenization, specific to Visa. sig { returns(String) } attr_reader :token_requestor_id + # Degree of risk associated with the token between `01` and `99`, with higher number indicating higher risk. A `00` value indicates the token was not scored by Visa. sig { returns(String) } attr_reader :token_risk_score end class WalletProvider < Stripe::StripeObject class CardholderAddress < Stripe::StripeObject + # The street address of the cardholder tokenizing the card. sig { returns(String) } attr_reader :line1 + # The postal code of the cardholder tokenizing the card. sig { returns(String) } attr_reader :postal_code end + # The wallet provider-given account ID of the digital wallet the token belongs to. sig { returns(String) } attr_reader :account_id + # An evaluation on the trustworthiness of the wallet account between 1 and 5. A higher score indicates more trustworthy. sig { returns(Integer) } attr_reader :account_trust_score + # The method used for tokenizing a card. sig { returns(String) } attr_reader :card_number_source + # Attribute for field cardholder_address sig { returns(CardholderAddress) } attr_reader :cardholder_address + # The name of the cardholder tokenizing the card. sig { returns(String) } attr_reader :cardholder_name + # An evaluation on the trustworthiness of the device. A higher score indicates more trustworthy. sig { returns(Integer) } attr_reader :device_trust_score + # The hashed email address of the cardholder's account with the wallet provider. sig { returns(String) } attr_reader :hashed_account_email_address + # The reasons for suggested tokenization given by the card network. sig { returns(T::Array[String]) } attr_reader :reason_codes + # The recommendation on responding to the tokenization request. sig { returns(String) } attr_reader :suggested_decision + # The version of the standard for mapping reason codes followed by the wallet provider. sig { returns(String) } attr_reader :suggested_decision_version end + # Attribute for field device sig { returns(Device) } attr_reader :device + # Attribute for field mastercard sig { returns(Mastercard) } attr_reader :mastercard + # The network that the token is associated with. An additional hash is included with a name matching this value, containing tokenization data specific to the card network. sig { returns(String) } attr_reader :type + # Attribute for field visa sig { returns(Visa) } attr_reader :visa + # Attribute for field wallet_provider sig { returns(WalletProvider) } attr_reader :wallet_provider end - sig { returns(T.any(String, Stripe::Issuing::Card)) } # Card associated with this token. + sig { returns(T.any(String, Stripe::Issuing::Card)) } attr_reader :card - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # The hashed ID derived from the device ID from the card network associated with the token. + sig { returns(T.nilable(String)) } attr_reader :device_fingerprint - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # The last four digits of the token. + sig { returns(String) } attr_reader :last4 - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The token service provider / card network associated with the token. + sig { returns(String) } attr_reader :network - sig { returns(NetworkData) } # Attribute for field network_data + sig { returns(NetworkData) } attr_reader :network_data - sig { returns(Integer) } # Time at which the token was last updated by the card network. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :network_updated_at - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The usage state of the token. - attr_reader :status sig { returns(String) } + attr_reader :status # The digital wallet for this token, if one was used. + sig { returns(String) } attr_reader :wallet_provider + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # The Issuing card identifier to list tokens for. + sig { returns(String) } + attr_accessor :card + # Only return Issuing tokens that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::Token::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Select Issuing tokens with the given status. + sig { returns(String) } + attr_accessor :status + sig { + params(card: String, created: T.any(::Stripe::Issuing::Token::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + card: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Specifies which status the token should be updated to. + sig { returns(String) } + attr_accessor :status + sig { params(expand: T::Array[String], status: String).void } + def initialize(expand: nil, status: nil); end + end + # Lists all Issuing Token objects for a given card. + sig { + params(params: T.any(::Stripe::Issuing::Token::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Attempts to update the specified Issuing Token object to the status specified. + sig { + params(id: String, params: T.any(::Stripe::Issuing::Token::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Token) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/issuing/transaction.rbi b/rbi/stripe/resources/issuing/transaction.rbi index d9c50977a..0803898df 100644 --- a/rbi/stripe/resources/issuing/transaction.rbi +++ b/rbi/stripe/resources/issuing/transaction.rbi @@ -11,230 +11,1047 @@ module Stripe # Related guide: [Issued card transactions](https://stripe.com/docs/issuing/purchases/transactions) class Transaction < APIResource class AmountDetails < Stripe::StripeObject + # The fee charged by the ATM for the cash withdrawal. sig { returns(T.nilable(Integer)) } attr_reader :atm_fee + # The amount of cash requested by the cardholder. sig { returns(T.nilable(Integer)) } attr_reader :cashback_amount end class MerchantData < Stripe::StripeObject + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. sig { returns(String) } attr_reader :category + # The merchant category code for the seller’s business sig { returns(String) } attr_reader :category_code + # City where the seller is located sig { returns(T.nilable(String)) } attr_reader :city + # Country where the seller is located sig { returns(T.nilable(String)) } attr_reader :country + # Name of the seller sig { returns(T.nilable(String)) } attr_reader :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. sig { returns(String) } attr_reader :network_id + # Postal code where the seller is located sig { returns(T.nilable(String)) } attr_reader :postal_code + # State where the seller is located sig { returns(T.nilable(String)) } attr_reader :state + # The seller's tax identification number. Currently populated for French merchants only. sig { returns(T.nilable(String)) } attr_reader :tax_id + # An ID assigned by the seller to the location of the sale. sig { returns(T.nilable(String)) } attr_reader :terminal_id + # URL provided by the merchant on a 3DS request sig { returns(T.nilable(String)) } attr_reader :url end class NetworkData < Stripe::StripeObject + # A code created by Stripe which is shared with the merchant to validate the authorization. This field will be populated if the authorization message was approved. The code typically starts with the letter "S", followed by a six-digit number. For example, "S498162". Please note that the code is not guaranteed to be unique across authorizations. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # The date the transaction was processed by the card network. This can be different from the date the seller recorded the transaction depending on when the acquirer submits the transaction to the network. sig { returns(T.nilable(String)) } attr_reader :processing_date + # Unique identifier for the authorization assigned by the card network used to match subsequent messages, disputes, and transactions. sig { returns(T.nilable(String)) } attr_reader :transaction_id end class PurchaseDetails < Stripe::StripeObject class Fleet < Stripe::StripeObject class CardholderPromptData < Stripe::StripeObject + # Driver ID. sig { returns(T.nilable(String)) } attr_reader :driver_id + # Odometer reading. sig { returns(T.nilable(Integer)) } attr_reader :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. sig { returns(T.nilable(String)) } attr_reader :unspecified_id + # User ID. sig { returns(T.nilable(String)) } attr_reader :user_id + # Vehicle number. sig { returns(T.nilable(String)) } attr_reader :vehicle_number end class ReportedBreakdown < Stripe::StripeObject class Fuel < Stripe::StripeObject + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class NonFuel < Stripe::StripeObject + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. sig { returns(T.nilable(String)) } attr_reader :gross_amount_decimal end class Tax < Stripe::StripeObject + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. sig { returns(T.nilable(String)) } attr_reader :national_amount_decimal end + # Breakdown of fuel portion of the purchase. sig { returns(T.nilable(Fuel)) } attr_reader :fuel + # Breakdown of non-fuel portion of the purchase. sig { returns(T.nilable(NonFuel)) } attr_reader :non_fuel + # Information about tax included in this transaction. sig { returns(T.nilable(Tax)) } attr_reader :tax end + # Answers to prompts presented to cardholder at point of sale. sig { returns(T.nilable(CardholderPromptData)) } attr_reader :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. sig { returns(T.nilable(String)) } attr_reader :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. sig { returns(T.nilable(ReportedBreakdown)) } attr_reader :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. sig { returns(T.nilable(String)) } attr_reader :service_type end class Flight < Stripe::StripeObject class Segment < Stripe::StripeObject + # The three-letter IATA airport code of the flight's destination. sig { returns(T.nilable(String)) } attr_reader :arrival_airport_code + # The airline carrier code. sig { returns(T.nilable(String)) } attr_reader :carrier + # The three-letter IATA airport code that the flight departed from. sig { returns(T.nilable(String)) } attr_reader :departure_airport_code + # The flight number. sig { returns(T.nilable(String)) } attr_reader :flight_number + # The flight's service class. sig { returns(T.nilable(String)) } attr_reader :service_class + # Whether a stopover is allowed on this flight. sig { returns(T.nilable(T::Boolean)) } attr_reader :stopover_allowed end + # The time that the flight departed. sig { returns(T.nilable(Integer)) } attr_reader :departure_at + # The name of the passenger. sig { returns(T.nilable(String)) } attr_reader :passenger_name + # Whether the ticket is refundable. sig { returns(T.nilable(T::Boolean)) } attr_reader :refundable + # The legs of the trip. sig { returns(T.nilable(T::Array[Segment])) } attr_reader :segments + # The travel agency that issued the ticket. sig { returns(T.nilable(String)) } attr_reader :travel_agency end class Fuel < Stripe::StripeObject + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. sig { returns(T.nilable(String)) } attr_reader :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. sig { returns(String) } attr_reader :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. sig { returns(String) } attr_reader :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. sig { returns(String) } attr_reader :unit_cost_decimal end class Lodging < Stripe::StripeObject + # The time of checking into the lodging. sig { returns(T.nilable(Integer)) } attr_reader :check_in_at + # The number of nights stayed at the lodging. sig { returns(T.nilable(Integer)) } attr_reader :nights end class Receipt < Stripe::StripeObject + # The description of the item. The maximum length of this field is 26 characters. sig { returns(T.nilable(String)) } attr_reader :description + # The quantity of the item. sig { returns(T.nilable(Float)) } attr_reader :quantity + # The total for this line item in cents. sig { returns(T.nilable(Integer)) } attr_reader :total + # The unit cost of the item in cents. sig { returns(T.nilable(Integer)) } attr_reader :unit_cost end + # Fleet-specific information for transactions using Fleet cards. sig { returns(T.nilable(Fleet)) } attr_reader :fleet + # Information about the flight that was purchased with this transaction. sig { returns(T.nilable(Flight)) } attr_reader :flight + # Information about fuel that was purchased with this transaction. sig { returns(T.nilable(Fuel)) } attr_reader :fuel + # Information about lodging that was purchased with this transaction. sig { returns(T.nilable(Lodging)) } attr_reader :lodging + # The line items in the purchase. sig { returns(T.nilable(T::Array[Receipt])) } attr_reader :receipt + # A merchant-specific order number. sig { returns(T.nilable(String)) } attr_reader :reference end class Treasury < Stripe::StripeObject + # The Treasury [ReceivedCredit](https://stripe.com/docs/api/treasury/received_credits) representing this Issuing transaction if it is a refund sig { returns(T.nilable(String)) } attr_reader :received_credit + # The Treasury [ReceivedDebit](https://stripe.com/docs/api/treasury/received_debits) representing this Issuing transaction if it is a capture sig { returns(T.nilable(String)) } attr_reader :received_debit end - sig { returns(Integer) } # The transaction amount, which will be reflected in your balance. This amount is in your currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(AmountDetails)) } # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(T.nilable(AmountDetails)) } attr_reader :amount_details - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) } # The `Authorization` object that led to this transaction. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Authorization))) } attr_reader :authorization - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # ID of the [balance transaction](https://stripe.com/docs/api/balance_transactions) associated with this transaction. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(T.any(String, Stripe::Issuing::Card)) } # The card used to make this transaction. + sig { returns(T.any(String, Stripe::Issuing::Card)) } attr_reader :card - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } # The cardholder to whom this transaction belongs. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Cardholder))) } attr_reader :cardholder - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) } # If you've disputed the transaction, the ID of the dispute. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Dispute))) } attr_reader :dispute - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Integer) } # The amount that the merchant will receive, denominated in `merchant_currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). It will be different from `amount` if the merchant is taking payment in a different currency. + sig { returns(Integer) } attr_reader :merchant_amount - sig { returns(String) } # The currency with which the merchant is taking payment. + sig { returns(String) } attr_reader :merchant_currency - sig { returns(MerchantData) } # Attribute for field merchant_data + sig { returns(MerchantData) } attr_reader :merchant_data - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NetworkData)) } # Details about the transaction, such as processing dates, set by the card network. + sig { returns(T.nilable(NetworkData)) } attr_reader :network_data - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PurchaseDetails)) } # Additional purchase information that is optionally provided by the merchant. + sig { returns(T.nilable(PurchaseDetails)) } attr_reader :purchase_details - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Settlement))) } # Attribute for field settlement + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Settlement))) } attr_reader :settlement - sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } # [Token](https://stripe.com/docs/api/issuing/tokens/object) object used for this transaction. If a network token was not used for this transaction, this field will be null. + sig { returns(T.nilable(T.any(String, Stripe::Issuing::Token))) } attr_reader :token - sig { returns(T.nilable(Treasury)) } # [Treasury](https://stripe.com/docs/api/treasury) details related to this transaction if it was created on a [FinancialAccount](/docs/api/treasury/financial_accounts + sig { returns(T.nilable(Treasury)) } attr_reader :treasury - sig { returns(String) } # The nature of the transaction. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. + sig { returns(T.nilable(String)) } attr_reader :wallet + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return transactions that belong to the given card. + sig { returns(String) } + attr_accessor :card + # Only return transactions that belong to the given cardholder. + sig { returns(String) } + attr_accessor :cardholder + # Only return transactions that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::Transaction::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return transactions that are associated with the given settlement. + sig { returns(String) } + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return transactions that have the given type. One of `capture` or `refund`. + sig { returns(String) } + attr_accessor :type + sig { + params(card: String, cardholder: String, created: T.any(::Stripe::Issuing::Transaction::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, settlement: String, starting_after: String, type: String).void + } + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class RefundParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :refund_amount + sig { params(expand: T::Array[String], refund_amount: Integer).void } + def initialize(expand: nil, refund_amount: nil); end + end + class CreateForceCaptureParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + sig { returns(String) } + attr_accessor :category + # City where the seller is located + sig { returns(String) } + attr_accessor :city + # Country where the seller is located + sig { returns(String) } + attr_accessor :country + # Name of the seller + sig { returns(String) } + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + sig { returns(String) } + attr_accessor :network_id + # Postal code where the seller is located + sig { returns(String) } + attr_accessor :postal_code + # State where the seller is located + sig { returns(String) } + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + sig { returns(String) } + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + sig { returns(String) } + attr_accessor :url + sig { + params(category: String, city: String, country: String, name: String, network_id: String, postal_code: String, state: String, terminal_id: String, url: String).void + } + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ); end + end + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + sig { returns(String) } + attr_accessor :arrival_airport_code + # The airline carrier code. + sig { returns(String) } + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + sig { returns(String) } + attr_accessor :departure_airport_code + # The flight number. + sig { returns(String) } + attr_accessor :flight_number + # The flight's service class. + sig { returns(String) } + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + sig { returns(T::Boolean) } + attr_accessor :stopover_allowed + sig { + params(arrival_airport_code: String, carrier: String, departure_airport_code: String, flight_number: String, service_class: String, stopover_allowed: T::Boolean).void + } + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ); end + end + # The time that the flight departed. + sig { returns(Integer) } + attr_accessor :departure_at + # The name of the passenger. + sig { returns(String) } + attr_accessor :passenger_name + # Whether the ticket is refundable. + sig { returns(T::Boolean) } + attr_accessor :refundable + # The legs of the trip. + sig { + returns(T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight::Segment]) + } + attr_accessor :segments + # The travel agency that issued the ticket. + sig { returns(String) } + attr_accessor :travel_agency + sig { + params(departure_at: Integer, passenger_name: String, refundable: T::Boolean, segments: T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight::Segment], travel_agency: String).void + } + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + sig { returns(Integer) } + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + sig { returns(Integer) } + attr_accessor :nights + sig { params(check_in_at: Integer, nights: Integer).void } + def initialize(check_in_at: nil, nights: nil); end + end + class Receipt < Stripe::RequestParams + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # Attribute for param field quantity + sig { returns(String) } + attr_accessor :quantity + # Attribute for param field total + sig { returns(Integer) } + attr_accessor :total + # Attribute for param field unit_cost + sig { returns(Integer) } + attr_accessor :unit_cost + sig { + params(description: String, quantity: String, total: Integer, unit_cost: Integer).void + } + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + end + # Fleet-specific information for transactions using Fleet cards. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet) + } + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight) + } + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fuel) + } + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Lodging) + } + attr_accessor :lodging + # The line items in the purchase. + sig { + returns(T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Receipt]) + } + attr_accessor :receipt + # A merchant-specific order number. + sig { returns(String) } + attr_accessor :reference + sig { + params(fleet: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fleet, flight: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Flight, fuel: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Fuel, lodging: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Lodging, receipt: T::Array[::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails::Receipt], reference: String).void + } + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ); end + end + # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Card associated with this transaction. + sig { returns(String) } + attr_accessor :card + # The currency of the capture. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + sig { returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::MerchantData) } + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + sig { returns(::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails) } + attr_accessor :purchase_details + sig { + params(amount: Integer, card: String, currency: String, expand: T::Array[String], merchant_data: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::MerchantData, purchase_details: ::Stripe::Issuing::Transaction::CreateForceCaptureParams::PurchaseDetails).void + } + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ); end + end + class CreateUnlinkedRefundParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + sig { returns(String) } + attr_accessor :category + # City where the seller is located + sig { returns(String) } + attr_accessor :city + # Country where the seller is located + sig { returns(String) } + attr_accessor :country + # Name of the seller + sig { returns(String) } + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + sig { returns(String) } + attr_accessor :network_id + # Postal code where the seller is located + sig { returns(String) } + attr_accessor :postal_code + # State where the seller is located + sig { returns(String) } + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + sig { returns(String) } + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + sig { returns(String) } + attr_accessor :url + sig { + params(category: String, city: String, country: String, name: String, network_id: String, postal_code: String, state: String, terminal_id: String, url: String).void + } + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ); end + end + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + sig { returns(String) } + attr_accessor :arrival_airport_code + # The airline carrier code. + sig { returns(String) } + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + sig { returns(String) } + attr_accessor :departure_airport_code + # The flight number. + sig { returns(String) } + attr_accessor :flight_number + # The flight's service class. + sig { returns(String) } + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + sig { returns(T::Boolean) } + attr_accessor :stopover_allowed + sig { + params(arrival_airport_code: String, carrier: String, departure_airport_code: String, flight_number: String, service_class: String, stopover_allowed: T::Boolean).void + } + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ); end + end + # The time that the flight departed. + sig { returns(Integer) } + attr_accessor :departure_at + # The name of the passenger. + sig { returns(String) } + attr_accessor :passenger_name + # Whether the ticket is refundable. + sig { returns(T::Boolean) } + attr_accessor :refundable + # The legs of the trip. + sig { + returns(T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment]) + } + attr_accessor :segments + # The travel agency that issued the ticket. + sig { returns(String) } + attr_accessor :travel_agency + sig { + params(departure_at: Integer, passenger_name: String, refundable: T::Boolean, segments: T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment], travel_agency: String).void + } + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + sig { returns(Integer) } + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + sig { returns(Integer) } + attr_accessor :nights + sig { params(check_in_at: Integer, nights: Integer).void } + def initialize(check_in_at: nil, nights: nil); end + end + class Receipt < Stripe::RequestParams + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # Attribute for param field quantity + sig { returns(String) } + attr_accessor :quantity + # Attribute for param field total + sig { returns(Integer) } + attr_accessor :total + # Attribute for param field unit_cost + sig { returns(Integer) } + attr_accessor :unit_cost + sig { + params(description: String, quantity: String, total: Integer, unit_cost: Integer).void + } + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + end + # Fleet-specific information for transactions using Fleet cards. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet) + } + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight) + } + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fuel) + } + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + sig { + returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Lodging) + } + attr_accessor :lodging + # The line items in the purchase. + sig { + returns(T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Receipt]) + } + attr_accessor :receipt + # A merchant-specific order number. + sig { returns(String) } + attr_accessor :reference + sig { + params(fleet: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fleet, flight: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Flight, fuel: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Fuel, lodging: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Lodging, receipt: T::Array[::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails::Receipt], reference: String).void + } + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ); end + end + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Card associated with this unlinked refund transaction. + sig { returns(String) } + attr_accessor :card + # The currency of the unlinked refund. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + sig { returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::MerchantData) } + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + sig { returns(::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails) } + attr_accessor :purchase_details + sig { + params(amount: Integer, card: String, currency: String, expand: T::Array[String], merchant_data: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::MerchantData, purchase_details: ::Stripe::Issuing::Transaction::CreateUnlinkedRefundParams::PurchaseDetails).void + } + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ); end + end + # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Issuing::Transaction::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/line_item.rbi b/rbi/stripe/resources/line_item.rbi index 3d2311c32..46243973a 100644 --- a/rbi/stripe/resources/line_item.rbi +++ b/rbi/stripe/resources/line_item.rbi @@ -6,86 +6,103 @@ module Stripe # A line item. class LineItem < APIResource class AdjustableQuantity < Stripe::StripeObject + # Attribute for field enabled sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field maximum sig { returns(T.nilable(Integer)) } attr_reader :maximum + # Attribute for field minimum sig { returns(T.nilable(Integer)) } attr_reader :minimum end class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Display < Stripe::StripeObject + # Attribute for field description sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field images sig { returns(T::Array[String]) } attr_reader :images + # Attribute for field name sig { returns(String) } attr_reader :name end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end - sig { returns(T.nilable(AdjustableQuantity)) } # Attribute for field adjustable_quantity + sig { returns(T.nilable(AdjustableQuantity)) } attr_reader :adjustable_quantity - sig { returns(Integer) } # Total discount amount applied. If no discounts were applied, defaults to 0. - attr_reader :amount_discount sig { returns(Integer) } + attr_reader :amount_discount # Total before any discounts or taxes are applied. - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal # Total tax amount applied. If no tax was applied, defaults to 0. - attr_reader :amount_tax sig { returns(Integer) } + attr_reader :amount_tax # Total after discounts and taxes. + sig { returns(Integer) } attr_reader :amount_total - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. Defaults to product name. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Array[Discount]) } # The discounts applied to the line item. + sig { returns(T::Array[Discount]) } attr_reader :discounts - sig { returns(Display) } # Attribute for field display + sig { returns(Display) } attr_reader :display - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Stripe::Price)) } # The price used to generate the line item. + sig { returns(T.nilable(Stripe::Price)) } attr_reader :price - sig { returns(T.any(String, Stripe::Product)) } # The ID of the product for this line item. # # This will always be the same as `price.product`. + sig { returns(T.any(String, Stripe::Product)) } attr_reader :product - sig { returns(T.nilable(Integer)) } # The quantity of products being purchased. + sig { returns(T.nilable(Integer)) } attr_reader :quantity - sig { returns(T::Array[Tax]) } # The taxes applied to the line item. + sig { returns(T::Array[Tax]) } attr_reader :taxes end end \ No newline at end of file diff --git a/rbi/stripe/resources/login_link.rbi b/rbi/stripe/resources/login_link.rbi index eca4eb558..04437ebea 100644 --- a/rbi/stripe/resources/login_link.rbi +++ b/rbi/stripe/resources/login_link.rbi @@ -5,14 +5,14 @@ module Stripe # Login Links are single-use URLs for a connected account to access the Express Dashboard. The connected account's [account.controller.stripe_dashboard.type](https://stripe.com/api/accounts/object#account_object-controller-stripe_dashboard-type) must be `express` to have access to the Express Dashboard. class LoginLink < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The URL for the login link. + sig { returns(String) } attr_reader :url end end \ No newline at end of file diff --git a/rbi/stripe/resources/mandate.rbi b/rbi/stripe/resources/mandate.rbi index 914b85a50..d8491d289 100644 --- a/rbi/stripe/resources/mandate.rbi +++ b/rbi/stripe/resources/mandate.rbi @@ -8,44 +8,59 @@ module Stripe class CustomerAcceptance < Stripe::StripeObject class Offline < Stripe::StripeObject; end class Online < Stripe::StripeObject + # The customer accepts the mandate from this IP address. sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer accepts the mandate using the user agent of the browser. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # The time that the customer accepts the mandate. sig { returns(T.nilable(Integer)) } attr_reader :accepted_at + # Attribute for field offline sig { returns(Offline) } attr_reader :offline + # Attribute for field online sig { returns(Online) } attr_reader :online + # The mandate includes the type of customer acceptance information, such as: `online` or `offline`. sig { returns(String) } attr_reader :type end class MultiUse < Stripe::StripeObject; end class PaymentMethodDetails < Stripe::StripeObject class AcssDebit < Stripe::StripeObject + # List of Stripe products where this mandate can be selected automatically. sig { returns(T::Array[String]) } attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(String) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(String) } attr_reader :transaction_type end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. sig { returns(String) } attr_reader :url end class BacsDebit < Stripe::StripeObject + # The status of the mandate on the Bacs network. Can be one of `pending`, `revoked`, `refused`, or `accepted`. sig { returns(String) } attr_reader :network_status + # The unique reference identifying the mandate on the Bacs network. sig { returns(String) } attr_reader :reference + # When the mandate is revoked on the Bacs network this field displays the reason for the revocation. sig { returns(T.nilable(String)) } attr_reader :revocation_reason + # The URL that will contain the mandate that the customer has signed. sig { returns(String) } attr_reader :url end @@ -55,111 +70,150 @@ module Stripe class KrCard < Stripe::StripeObject; end class Link < Stripe::StripeObject; end class Paypal < Stripe::StripeObject + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. sig { returns(T.nilable(String)) } attr_reader :billing_agreement_id + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(String) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(String) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject + # The unique reference of the mandate. sig { returns(String) } attr_reader :reference + # The URL of the mandate. This URL generally contains sensitive information about the customer and should be shared with them exclusively. sig { returns(String) } attr_reader :url end class UsBankAccount < Stripe::StripeObject + # Mandate collection method sig { returns(String) } attr_reader :collection_method end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # This mandate corresponds with a specific payment method type. The `payment_method_details` includes an additional hash with the same name and contains mandate information that's specific to that payment method. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class SingleUse < Stripe::StripeObject + # The amount of the payment on a single use mandate. sig { returns(Integer) } attr_reader :amount + # The currency of the payment on a single use mandate. sig { returns(String) } attr_reader :currency end - sig { returns(CustomerAcceptance) } # Attribute for field customer_acceptance + sig { returns(CustomerAcceptance) } attr_reader :customer_acceptance - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(MultiUse) } # Attribute for field multi_use + sig { returns(MultiUse) } attr_reader :multi_use - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The account (if any) that the mandate is intended for. + sig { returns(String) } attr_reader :on_behalf_of - sig { returns(T.any(String, Stripe::PaymentMethod)) } # ID of the payment method associated with this mandate. + sig { returns(T.any(String, Stripe::PaymentMethod)) } attr_reader :payment_method - sig { returns(PaymentMethodDetails) } # Attribute for field payment_method_details + sig { returns(PaymentMethodDetails) } attr_reader :payment_method_details - sig { returns(SingleUse) } # Attribute for field single_use + sig { returns(SingleUse) } attr_reader :single_use - sig { returns(String) } # The mandate status indicates whether or not you can use it to initiate a payment. - attr_reader :status sig { returns(String) } + attr_reader :status # The type of the mandate. + sig { returns(String) } attr_reader :type + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end end end \ No newline at end of file diff --git a/rbi/stripe/resources/margin.rbi b/rbi/stripe/resources/margin.rbi index 09335115e..3ba7c4376 100644 --- a/rbi/stripe/resources/margin.rbi +++ b/rbi/stripe/resources/margin.rbi @@ -6,32 +6,122 @@ module Stripe # A (partner) margin represents a specific discount distributed in partner reseller programs to business partners who # resell products and services and earn a discount (margin) for doing so. class Margin < APIResource - sig { returns(T::Boolean) } # Whether the margin can be applied to invoices, invoice items, or invoice line items. Defaults to `true`. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } # Name of the margin that's displayed on, for example, invoices. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Float) } # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + sig { returns(Float) } attr_reader :percent_off - sig { returns(Integer) } # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated + class ListParams < Stripe::RequestParams + # Only return margins that are active or inactive. For example, pass `true` to only list active margins. + sig { returns(T::Boolean) } + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + sig { returns(String) } + attr_accessor :name + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + sig { returns(Float) } + attr_accessor :percent_off + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T::Hash[String, String], name: String, percent_off: Float).void + } + def initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + sig { returns(String) } + attr_accessor :name + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T::Hash[String, String], name: String).void + } + def initialize(active: nil, expand: nil, metadata: nil, name: nil); end + end + # Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + sig { + params(params: T.any(::Stripe::Margin::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Margin) + } + def self.create(params = {}, opts = {}); end + + # Retrieve a list of your margins. + sig { + params(params: T.any(::Stripe::Margin::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Update the specified margin object. Certain fields of the margin object are not editable. + sig { + params(id: String, params: T.any(::Stripe::Margin::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Margin) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/order.rbi b/rbi/stripe/resources/order.rbi index 76f0e7a6f..3bc64a794 100644 --- a/rbi/stripe/resources/order.rbi +++ b/rbi/stripe/resources/order.rbi @@ -10,441 +10,3007 @@ module Stripe # Related guide: [Orders overview](https://stripe.com/docs/orders) class Order < APIResource class AutomaticTax < Stripe::StripeObject + # Whether Stripe automatically computes tax on this Order. sig { returns(T::Boolean) } attr_reader :enabled + # The status of the most recent automated tax calculation for this Order. sig { returns(T.nilable(String)) } attr_reader :status end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address for the order. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address for the order. sig { returns(T.nilable(String)) } attr_reader :email + # Full name for the order. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number for the order (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Credit < Stripe::StripeObject class GiftCard < Stripe::StripeObject + # The token of the gift card applied to the order sig { returns(String) } attr_reader :card end + # The amount of this credit to apply to the order. sig { returns(Integer) } attr_reader :amount + # Details for a gift card. sig { returns(T.nilable(GiftCard)) } attr_reader :gift_card + # Line items on this order that are ineligible for this credit sig { returns(T.nilable(T::Array[String])) } attr_reader :ineligible_line_items + # The type of credit to apply to the order, only `gift_card` currently supported. sig { returns(String) } attr_reader :type end class Payment < Stripe::StripeObject class Settings < Stripe::StripeObject class AutomaticPaymentMethods < Stripe::StripeObject + # Whether this Order has been opted into managing payment method types via the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T::Boolean) } attr_reader :enabled end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class AfterpayClearpay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Order identifier shown to the user in Afterpay's online portal. We recommend using a value that helps you answer any questions a customer might have about the payment. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Oxxo < Stripe::StripeObject + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject + # The tax for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :amount + # The tax behavior for the line item. sig { returns(String) } attr_reader :behavior end + # Type of the line item. sig { returns(String) } attr_reader :category + # Description of the line item. sig { returns(String) } attr_reader :description + # Descriptive name of the line item. sig { returns(String) } attr_reader :name + # Quantity of the line item. Cannot be a negative number. sig { returns(Integer) } attr_reader :quantity + # Client facing stock keeping unit, article number or similar. sig { returns(String) } attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). sig { returns(String) } attr_reader :sold_by + # Attribute for field tax sig { returns(Tax) } attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :unit_amount end + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # The line items purchased by the customer. sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Preferred language of the SOFORT authorization page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class WechatPay < Stripe::StripeObject + # The app ID registered with WeChat Pay. Only required when client is ios or android. sig { returns(T.nilable(String)) } attr_reader :app_id + # The client type that the end customer will pay from sig { returns(T.nilable(String)) } attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay end class TransferData < Stripe::StripeObject + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. sig { returns(T.nilable(Integer)) } attr_reader :amount + # ID of the Connected account receiving the transfer. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount + # Indicates whether order has been opted into using [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) to manage payment method types. sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. sig { returns(T.nilable(String)) } attr_reader :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end + # ID of the payment intent associated with this order. Null when the order is `open`. sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent + # Settings describing how the order should configure generated PaymentIntents. sig { returns(T.nilable(Settings)) } attr_reader :settings + # The status of the underlying payment associated with this order, if any. Null when the order is `open`. sig { returns(T.nilable(String)) } attr_reader :status end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this order. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Recipient shipping address. Required if the order includes products that are shippable. sig { returns(T.nilable(Address)) } attr_reader :address + # Recipient name. sig { returns(T.nilable(String)) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class TaxDetails < Stripe::StripeObject class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end + # Describes the purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. sig { returns(String) } attr_reader :tax_exempt + # The purchaser's tax IDs to be used in calculation of tax for this Order. sig { returns(T::Array[TaxId]) } attr_reader :tax_ids end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # Attribute for field amount_credit sig { returns(Integer) } attr_reader :amount_credit + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end - sig { returns(Integer) } # Attribute for field amount_remaining - attr_reader :amount_remaining sig { returns(Integer) } + attr_reader :amount_remaining # Order cost before any discounts or taxes are applied. A positive integer representing the subtotal of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal # Total order cost after discounts and taxes are applied. A positive integer representing the cost of the order in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). To submit an order, the total must be either 0 or at least $0.50 USD or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). + sig { returns(Integer) } attr_reader :amount_total - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect application that created the Order, if any. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(BillingDetails)) } # Customer billing details associated with the order. + sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details - sig { returns(T.nilable(String)) } # The client secret of this Order. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment for an Order from your frontend. It should not be stored, logged, embedded in URLs, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs for [creating and processing an order](https://stripe.com/docs/orders-beta/create-and-process) to learn about how client_secret should be handled. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Array[Credit]) } # The credits applied to the Order. At most 10 credits can be applied to an Order. + sig { returns(T::Array[Credit]) } attr_reader :credits - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The customer which this orders belongs to. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } # The discounts applied to the order. Use `expand[]=discounts` to expand each discount. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Discount)])) } attr_reader :discounts - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # A recent IP address of the purchaser used for tax reporting and tax location inference. + sig { returns(T.nilable(String)) } attr_reader :ip_address - sig { returns(Stripe::ListObject) } # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. There is a maximum of 100 line items. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Payment) } # Attribute for field payment + sig { returns(Payment) } attr_reader :payment - sig { returns(T.nilable(ShippingCost)) } # The details of the customer cost of shipping, including the customer chosen ShippingRate. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } # Customer shipping information associated with the order. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(String) } # The overall status of the order. + sig { returns(String) } attr_reader :status - sig { returns(TaxDetails) } # Attribute for field tax_details + sig { returns(TaxDetails) } attr_reader :tax_details - sig { returns(TotalDetails) } # Attribute for field total_details + sig { returns(TotalDetails) } attr_reader :total_details + class ListParams < Stripe::RequestParams + # Only return orders for the given customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address provided by the customer. + sig { returns(::Stripe::Order::CreateParams::BillingDetails::Address) } + attr_accessor :address + # The billing email provided by the customer. + sig { returns(String) } + attr_accessor :email + # The billing name provided by the customer. + sig { returns(String) } + attr_accessor :name + # The billing phone number provided by the customer. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Order::CreateParams::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + sig { returns(String) } + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + sig { returns(String) } + attr_accessor :type + sig { params(gift_card: String, type: String).void } + def initialize(gift_card: nil, type: nil); end + end + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + sig { params(coupon: String, discount: String).void } + def initialize(coupon: nil, discount: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + sig { returns(String) } + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { + returns(T.nilable(::Stripe::Order::CreateParams::LineItem::ProductData::PackageDimensions)) + } + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } + attr_accessor :url + sig { + params(description: T.nilable(String), id: String, images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::Order::CreateParams::LineItem::ProductData::PackageDimensions), shippable: T::Boolean, tax_code: T.nilable(String), url: T.nilable(String)).void + } + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ); end + end + # The description for the line item. Will default to the name of the associated product. + sig { returns(String) } + attr_accessor :description + # The discounts applied to this line item. + sig { returns(T.nilable(T::Array[::Stripe::Order::CreateParams::LineItem::Discount])) } + attr_accessor :discounts + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + sig { returns(::Stripe::Order::CreateParams::LineItem::PriceData) } + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + sig { returns(String) } + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + sig { returns(::Stripe::Order::CreateParams::LineItem::ProductData) } + attr_accessor :product_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates applied to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(description: String, discounts: T.nilable(T::Array[::Stripe::Order::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::Order::CreateParams::LineItem::PriceData, product: String, product_data: ::Stripe::Order::CreateParams::LineItem::ProductData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + description: nil, + discounts: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(String) } + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: String, reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize( + capture_method: nil, + preferred_locale: nil, + setup_future_usage: nil + ); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize( + capture_method: nil, + persistent_token: nil, + setup_future_usage: nil + ); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit) + } + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Alipay) + } + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Bancontact) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Card) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance) + } + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Ideal) + } + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Klarna) + } + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Link) + } + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Oxxo) + } + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::P24) + } + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal) + } + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit) + } + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Sofort) + } + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::WechatPay) + } + attr_accessor :wechat_pay + sig { + params(acss_debit: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit, afterpay_clearpay: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay, alipay: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Alipay, bancontact: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Bancontact, card: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Card, customer_balance: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance, ideal: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Ideal, klarna: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Klarna, link: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Link, oxxo: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Oxxo, p24: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::P24, paypal: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal, sepa_debit: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit, sofort: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::Sofort, wechat_pay: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions::WechatPay).void + } + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # ID of the Connected account receiving the transfer. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + sig { returns(Integer) } + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + sig { returns(::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + sig { returns(String) } + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + sig { returns(::Stripe::Order::CreateParams::Payment::Settings::TransferData) } + attr_accessor :transfer_data + sig { + params(application_fee_amount: Integer, payment_method_options: ::Stripe::Order::CreateParams::Payment::Settings::PaymentMethodOptions, payment_method_types: T::Array[String], return_url: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::Order::CreateParams::Payment::Settings::TransferData).void + } + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ); end + end + # Settings describing how the order should configure generated PaymentIntents. + sig { returns(::Stripe::Order::CreateParams::Payment::Settings) } + attr_accessor :settings + sig { params(settings: ::Stripe::Order::CreateParams::Payment::Settings).void } + def initialize(settings: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::Order::CreateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Order::CreateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The shipping address for the order. + sig { returns(::Stripe::Order::CreateParams::ShippingDetails::Address) } + attr_accessor :address + # The name of the recipient of the order. + sig { returns(String) } + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::Order::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + sig { returns(T::Array[::Stripe::Order::CreateParams::TaxDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::Order::CreateParams::TaxDetails::TaxId]).void + } + def initialize(tax_exempt: nil, tax_ids: nil); end + end + # Settings for automatic tax calculation for this order. + sig { returns(::Stripe::Order::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + sig { returns(T.nilable(::Stripe::Order::CreateParams::BillingDetails)) } + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. + sig { returns(T.nilable(T::Array[::Stripe::Order::CreateParams::Credit])) } + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The customer associated with this order. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. + sig { returns(T.nilable(T::Array[::Stripe::Order::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The IP address of the purchaser for this order. + sig { returns(String) } + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::Order::CreateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + sig { returns(::Stripe::Order::CreateParams::Payment) } + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + sig { returns(T.nilable(::Stripe::Order::CreateParams::ShippingCost)) } + attr_accessor :shipping_cost + # Shipping details for the order. + sig { returns(T.nilable(::Stripe::Order::CreateParams::ShippingDetails)) } + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + sig { returns(::Stripe::Order::CreateParams::TaxDetails) } + attr_accessor :tax_details + sig { + params(automatic_tax: ::Stripe::Order::CreateParams::AutomaticTax, billing_details: T.nilable(::Stripe::Order::CreateParams::BillingDetails), credits: T.nilable(T::Array[::Stripe::Order::CreateParams::Credit]), currency: String, customer: String, description: String, discounts: T.nilable(T::Array[::Stripe::Order::CreateParams::Discount]), expand: T::Array[String], ip_address: String, line_items: T::Array[::Stripe::Order::CreateParams::LineItem], metadata: T::Hash[String, String], payment: ::Stripe::Order::CreateParams::Payment, shipping_cost: T.nilable(::Stripe::Order::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::Order::CreateParams::ShippingDetails), tax_details: ::Stripe::Order::CreateParams::TaxDetails).void + } + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address provided by the customer. + sig { returns(::Stripe::Order::UpdateParams::BillingDetails::Address) } + attr_accessor :address + # The billing email provided by the customer. + sig { returns(String) } + attr_accessor :email + # The billing name provided by the customer. + sig { returns(String) } + attr_accessor :name + # The billing phone number provided by the customer. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Order::UpdateParams::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + sig { returns(String) } + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + sig { returns(String) } + attr_accessor :type + sig { params(gift_card: String, type: String).void } + def initialize(gift_card: nil, type: nil); end + end + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + sig { params(coupon: String, discount: String).void } + def initialize(coupon: nil, discount: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + sig { returns(String) } + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::LineItem::ProductData::PackageDimensions)) + } + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } + attr_accessor :url + sig { + params(description: T.nilable(String), id: String, images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::Order::UpdateParams::LineItem::ProductData::PackageDimensions), shippable: T::Boolean, tax_code: T.nilable(String), url: T.nilable(String)).void + } + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ); end + end + # The description for the line item. Will default to the name of the associated product. + sig { returns(String) } + attr_accessor :description + # The discounts applied to this line item. + sig { returns(T.nilable(T::Array[::Stripe::Order::UpdateParams::LineItem::Discount])) } + attr_accessor :discounts + # The ID of an existing line item on the order. + sig { returns(String) } + attr_accessor :id + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + sig { returns(::Stripe::Order::UpdateParams::LineItem::PriceData) } + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + sig { returns(String) } + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + sig { returns(::Stripe::Order::UpdateParams::LineItem::ProductData) } + attr_accessor :product_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates applied to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(description: String, discounts: T.nilable(T::Array[::Stripe::Order::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::Order::UpdateParams::LineItem::PriceData, product: String, product_data: ::Stripe::Order::UpdateParams::LineItem::ProductData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + description: nil, + discounts: nil, + id: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(String) } + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: String, reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize( + capture_method: nil, + preferred_locale: nil, + setup_future_usage: nil + ); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize( + capture_method: nil, + persistent_token: nil, + setup_future_usage: nil + ); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::P24)) + } + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + sig { + params(acss_debit: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit), afterpay_clearpay: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Alipay), bancontact: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance), ideal: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Ideal), klarna: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Link), oxxo: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::P24), paypal: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit), sofort: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::Sofort), wechat_pay: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions::WechatPay)).void + } + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # ID of the Connected account receiving the transfer. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + sig { returns(::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + sig { returns(T.nilable(String)) } + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + sig { returns(T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::TransferData)) } + attr_accessor :transfer_data + sig { + params(application_fee_amount: T.nilable(Integer), payment_method_options: ::Stripe::Order::UpdateParams::Payment::Settings::PaymentMethodOptions, payment_method_types: T::Array[String], return_url: T.nilable(String), statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: T.nilable(::Stripe::Order::UpdateParams::Payment::Settings::TransferData)).void + } + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ); end + end + # Settings describing how the order should configure generated PaymentIntents. + sig { returns(::Stripe::Order::UpdateParams::Payment::Settings) } + attr_accessor :settings + sig { params(settings: ::Stripe::Order::UpdateParams::Payment::Settings).void } + def initialize(settings: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Order::UpdateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The shipping address for the order. + sig { returns(::Stripe::Order::UpdateParams::ShippingDetails::Address) } + attr_accessor :address + # The name of the recipient of the order. + sig { returns(String) } + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::Order::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + sig { returns(T::Array[::Stripe::Order::UpdateParams::TaxDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::Order::UpdateParams::TaxDetails::TaxId]).void + } + def initialize(tax_exempt: nil, tax_ids: nil); end + end + # Settings for automatic tax calculation for this order. + sig { returns(::Stripe::Order::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + sig { returns(T.nilable(::Stripe::Order::UpdateParams::BillingDetails)) } + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field. + sig { returns(T.nilable(T::Array[::Stripe::Order::UpdateParams::Credit])) } + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The customer associated with this order. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. + sig { returns(T.nilable(T::Array[::Stripe::Order::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The IP address of the purchaser for this order. + sig { returns(String) } + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::Order::UpdateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + sig { returns(::Stripe::Order::UpdateParams::Payment) } + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + sig { returns(T.nilable(::Stripe::Order::UpdateParams::ShippingCost)) } + attr_accessor :shipping_cost + # Shipping details for the order. + sig { returns(T.nilable(::Stripe::Order::UpdateParams::ShippingDetails)) } + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + sig { returns(::Stripe::Order::UpdateParams::TaxDetails) } + attr_accessor :tax_details + sig { + params(automatic_tax: ::Stripe::Order::UpdateParams::AutomaticTax, billing_details: T.nilable(::Stripe::Order::UpdateParams::BillingDetails), credits: T.nilable(T::Array[::Stripe::Order::UpdateParams::Credit]), currency: String, customer: String, description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Order::UpdateParams::Discount]), expand: T::Array[String], ip_address: String, line_items: T::Array[::Stripe::Order::UpdateParams::LineItem], metadata: T.nilable(T::Hash[String, String]), payment: ::Stripe::Order::UpdateParams::Payment, shipping_cost: T.nilable(::Stripe::Order::UpdateParams::ShippingCost), shipping_details: T.nilable(::Stripe::Order::UpdateParams::ShippingDetails), tax_details: ::Stripe::Order::UpdateParams::TaxDetails).void + } + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ); end + end + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReopenParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. + sig { returns(Integer) } + attr_accessor :expected_total + sig { params(expand: T::Array[String], expected_total: Integer).void } + def initialize(expand: nil, expected_total: nil); end + end + # Cancels the order as well as the payment intent if one is attached. + sig { + params(params: T.any(::Stripe::Order::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def cancel(params = {}, opts = {}); end + + # Cancels the order as well as the payment intent if one is attached. + sig { + params(id: String, params: T.any(::Stripe::Order::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def self.cancel(id, params = {}, opts = {}); end + + # Creates a new open order object. + sig { + params(params: T.any(::Stripe::Order::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. + sig { + params(params: T.any(::Stripe::Order::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::Order::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_line_items(params = {}, opts = {}); end + + # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(id: String, params: T.any(::Stripe::Order::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_line_items(id, params = {}, opts = {}); end + + # Reopens a submitted order. + sig { + params(params: T.any(::Stripe::Order::ReopenParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def reopen(params = {}, opts = {}); end + + # Reopens a submitted order. + sig { + params(id: String, params: T.any(::Stripe::Order::ReopenParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def self.reopen(id, params = {}, opts = {}); end + + # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called. + sig { + params(params: T.any(::Stripe::Order::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def submit(params = {}, opts = {}); end + + # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called. + sig { + params(id: String, params: T.any(::Stripe::Order::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def self.submit(id, params = {}, opts = {}); end + + # Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Order::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_attempt_record.rbi b/rbi/stripe/resources/payment_attempt_record.rbi index 071114bca..6f51bf42a 100644 --- a/rbi/stripe/resources/payment_attempt_record.rbi +++ b/rbi/stripe/resources/payment_attempt_record.rbi @@ -9,148 +9,207 @@ module Stripe # can have guaranteed funds. class PaymentAttemptRecord < APIResource class AmountCanceled < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountFailed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountGuaranteed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRequested < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class CustomerDetails < Stripe::StripeObject + # ID of the Stripe Customer associated with this payment. sig { returns(T.nilable(String)) } attr_reader :customer + # The customer's email address. sig { returns(T.nilable(String)) } attr_reader :email + # The customer's name. sig { returns(T.nilable(String)) } attr_reader :name + # The customer's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The billing email associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :email + # The billing name associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :name + # The billing phone number associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :phone end class Custom < Stripe::StripeObject + # Display name for the custom (user-defined) payment method type used to make this payment. sig { returns(String) } attr_reader :display_name + # The custom payment method type associated with this payment. sig { returns(T.nilable(String)) } attr_reader :type end + # The billing details associated with the method of payment. sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. sig { returns(T.nilable(Custom)) } attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. sig { returns(T.nilable(String)) } attr_reader :payment_method + # The type of Payment Method used for this payment attempt. sig { returns(String) } attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The shipping recipient's name. sig { returns(T.nilable(String)) } attr_reader :name + # The shipping recipient's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(AmountCanceled) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountCanceled) } attr_reader :amount_canceled - sig { returns(AmountFailed) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountFailed) } attr_reader :amount_failed - sig { returns(AmountGuaranteed) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountGuaranteed) } attr_reader :amount_guaranteed - sig { returns(AmountRequested) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountRequested) } attr_reader :amount_requested - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CustomerDetails)) } # Customer information for this payment. + sig { returns(T.nilable(CustomerDetails)) } attr_reader :customer_details - sig { returns(T.nilable(String)) } # Indicates whether the customer was present in your checkout flow during this payment. - attr_reader :customer_presence sig { returns(T.nilable(String)) } + attr_reader :customer_presence # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PaymentMethodDetails)) } # Information about the Payment Method debited for this payment. + sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - sig { returns(String) } # ID of the Payment Record this Payment Attempt Record belongs to. + sig { returns(String) } attr_reader :payment_record - sig { returns(T.nilable(String)) } # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + sig { returns(T.nilable(String)) } attr_reader :payment_reference - sig { returns(T.nilable(ShippingDetails)) } # Shipping information for this payment. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the Payment Record. + sig { returns(String) } + attr_accessor :payment_record + sig { params(expand: T::Array[String], payment_record: String).void } + def initialize(expand: nil, payment_record: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # List all the Payment Attempt Records attached to the specified Payment Record. + sig { + params(params: T.any(::Stripe::PaymentAttemptRecord::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_intent.rbi b/rbi/stripe/resources/payment_intent.rbi index 194deb171..eb7728564 100644 --- a/rbi/stripe/resources/payment_intent.rbi +++ b/rbi/stripe/resources/payment_intent.rbi @@ -17,102 +17,176 @@ module Stripe class PaymentIntent < APIResource class AmountDetails < Stripe::StripeObject class Tip < Stripe::StripeObject + # Portion of the amount that corresponds to a tip. sig { returns(Integer) } attr_reader :amount end + # Attribute for field tip sig { returns(Tip) } attr_reader :tip end class AsyncWorkflows < Stripe::StripeObject class Inputs < Stripe::StripeObject class Tax < Stripe::StripeObject + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id sig { returns(String) } attr_reader :calculation end + # Attribute for field tax sig { returns(Tax) } attr_reader :tax end + # Attribute for field inputs sig { returns(Inputs) } attr_reader :inputs end class AutomaticPaymentMethods < Stripe::StripeObject + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. sig { returns(String) } attr_reader :allow_redirects + # Automatically calculates compatible payment methods sig { returns(T::Boolean) } attr_reader :enabled end class LastPaymentError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end class NextAction < Stripe::StripeObject class AlipayHandleRedirect < Stripe::StripeObject + # The native data to be used with Alipay SDK you must redirect your customer to in order to authenticate the payment in an Android App. sig { returns(T.nilable(String)) } attr_reader :native_data + # The native URL you must redirect your customer to in order to authenticate the payment in an iOS App. sig { returns(T.nilable(String)) } attr_reader :native_url + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. sig { returns(T.nilable(String)) } attr_reader :url end class BoletoDisplayDetails < Stripe::StripeObject + # The timestamp after which the boleto expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # The URL to the hosted boleto voucher page, which allows customers to view the boleto voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # The boleto number. sig { returns(T.nilable(String)) } attr_reader :number + # The URL to the downloadable boleto voucher PDF. sig { returns(T.nilable(String)) } attr_reader :pdf end class CardAwaitNotification < Stripe::StripeObject + # The time that payment will be attempted. If customer approval is required, they need to provide approval before this time. sig { returns(T.nilable(Integer)) } attr_reader :charge_attempt_at + # For payments greater than INR 15000, the customer must provide explicit approval of the payment with their bank. For payments of lower amount, no customer action is required. sig { returns(T.nilable(T::Boolean)) } attr_reader :customer_approval_required end class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject + # The date (unix timestamp) when the QR code expires. sig { returns(Integer) } attr_reader :expires_at + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. sig { returns(String) } attr_reader :hosted_instructions_url + # The url for mobile redirect based auth sig { returns(String) } attr_reader :mobile_auth_url + # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end @@ -120,1427 +194,2228 @@ module Stripe class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The ABA account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The ABA routing number sig { returns(String) } attr_reader :routing_number end class Iban < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The BIC/SWIFT code of the account. sig { returns(String) } attr_reader :bic + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # The IBAN of the account. sig { returns(String) } attr_reader :iban end class SortCode < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The name of the person or business that owns the bank account sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The six-digit sort code sig { returns(String) } attr_reader :sort_code end class Spei < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The three-digit bank code sig { returns(String) } attr_reader :bank_code + # The short banking institution name sig { returns(String) } attr_reader :bank_name + # The CLABE number sig { returns(String) } attr_reader :clabe end class Swift < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(String) } attr_reader :account_holder_name + # The account number sig { returns(String) } attr_reader :account_number + # The account type sig { returns(String) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank name sig { returns(String) } attr_reader :bank_name + # The SWIFT code sig { returns(String) } attr_reader :swift_code end class Zengin < Stripe::StripeObject class AccountHolderAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class BankAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field account_holder_address sig { returns(AccountHolderAddress) } attr_reader :account_holder_address + # The account holder name sig { returns(T.nilable(String)) } attr_reader :account_holder_name + # The account number sig { returns(T.nilable(String)) } attr_reader :account_number + # The bank account type. In Japan, this can only be `futsu` or `toza`. sig { returns(T.nilable(String)) } attr_reader :account_type + # Attribute for field bank_address sig { returns(BankAddress) } attr_reader :bank_address + # The bank code of the account sig { returns(T.nilable(String)) } attr_reader :bank_code + # The bank name of the account sig { returns(T.nilable(String)) } attr_reader :bank_name + # The branch code of the account sig { returns(T.nilable(String)) } attr_reader :branch_code + # The branch name of the account sig { returns(T.nilable(String)) } attr_reader :branch_name end + # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba + # Iban Records contain E.U. bank account details per the SEPA format. sig { returns(Iban) } attr_reader :iban + # Sort Code Records contain U.K. bank account details per the sort code format. sig { returns(SortCode) } attr_reader :sort_code + # SPEI Records contain Mexico bank account details per the SPEI format. sig { returns(Spei) } attr_reader :spei + # The payment networks supported by this FinancialAddress sig { returns(T::Array[String]) } attr_reader :supported_networks + # SWIFT Records contain U.S. bank account details per the SWIFT format. sig { returns(Swift) } attr_reader :swift + # The type of financial address sig { returns(String) } attr_reader :type + # Zengin Records contain Japan bank account details per the Zengin format. sig { returns(Zengin) } attr_reader :zengin end + # The remaining amount that needs to be transferred to complete the payment. sig { returns(T.nilable(Integer)) } attr_reader :amount_remaining + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency + # A list of financial addresses that can be used to fund the customer balance sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses + # A link to a hosted page that guides your customer through completing the transfer. sig { returns(T.nilable(String)) } attr_reader :hosted_instructions_url + # A string identifying this payment. Instruct your customer to include this code in the reference or memo field of their bank transfer. sig { returns(T.nilable(String)) } attr_reader :reference + # Type of bank transfer sig { returns(String) } attr_reader :type end class KonbiniDisplayDetails < Stripe::StripeObject class Stores < Stripe::StripeObject class Familymart < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end class Lawson < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end class Ministop < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end class Seicomart < Stripe::StripeObject + # The confirmation number. sig { returns(String) } attr_reader :confirmation_number + # The payment code. sig { returns(String) } attr_reader :payment_code end + # FamilyMart instruction details. sig { returns(T.nilable(Familymart)) } attr_reader :familymart + # Lawson instruction details. sig { returns(T.nilable(Lawson)) } attr_reader :lawson + # Ministop instruction details. sig { returns(T.nilable(Ministop)) } attr_reader :ministop + # Seicomart instruction details. sig { returns(T.nilable(Seicomart)) } attr_reader :seicomart end + # The timestamp at which the pending Konbini payment expires. sig { returns(Integer) } attr_reader :expires_at + # The URL for the Konbini payment instructions page, which allows customers to view and print a Konbini voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # Attribute for field stores sig { returns(Stores) } attr_reader :stores end class MultibancoDisplayDetails < Stripe::StripeObject + # Entity number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :entity + # The timestamp at which the Multibanco voucher expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # The URL for the hosted Multibanco voucher page, which allows customers to view a Multibanco voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # Reference number associated with this Multibanco payment. sig { returns(T.nilable(String)) } attr_reader :reference end class OxxoDisplayDetails < Stripe::StripeObject + # The timestamp after which the OXXO voucher expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_after + # The URL for the hosted OXXO voucher page, which allows customers to view and print an OXXO voucher. sig { returns(T.nilable(String)) } attr_reader :hosted_voucher_url + # OXXO reference number. sig { returns(T.nilable(String)) } attr_reader :number end class PaynowDisplayQrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The URL to the hosted PayNow instructions page, which allows customers to view the PayNow QR code. sig { returns(T.nilable(String)) } attr_reader :hosted_instructions_url + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end class PixDisplayQrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The date (unix timestamp) when the PIX expires. sig { returns(Integer) } attr_reader :expires_at + # The URL to the hosted pix instructions page, which allows customers to view the pix QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The image_url_png string used to render png QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render svg QR code sig { returns(String) } attr_reader :image_url_svg end class PromptpayDisplayQrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The URL to the hosted PromptPay instructions page, which allows customers to view the PromptPay QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The PNG path used to render the QR code, can be used as the source in an HTML img tag sig { returns(String) } attr_reader :image_url_png + # The SVG path used to render the QR code, can be used as the source in an HTML img tag sig { returns(String) } attr_reader :image_url_svg end class RedirectToUrl < Stripe::StripeObject + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate the payment. sig { returns(T.nilable(String)) } attr_reader :url end class SwishHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject + # The raw data string used to generate QR code, it should be used together with QR code library. sig { returns(String) } attr_reader :data + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end + # The URL to the hosted Swish instructions page, which allows customers to view the QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The url for mobile redirect based auth (for internal use only and not typically available in standard API requests). sig { returns(String) } attr_reader :mobile_auth_url + # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end class VerifyWithMicrodeposits < Stripe::StripeObject + # The timestamp when the microdeposits are expected to land. sig { returns(Integer) } attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. sig { returns(String) } attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. sig { returns(T.nilable(String)) } attr_reader :microdeposit_type end class WechatPayDisplayQrCode < Stripe::StripeObject + # The data being used to generate QR code sig { returns(String) } attr_reader :data + # The URL to the hosted WeChat Pay instructions page, which allows customers to view the WeChat Pay QR code. sig { returns(String) } attr_reader :hosted_instructions_url + # The base64 image data for a pre-generated QR code sig { returns(String) } attr_reader :image_data_url + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end class WechatPayRedirectToAndroidApp < Stripe::StripeObject + # app_id is the APP ID registered on WeChat open platform sig { returns(String) } attr_reader :app_id + # nonce_str is a random string sig { returns(String) } attr_reader :nonce_str + # package is static value sig { returns(String) } attr_reader :package + # an unique merchant ID assigned by WeChat Pay sig { returns(String) } attr_reader :partner_id + # an unique trading ID assigned by WeChat Pay sig { returns(String) } attr_reader :prepay_id + # A signature sig { returns(String) } attr_reader :sign + # Specifies the current time in epoch format sig { returns(String) } attr_reader :timestamp end class WechatPayRedirectToIosApp < Stripe::StripeObject + # An universal link that redirect to WeChat Pay app sig { returns(String) } attr_reader :native_url end + # Attribute for field alipay_handle_redirect sig { returns(AlipayHandleRedirect) } attr_reader :alipay_handle_redirect + # Attribute for field boleto_display_details sig { returns(BoletoDisplayDetails) } attr_reader :boleto_display_details + # Attribute for field card_await_notification sig { returns(CardAwaitNotification) } attr_reader :card_await_notification + # Attribute for field cashapp_handle_redirect_or_display_qr_code sig { returns(CashappHandleRedirectOrDisplayQrCode) } attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field display_bank_transfer_instructions sig { returns(DisplayBankTransferInstructions) } attr_reader :display_bank_transfer_instructions + # Attribute for field konbini_display_details sig { returns(KonbiniDisplayDetails) } attr_reader :konbini_display_details + # Attribute for field multibanco_display_details sig { returns(MultibancoDisplayDetails) } attr_reader :multibanco_display_details + # Attribute for field oxxo_display_details sig { returns(OxxoDisplayDetails) } attr_reader :oxxo_display_details + # Attribute for field paynow_display_qr_code sig { returns(PaynowDisplayQrCode) } attr_reader :paynow_display_qr_code + # Attribute for field pix_display_qr_code sig { returns(PixDisplayQrCode) } attr_reader :pix_display_qr_code + # Attribute for field promptpay_display_qr_code sig { returns(PromptpayDisplayQrCode) } attr_reader :promptpay_display_qr_code + # Attribute for field redirect_to_url sig { returns(RedirectToUrl) } attr_reader :redirect_to_url + # Attribute for field swish_handle_redirect_or_display_qr_code sig { returns(SwishHandleRedirectOrDisplayQrCode) } attr_reader :swish_handle_redirect_or_display_qr_code + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. sig { returns(String) } attr_reader :type + # When confirming a PaymentIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits + # Attribute for field wechat_pay_display_qr_code sig { returns(WechatPayDisplayQrCode) } attr_reader :wechat_pay_display_qr_code + # Attribute for field wechat_pay_redirect_to_android_app sig { returns(WechatPayRedirectToAndroidApp) } attr_reader :wechat_pay_redirect_to_android_app + # Attribute for field wechat_pay_redirect_to_ios_app sig { returns(WechatPayRedirectToIosApp) } attr_reader :wechat_pay_redirect_to_ios_app end class PaymentDetails < Stripe::StripeObject class CarRental < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject + # The email of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :email + # The name of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :name + # The phone number of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :phone end + # The delivery method for the payment sig { returns(String) } attr_reader :mode + # Attribute for field recipient sig { returns(Recipient) } attr_reader :recipient end class Driver < Stripe::StripeObject + # Full name of the driver on the reservation. sig { returns(String) } attr_reader :name end class PickupAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ReturnAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate + # The booking number associated with the car rental. sig { returns(String) } attr_reader :booking_number + # Class code of the car. sig { returns(String) } attr_reader :car_class_code + # Make of the car. sig { returns(String) } attr_reader :car_make + # Model of the car. sig { returns(String) } attr_reader :car_model + # The name of the rental car company. sig { returns(String) } attr_reader :company + # The customer service phone number of the car rental company. sig { returns(String) } attr_reader :customer_service_phone_number + # Number of days the car is being rented. sig { returns(Integer) } attr_reader :days_rented + # Attribute for field delivery sig { returns(Delivery) } attr_reader :delivery + # The details of the drivers associated with the trip. sig { returns(T::Array[Driver]) } attr_reader :drivers + # List of additional charges being billed. sig { returns(T::Array[String]) } attr_reader :extra_charges + # Indicates if the customer did not keep nor cancel their booking. sig { returns(T::Boolean) } attr_reader :no_show + # Attribute for field pickup_address sig { returns(PickupAddress) } attr_reader :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :pickup_at + # Rental rate. sig { returns(Integer) } attr_reader :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` sig { returns(String) } attr_reader :rate_interval + # The full name of the person or entity renting the car. sig { returns(String) } attr_reader :renter_name + # Attribute for field return_address sig { returns(ReturnAddress) } attr_reader :return_address + # Car return time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. sig { returns(T::Boolean) } attr_reader :tax_exempt end class EventDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class Delivery < Stripe::StripeObject class Recipient < Stripe::StripeObject + # The email of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :email + # The name of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :name + # The phone number of the recipient the ticket is delivered to. sig { returns(String) } attr_reader :phone end + # The delivery method for the payment sig { returns(String) } attr_reader :mode + # Attribute for field recipient sig { returns(Recipient) } attr_reader :recipient end + # Indicates if the tickets are digitally checked when entering the venue. sig { returns(T::Boolean) } attr_reader :access_controlled_venue + # Attribute for field address sig { returns(Address) } attr_reader :address + # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate + # The name of the company sig { returns(String) } attr_reader :company + # Attribute for field delivery sig { returns(Delivery) } attr_reader :delivery + # Event end time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :ends_at + # Type of the event entertainment (concert, sports event etc) sig { returns(String) } attr_reader :genre + # The name of the event. sig { returns(String) } attr_reader :name + # Event start time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :starts_at end class Subscription < Stripe::StripeObject class Affiliate < Stripe::StripeObject + # The name of the affiliate that originated the purchase. sig { returns(String) } attr_reader :name end class BillingInterval < Stripe::StripeObject + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval end + # Attribute for field affiliate sig { returns(Affiliate) } attr_reader :affiliate + # Info whether the subscription will be auto renewed upon expiry. sig { returns(T::Boolean) } attr_reader :auto_renewal + # Attribute for field billing_interval sig { returns(BillingInterval) } attr_reader :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription. sig { returns(String) } attr_reader :name + # Subscription start time. Measured in seconds since the Unix epoch. sig { returns(Integer) } attr_reader :starts_at end + # Attribute for field car_rental sig { returns(CarRental) } attr_reader :car_rental + # Attribute for field event_details sig { returns(EventDetails) } attr_reader :event_details + # Attribute for field subscription sig { returns(Subscription) } attr_reader :subscription end class PaymentMethodConfigurationDetails < Stripe::StripeObject + # ID of the payment method configuration used. sig { returns(String) } attr_reader :id + # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Affirm < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AfterpayClearpay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alipay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Alma < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class AmazonPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class AuBecsDebit < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Blik < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Boleto < Stripe::StripeObject + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto voucher will expire on Wednesday at 23:59 America/Sao_Paulo time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject class AvailablePlan < Stripe::StripeObject + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval + # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end class Plan < Stripe::StripeObject + # For `fixed_count` installment plans, this is the number of installment payments your customer will make to their credit card. sig { returns(T.nilable(Integer)) } attr_reader :count + # For `fixed_count` installment plans, this is the interval between installment payments your customer will make to their credit card. + # One of `month`. sig { returns(T.nilable(String)) } attr_reader :interval + # Type of installment plan, one of `fixed_count`. sig { returns(String) } attr_reader :type end + # Installment plans that may be selected for this PaymentIntent. sig { returns(T.nilable(T::Array[AvailablePlan])) } attr_reader :available_plans + # Whether Installments are enabled for this PaymentIntent. sig { returns(T::Boolean) } attr_reader :enabled + # Installment plan selected for this PaymentIntent. sig { returns(T.nilable(Plan)) } attr_reader :plan end class MandateOptions < Stripe::StripeObject + # Amount to be charged for future payments. sig { returns(Integer) } attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(String) } attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. sig { returns(T.nilable(Integer)) } attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. sig { returns(String) } attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. sig { returns(T.nilable(Integer)) } attr_reader :interval_count + # Unique identifier for the mandate or subscription. sig { returns(String) } attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. sig { returns(Integer) } attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. sig { returns(T.nilable(T::Array[String])) } attr_reader :supported_types end class StatementDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(String) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(String) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(String) } attr_reader :line2 + # ZIP or postal code. sig { returns(String) } attr_reader :postal_code + # State, county, province, or region. sig { returns(String) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Phone number sig { returns(String) } attr_reader :phone end + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Installment details for this payment (Mexico only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). sig { returns(T.nilable(Installments)) } attr_reader :installments + # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } attr_reader :mandate_options + # Selected network to process this payment intent on. Depends on the available networks of the card attached to the payment intent. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. sig { returns(String) } attr_reader :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. sig { returns(String) } attr_reader :request_overcapture + # Request partial authorization on this PaymentIntent. sig { returns(String) } attr_reader :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). sig { returns(T::Boolean) } attr_reader :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. sig { returns(String) } attr_reader :statement_descriptor_suffix_kanji + # Attribute for field statement_details sig { returns(StatementDetails) } attr_reader :statement_details end class CardPresent < Stripe::StripeObject class Routing < Stripe::StripeObject + # Requested routing priority sig { returns(T.nilable(String)) } attr_reader :requested_priority end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) sig { returns(T.nilable(T::Boolean)) } attr_reader :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. sig { returns(T.nilable(T::Boolean)) } attr_reader :request_incremental_authorization_support + # Attribute for field routing sig { returns(Routing) } attr_reader :routing end class Cashapp < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. sig { returns(T::Array[String]) } attr_reader :requested_address_types + # The bank transfer type that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Eps < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Fpx < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Giropay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Gopay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Grabpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class IdBankTransfer < Stripe::StripeObject + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now till 2678400 seconds (31 days) from now. sig { returns(T.nilable(Integer)) } attr_reader :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Ideal < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class InteracPresent < Stripe::StripeObject; end class KakaoPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Klarna < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Preferred locale of the Klarna checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Konbini < Stripe::StripeObject + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. sig { returns(T.nilable(String)) } attr_reader :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. sig { returns(T.nilable(String)) } attr_reader :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class KrCard < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Link < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class MbWay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Mobilepay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Multibanco < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class NaverPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Oxxo < Stripe::StripeObject + # The number of calendar days before an OXXO invoice expires. For example, if you create an OXXO invoice on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. sig { returns(Integer) } attr_reader :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class P24 < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Payco < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class Paynow < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Paypal < Stripe::StripeObject class LineItem < Stripe::StripeObject class Tax < Stripe::StripeObject + # The tax for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :amount + # The tax behavior for the line item. sig { returns(String) } attr_reader :behavior end + # Type of the line item. sig { returns(String) } attr_reader :category + # Description of the line item. sig { returns(String) } attr_reader :description + # Descriptive name of the line item. sig { returns(String) } attr_reader :name + # Quantity of the line item. Cannot be a negative number. sig { returns(Integer) } attr_reader :quantity + # Client facing stock keeping unit, article number or similar. sig { returns(String) } attr_reader :sku + # The Stripe account ID of the connected account that sells the item. This is only needed when using [Separate Charges and Transfers](https://docs.stripe.com/connect/separate-charges-and-transfers). sig { returns(String) } attr_reader :sold_by + # Attribute for field tax sig { returns(Tax) } attr_reader :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. sig { returns(Integer) } attr_reader :unit_amount end + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # The line items purchased by the customer. sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Preferred locale of the PayPal checkout page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. sig { returns(T.nilable(String)) } attr_reader :reference_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Pix < Stripe::StripeObject + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. sig { returns(T.nilable(Integer)) } attr_reader :expires_after_seconds + # The timestamp at which the Pix expires. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Promptpay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Qris < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Rechnung < Stripe::StripeObject; end class RevolutPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class SamsungPay < Stripe::StripeObject + # Controls when the funds will be captured from the customer's account. sig { returns(String) } attr_reader :capture_method end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Shopeepay < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Sofort < Stripe::StripeObject + # Preferred language of the SOFORT authorization page that the customer is redirected to. sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Swish < Stripe::StripeObject + # A reference for this payment to be displayed in the Swish app. sig { returns(T.nilable(String)) } attr_reader :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Twint < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method sig { returns(String) } attr_reader :collection_method end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Preferred transaction settlement speed sig { returns(String) } attr_reader :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class WechatPay < Stripe::StripeObject + # The app ID registered with WeChat Pay. Only required when client is ios or android. sig { returns(T.nilable(String)) } attr_reader :app_id + # The client type that the end customer will pay from sig { returns(T.nilable(String)) } attr_reader :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end class Zip < Stripe::StripeObject + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). sig { returns(String) } attr_reader :setup_future_usage end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_balance sig { returns(CustomerBalance) } attr_reader :customer_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field fpx sig { returns(Fpx) } attr_reader :fpx + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field gopay sig { returns(Gopay) } attr_reader :gopay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field interac_present sig { returns(InteracPresent) } attr_reader :interac_present + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field konbini sig { returns(Konbini) } attr_reader :konbini + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field mb_way sig { returns(MbWay) } attr_reader :mb_way + # Attribute for field mobilepay sig { returns(Mobilepay) } attr_reader :mobilepay + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field naver_pay sig { returns(NaverPay) } attr_reader :naver_pay + # Attribute for field oxxo sig { returns(Oxxo) } attr_reader :oxxo + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field payco sig { returns(Payco) } attr_reader :payco + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field promptpay sig { returns(Promptpay) } attr_reader :promptpay + # Attribute for field qris sig { returns(Qris) } attr_reader :qris + # Attribute for field rechnung sig { returns(Rechnung) } attr_reader :rechnung + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field shopeepay sig { returns(Shopeepay) } attr_reader :shopeepay + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field twint sig { returns(Twint) } attr_reader :twint + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class Processing < Stripe::StripeObject class Card < Stripe::StripeObject class CustomerNotification < Stripe::StripeObject + # Whether customer approval has been requested for this payment. For payments greater than INR 15000 or mandate amount, the customer must provide explicit approval of the payment with their bank. sig { returns(T.nilable(T::Boolean)) } attr_reader :approval_requested + # If customer approval is required, they need to provide approval before this time. sig { returns(T.nilable(Integer)) } attr_reader :completes_at end + # Attribute for field customer_notification sig { returns(CustomerNotification) } attr_reader :customer_notification end + # Attribute for field card sig { returns(Card) } attr_reader :card + # Type of the payment method for which payment is in `processing` state, one of `card`. sig { returns(String) } attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class TransferData < Stripe::StripeObject + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount + # The account (if any) that the payment is attributed to for tax + # reporting, and where funds from the payment are transferred to after + # payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(Integer) } # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Amount that can be captured from this PaymentIntent. + sig { returns(Integer) } attr_reader :amount_capturable - sig { returns(AmountDetails) } # Attribute for field amount_details + sig { returns(AmountDetails) } attr_reader :amount_details - sig { returns(Integer) } # Amount that this PaymentIntent collects. + sig { returns(Integer) } attr_reader :amount_received - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect application that created the PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(AsyncWorkflows) } # Attribute for field async_workflows + sig { returns(AsyncWorkflows) } attr_reader :async_workflows - sig { returns(T.nilable(AutomaticPaymentMethods)) } # Settings to configure compatible payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods) + sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods - sig { returns(T.nilable(Integer)) } # Populated when `status` is `canceled`, this is the time at which the PaymentIntent was canceled. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - sig { returns(T.nilable(String)) } # Reason for cancellation of this PaymentIntent, either user-provided (`duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned`) or generated by Stripe internally (`failed_invoice`, `void_invoice`, or `automatic`). + sig { returns(T.nilable(String)) } attr_reader :cancellation_reason - sig { returns(String) } # Controls when the funds will be captured from the customer's account. + sig { returns(String) } attr_reader :capture_method - sig { returns(T.nilable(String)) } # The client secret of this PaymentIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete a payment from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. # # Refer to our docs to [accept a payment](https://stripe.com/docs/payments/accept-a-payment?ui=elements) and learn about how `client_secret` should be handled. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(String) } # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + sig { returns(String) } attr_reader :confirmation_method - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # ID of the Customer this PaymentIntent belongs to, if one exists. # # Payment methods attached to other Customers cannot be used with this PaymentIntent. # # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # ID of the invoice that created this PaymentIntent, if it exists. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(T.nilable(LastPaymentError)) } # The payment error encountered in the previous PaymentIntent confirmation. It will be cleared if the PaymentIntent is later updated for any reason. + sig { returns(T.nilable(LastPaymentError)) } attr_reader :last_payment_error - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } # ID of the latest [Charge object](https://stripe.com/docs/api/charges) created by this PaymentIntent. This property is `null` until PaymentIntent confirmation is attempted. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :latest_charge - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Learn more about [storing information in metadata](https://stripe.com/docs/payments/payment-intents/creating-payment-intents#storing-information-in-metadata). + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NextAction)) } # If present, this property tells you what actions you need to take in order for your customer to fulfill a payment using the provided source. + sig { returns(T.nilable(NextAction)) } attr_reader :next_action - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account (if any) for which the funds of the PaymentIntent are intended. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(PaymentDetails) } # Attribute for field payment_details + sig { returns(PaymentDetails) } attr_reader :payment_details - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } # ID of the payment method used in this PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :payment_method - sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this PaymentIntent. + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } attr_reader :payment_method_configuration_details - sig { returns(T.nilable(PaymentMethodOptions)) } # Payment-method-specific configuration for this PaymentIntent. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T::Array[String]) } # The list of payment method types (e.g. card) that this PaymentIntent is allowed to use. + sig { returns(T::Array[String]) } attr_reader :payment_method_types - sig { returns(T.nilable(Processing)) } # If present, this property tells you about the processing state of the payment. + sig { returns(T.nilable(Processing)) } attr_reader :processing - sig { returns(T.nilable(String)) } # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(T.nilable(String)) } attr_reader :receipt_email - sig { returns(T.nilable(T.any(String, Stripe::Review))) } # ID of the review associated with this PaymentIntent, if any. + sig { returns(T.nilable(T.any(String, Stripe::Review))) } attr_reader :review - sig { returns(String) } # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + sig { returns(String) } attr_reader :secret_key_confirmation - sig { returns(T.nilable(String)) } # Indicates that you intend to make future payments with this PaymentIntent's payment method. # # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. @@ -1548,31 +2423,11416 @@ module Stripe # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. # # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } attr_reader :setup_future_usage - sig { returns(T.nilable(Shipping)) } # Shipping information for this PaymentIntent. + sig { returns(T.nilable(Shipping)) } attr_reader :shipping + # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # This is a legacy field that will be removed in the future. It is the ID of the Source object that is associated with this PaymentIntent, if one was supplied. attr_reader :source - sig { returns(T.nilable(String)) } # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). # # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix - sig { returns(String) } # Status of this PaymentIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `requires_capture`, `canceled`, or `succeeded`. Read more about each PaymentIntent [status](https://stripe.com/docs/payments/intents#intent-statuses). + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(TransferData)) } # The data that automatically creates a Transfer after the payment finalizes. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(String)) } # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + sig { returns(T.nilable(String)) } attr_reader :transfer_group + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::PaymentIntent::ListParams::Created, Integer)) } + attr_accessor :created + # Only return PaymentIntents for the customer that this customer ID specifies. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::PaymentIntent::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { returns(::Stripe::PaymentIntent::CreateParams::AsyncWorkflows::Inputs::Tax) } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntent::CreateParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntent::CreateParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { params(inputs: ::Stripe::PaymentIntent::CreateParams::AsyncWorkflows::Inputs).void } + def initialize(inputs: nil); end + end + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + sig { returns(String) } + attr_accessor :allow_redirects + # Whether this feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allow_redirects: String, enabled: T::Boolean).void } + def initialize(allow_redirects: nil, enabled: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { returns(::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance) } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::PaymentIntent::CreateParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntent::CreateParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Rechnung::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Blik, boleto: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Eps, fpx: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Fpx, giropay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Giropay, gopay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Klarna, konbini: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::KrCard, link: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Link, mb_way: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Oxxo, p24: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::P24, payco: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payco, paynow: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paynow, paypal: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Paypal, payto: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Payto, pix: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Pix, promptpay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Promptpay, qris: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Qris, radar_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Sofort, swish: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Swish, twint: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::WechatPay, zip: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + sig { returns(String) } + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(code: String, setup_future_usage: T.nilable(String)).void } + def initialize(code: nil, setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: T.nilable(String)).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Please pass in an address that is within your Stripe user account country + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::StatementDetails::Address) + } + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::StatementDetails::Address, phone: String).void + } + def initialize(address: nil, phone: nil); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + sig { returns(String) } + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, exemption_indicator: String, network_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + sig { returns(String) } + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + sig { returns(T::Boolean) } + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::StatementDetails)) + } + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(capture_method: T.nilable(String), cvc_token: String, installments: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::Installments, mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_partial_authorization: String, request_three_d_secure: String, require_cvc_recollection: T::Boolean, setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String), statement_details: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::StatementDetails), three_d_secure: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + sig { returns(String) } + attr_accessor :requested_priority + sig { params(requested_priority: String).void } + def initialize(requested_priority: nil); end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + sig { returns(T::Boolean) } + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + sig { returns(T::Boolean) } + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent::Routing) + } + attr_accessor :routing + sig { + params(request_extended_authorization: T::Boolean, request_incremental_authorization_support: T::Boolean, routing: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent::Routing).void + } + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + sig { returns(Integer) } + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + sig { returns(T.nilable(String)) } + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(confirmation_number: T.nilable(String), expires_after_days: T.nilable(Integer), expires_at: T.nilable(Integer), product_description: T.nilable(String), setup_future_usage: String).void + } + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end + end + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: T.nilable(String), setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ); end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after_seconds: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end + end + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Rechnung < Stripe::RequestParams + + end + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + sig { returns(T.nilable(String)) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(reference: T.nilable(String), setup_future_usage: String).void } + def initialize(reference: nil, setup_future_usage: nil); end + end + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Preferred transaction settlement speed + sig { returns(T.nilable(String)) } + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Affirm)) + } + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alma)) + } + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AmazonPay)) + } + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AuBecsDebit)) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit)) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Blik)) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Boleto)) + } + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp)) + } + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Eps)) } + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Fpx)) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Giropay)) + } + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Gopay)) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Grabpay)) + } + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::InteracPresent)) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KakaoPay)) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KrCard)) + } + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::MbWay)) + } + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Mobilepay)) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Multibanco)) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NaverPay)) + } + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::P24)) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payco)) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paynow)) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payto)) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Pix)) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Promptpay)) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Qris)) + } + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Rechnung)) + } + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::RevolutPay)) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SamsungPay)) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Shopeepay)) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Swish)) + } + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Twint)) + } + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Zip)) } + attr_accessor :zip + sig { + params(acss_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alipay), alma: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Bancontact), blik: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Blik), boleto: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CardPresent), cashapp: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Giropay), gopay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Gopay), grabpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Grabpay), id_bank_transfer: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::IdBankTransfer), ideal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Link), mb_way: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::MbWay), mobilepay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::P24), payco: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Paypal), payto: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Payto), pix: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Promptpay), qris: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Qris), rechnung: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Rechnung), revolut_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::SepaDebit), shopeepay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Shopeepay), sofort: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Swish), twint: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Twint), us_bank_account: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions::Zip)).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::PaymentIntent::CreateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::PaymentIntent::CreateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + # The amount is capped at the total transaction amount and if no amount is set, + # the full amount is transferred. + # + # If you intend to collect a fee and you need a more robust reporting experience, using + # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) + # might be a better fit for your integration. + sig { returns(Integer) } + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntent::CreateParams::AsyncWorkflows) } + attr_accessor :async_workflows + # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. + sig { returns(::Stripe::PaymentIntent::CreateParams::AutomaticPaymentMethods) } + attr_accessor :automatic_payment_methods + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + sig { returns(T::Boolean) } + attr_accessor :confirm + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + sig { returns(String) } + attr_accessor :confirmation_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(T::Boolean) } + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(String) } + attr_accessor :mandate + # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(T.nilable(::Stripe::PaymentIntent::CreateParams::MandateData)) } + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(T.any(T::Boolean, String)) } + attr_accessor :off_session + # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(String) } + attr_accessor :on_behalf_of + # Provides industry-specific information about the charge. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentDetails) } + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + # + # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + sig { returns(::Stripe::PaymentIntent::CreateParams::RadarOptions) } + attr_accessor :radar_options + # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(String) } + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(String) } + attr_accessor :return_url + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + sig { returns(String) } + attr_accessor :secret_key_confirmation + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::CreateParams::Shipping) } + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a Transfer. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntent::CreateParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + sig { returns(String) } + attr_accessor :transfer_group + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(amount: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntent::CreateParams::AsyncWorkflows, automatic_payment_methods: ::Stripe::PaymentIntent::CreateParams::AutomaticPaymentMethods, capture_method: String, confirm: T::Boolean, confirmation_method: String, confirmation_token: String, currency: String, customer: String, description: String, error_on_requires_action: T::Boolean, expand: T::Array[String], mandate: String, mandate_data: T.nilable(::Stripe::PaymentIntent::CreateParams::MandateData), metadata: T::Hash[String, String], off_session: T.any(T::Boolean, String), on_behalf_of: String, payment_details: ::Stripe::PaymentIntent::CreateParams::PaymentDetails, payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::PaymentIntent::CreateParams::PaymentMethodData, payment_method_options: ::Stripe::PaymentIntent::CreateParams::PaymentMethodOptions, payment_method_types: T::Array[String], radar_options: ::Stripe::PaymentIntent::CreateParams::RadarOptions, receipt_email: String, return_url: String, secret_key_confirmation: String, setup_future_usage: String, shipping: ::Stripe::PaymentIntent::CreateParams::Shipping, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::PaymentIntent::CreateParams::TransferData, transfer_group: String, use_stripe_sdk: T::Boolean).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + automatic_payment_methods: nil, + capture_method: nil, + confirm: nil, + confirmation_method: nil, + confirmation_token: nil, + currency: nil, + customer: nil, + description: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + secret_key_confirmation: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil, + use_stripe_sdk: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + sig { returns(String) } + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(client_secret: String, expand: T::Array[String]).void } + def initialize(client_secret: nil, expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { returns(::Stripe::PaymentIntent::UpdateParams::AsyncWorkflows::Inputs::Tax) } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntent::UpdateParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntent::UpdateParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { params(inputs: ::Stripe::PaymentIntent::UpdateParams::AsyncWorkflows::Inputs).void } + def initialize(inputs: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. + sig { returns(String) } + attr_accessor :type + sig { + params(online: ::Stripe::PaymentIntent::UpdateParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { returns(::Stripe::PaymentIntent::UpdateParams::MandateData::CustomerAcceptance) } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::PaymentIntent::UpdateParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntent::UpdateParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Rechnung::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Blik, boleto: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Eps, fpx: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Fpx, giropay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Giropay, gopay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Klarna, konbini: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::KrCard, link: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Link, mb_way: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Oxxo, p24: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::P24, payco: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payco, paynow: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paynow, paypal: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Paypal, payto: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Payto, pix: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Pix, promptpay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Promptpay, qris: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Qris, radar_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Sofort, swish: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Swish, twint: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::WechatPay, zip: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + sig { returns(String) } + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(code: String, setup_future_usage: T.nilable(String)).void } + def initialize(code: nil, setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: T.nilable(String)).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Please pass in an address that is within your Stripe user account country + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::StatementDetails::Address) + } + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::StatementDetails::Address, phone: String).void + } + def initialize(address: nil, phone: nil); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + sig { returns(String) } + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, exemption_indicator: String, network_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + sig { returns(String) } + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + sig { returns(T::Boolean) } + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::StatementDetails)) + } + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(capture_method: T.nilable(String), cvc_token: String, installments: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::Installments, mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_partial_authorization: String, request_three_d_secure: String, require_cvc_recollection: T::Boolean, setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String), statement_details: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::StatementDetails), three_d_secure: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + sig { returns(String) } + attr_accessor :requested_priority + sig { params(requested_priority: String).void } + def initialize(requested_priority: nil); end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + sig { returns(T::Boolean) } + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + sig { returns(T::Boolean) } + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent::Routing) + } + attr_accessor :routing + sig { + params(request_extended_authorization: T::Boolean, request_incremental_authorization_support: T::Boolean, routing: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent::Routing).void + } + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + sig { returns(Integer) } + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + sig { returns(T.nilable(String)) } + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(confirmation_number: T.nilable(String), expires_after_days: T.nilable(Integer), expires_at: T.nilable(Integer), product_description: T.nilable(String), setup_future_usage: String).void + } + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end + end + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: T.nilable(String), setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ); end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after_seconds: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end + end + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Rechnung < Stripe::RequestParams + + end + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + sig { returns(T.nilable(String)) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(reference: T.nilable(String), setup_future_usage: String).void } + def initialize(reference: nil, setup_future_usage: nil); end + end + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Preferred transaction settlement speed + sig { returns(T.nilable(String)) } + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Affirm)) + } + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alma)) + } + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AmazonPay)) + } + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AuBecsDebit)) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit)) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Blik)) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Boleto)) + } + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp)) + } + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Eps)) } + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Fpx)) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Giropay)) + } + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Gopay)) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Grabpay)) + } + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::InteracPresent)) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KakaoPay)) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KrCard)) + } + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::MbWay)) + } + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Mobilepay)) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Multibanco)) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NaverPay)) + } + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::P24)) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payco)) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paynow)) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payto)) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Pix)) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Promptpay)) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Qris)) + } + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Rechnung)) + } + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::RevolutPay)) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SamsungPay)) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Shopeepay)) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Swish)) + } + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Twint)) + } + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Zip)) } + attr_accessor :zip + sig { + params(acss_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alipay), alma: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Bancontact), blik: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Blik), boleto: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CardPresent), cashapp: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Giropay), gopay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Gopay), grabpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Grabpay), id_bank_transfer: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::IdBankTransfer), ideal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Link), mb_way: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::MbWay), mobilepay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::P24), payco: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Paypal), payto: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Payto), pix: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Promptpay), qris: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Qris), rechnung: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Rechnung), revolut_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::SepaDebit), shopeepay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Shopeepay), sofort: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Swish), twint: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Twint), us_bank_account: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions::Zip)).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::PaymentIntent::UpdateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::PaymentIntent::UpdateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntent::UpdateParams::AsyncWorkflows) } + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # This hash contains details about the Mandate to create. + sig { returns(::Stripe::PaymentIntent::UpdateParams::MandateData) } + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentDetails)) } + attr_accessor :payment_details + # Attribute for param field payment_method + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment-method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(T.nilable(String)) } + attr_accessor :receipt_email + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + sig { returns(T.nilable(::Stripe::PaymentIntent::UpdateParams::Shipping)) } + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntent::UpdateParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, application_fee_amount: T.nilable(Integer), async_workflows: ::Stripe::PaymentIntent::UpdateParams::AsyncWorkflows, capture_method: String, currency: String, customer: String, description: String, expand: T::Array[String], mandate_data: ::Stripe::PaymentIntent::UpdateParams::MandateData, metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntent::UpdateParams::PaymentDetails), payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodData, payment_method_options: ::Stripe::PaymentIntent::UpdateParams::PaymentMethodOptions, payment_method_types: T::Array[String], receipt_email: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::PaymentIntent::UpdateParams::Shipping), statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::PaymentIntent::UpdateParams::TransferData, transfer_group: String).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + currency: nil, + customer: nil, + description: nil, + expand: nil, + mandate_data: nil, + metadata: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class ApplyCustomerBalanceParams < Stripe::RequestParams + # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. + # + # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. + # + # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(amount: Integer, currency: String, expand: T::Array[String]).void } + def initialize(amount: nil, currency: nil, expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + sig { returns(String) } + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(cancellation_reason: String, expand: T::Array[String]).void } + def initialize(cancellation_reason: nil, expand: nil); end + end + class CaptureParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { returns(::Stripe::PaymentIntent::CaptureParams::AsyncWorkflows::Inputs::Tax) } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntent::CaptureParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntent::CaptureParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { params(inputs: ::Stripe::PaymentIntent::CaptureParams::AsyncWorkflows::Inputs).void } + def initialize(inputs: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntent::CaptureParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. + sig { returns(Integer) } + attr_accessor :amount_to_capture + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntent::CaptureParams::AsyncWorkflows) } + attr_accessor :async_workflows + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + sig { returns(T::Boolean) } + attr_accessor :final_capture + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { returns(T.nilable(::Stripe::PaymentIntent::CaptureParams::PaymentDetails)) } + attr_accessor :payment_details + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a transfer after the payment + # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntent::CaptureParams::TransferData) } + attr_accessor :transfer_data + sig { + params(amount_to_capture: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntent::CaptureParams::AsyncWorkflows, expand: T::Array[String], final_capture: T::Boolean, metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntent::CaptureParams::PaymentDetails), statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::PaymentIntent::CaptureParams::TransferData).void + } + def initialize( + amount_to_capture: nil, + application_fee_amount: nil, + async_workflows: nil, + expand: nil, + final_capture: nil, + metadata: nil, + payment_details: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ); end + end + class ConfirmParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { returns(::Stripe::PaymentIntent::ConfirmParams::AsyncWorkflows::Inputs::Tax) } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntent::ConfirmParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntent::ConfirmParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { params(inputs: ::Stripe::PaymentIntent::ConfirmParams::AsyncWorkflows::Inputs).void } + def initialize(inputs: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance) } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::PaymentIntent::ConfirmParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntent::ConfirmParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Rechnung::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::BillingDetails, blik: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Blik, boleto: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Boleto, cashapp: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Eps, fpx: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Fpx, giropay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Giropay, gopay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Gopay, grabpay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Ideal, interac_present: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Klarna, konbini: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Konbini, kr_card: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::KrCard, link: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Link, mb_way: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Oxxo, p24: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::P24, payco: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payco, paynow: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paynow, paypal: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Paypal, payto: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Payto, pix: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Pix, promptpay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Promptpay, qris: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Qris, radar_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Sofort, swish: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Swish, twint: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::WechatPay, zip: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + sig { returns(String) } + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(code: String, setup_future_usage: T.nilable(String)).void } + def initialize(code: nil, setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: T.nilable(String)).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Please pass in an address that is within your Stripe user account country + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::StatementDetails::Address) + } + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::StatementDetails::Address, phone: String).void + } + def initialize(address: nil, phone: nil); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + sig { returns(String) } + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, exemption_indicator: String, network_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + sig { returns(String) } + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + sig { returns(T::Boolean) } + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::StatementDetails)) + } + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(capture_method: T.nilable(String), cvc_token: String, installments: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::Installments, mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_partial_authorization: String, request_three_d_secure: String, require_cvc_recollection: T::Boolean, setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String), statement_details: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::StatementDetails), three_d_secure: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + sig { returns(String) } + attr_accessor :requested_priority + sig { params(requested_priority: String).void } + def initialize(requested_priority: nil); end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + sig { returns(T::Boolean) } + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + sig { returns(T::Boolean) } + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent::Routing) + } + attr_accessor :routing + sig { + params(request_extended_authorization: T::Boolean, request_incremental_authorization_support: T::Boolean, routing: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent::Routing).void + } + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + sig { returns(Integer) } + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + sig { returns(T.nilable(String)) } + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(confirmation_number: T.nilable(String), expires_after_days: T.nilable(Integer), expires_at: T.nilable(Integer), product_description: T.nilable(String), setup_future_usage: String).void + } + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end + end + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: T.nilable(String), setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ); end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after_seconds: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end + end + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Rechnung < Stripe::RequestParams + + end + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + sig { returns(T.nilable(String)) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(reference: T.nilable(String), setup_future_usage: String).void } + def initialize(reference: nil, setup_future_usage: nil); end + end + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Preferred transaction settlement speed + sig { returns(T.nilable(String)) } + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Affirm)) + } + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alma)) + } + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AmazonPay)) + } + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AuBecsDebit)) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit)) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Blik)) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Boleto)) + } + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp)) + } + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Eps)) + } + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Fpx)) + } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Giropay)) + } + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Gopay)) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Grabpay)) + } + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::InteracPresent)) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KakaoPay)) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KrCard)) + } + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::MbWay)) + } + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Mobilepay)) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Multibanco)) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NaverPay)) + } + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::P24)) + } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payco)) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paynow)) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payto)) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Pix)) + } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Promptpay)) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Qris)) + } + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Rechnung)) + } + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::RevolutPay)) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SamsungPay)) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Shopeepay)) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Swish)) + } + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Twint)) + } + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Zip)) + } + attr_accessor :zip + sig { + params(acss_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alipay), alma: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Bancontact), blik: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Blik), boleto: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CardPresent), cashapp: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Giropay), gopay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Gopay), grabpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Grabpay), id_bank_transfer: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::IdBankTransfer), ideal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Ideal), interac_present: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Link), mb_way: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::MbWay), mobilepay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::P24), payco: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Paypal), payto: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Payto), pix: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Pix), promptpay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Promptpay), qris: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Qris), rechnung: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Rechnung), revolut_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::SepaDebit), shopeepay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Shopeepay), sofort: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Swish), twint: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Twint), us_bank_account: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::WechatPay), zip: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions::Zip)).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::PaymentIntent::ConfirmParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntent::ConfirmParams::AsyncWorkflows) } + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + sig { returns(T::Boolean) } + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the mandate that's used for this payment. + sig { returns(String) } + attr_accessor :mandate + # Attribute for param field mandate_data + sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData)) } + attr_accessor :mandate_data + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + sig { returns(T.any(T::Boolean, String)) } + attr_accessor :off_session + # Provides industry-specific information about the charge. + sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails)) } + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + sig { returns(String) } + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + sig { returns(::Stripe::PaymentIntent::ConfirmParams::RadarOptions) } + attr_accessor :radar_options + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(T.nilable(String)) } + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + sig { returns(String) } + attr_accessor :return_url + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + sig { returns(T.nilable(::Stripe::PaymentIntent::ConfirmParams::Shipping)) } + attr_accessor :shipping + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(application_fee_amount: T.nilable(Integer), async_workflows: ::Stripe::PaymentIntent::ConfirmParams::AsyncWorkflows, capture_method: String, confirmation_token: String, error_on_requires_action: T::Boolean, expand: T::Array[String], mandate: String, mandate_data: T.nilable(::Stripe::PaymentIntent::ConfirmParams::MandateData), off_session: T.any(T::Boolean, String), payment_details: T.nilable(::Stripe::PaymentIntent::ConfirmParams::PaymentDetails), payment_method: String, payment_method_data: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodData, payment_method_options: ::Stripe::PaymentIntent::ConfirmParams::PaymentMethodOptions, payment_method_types: T::Array[String], radar_options: ::Stripe::PaymentIntent::ConfirmParams::RadarOptions, receipt_email: T.nilable(String), return_url: String, setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::PaymentIntent::ConfirmParams::Shipping), use_stripe_sdk: T::Boolean).void + } + def initialize( + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + confirmation_token: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + off_session: nil, + payment_details: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil, + use_stripe_sdk: nil + ); end + end + class DecrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { + returns(::Stripe::PaymentIntent::DecrementAuthorizationParams::AsyncWorkflows::Inputs::Tax) + } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntent::DecrementAuthorizationParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { + returns(::Stripe::PaymentIntent::DecrementAuthorizationParams::AsyncWorkflows::Inputs) + } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntent::DecrementAuthorizationParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntent::DecrementAuthorizationParams::AsyncWorkflows) } + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntent::DecrementAuthorizationParams::TransferData) } + attr_accessor :transfer_data + sig { + params(amount: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntent::DecrementAuthorizationParams::AsyncWorkflows, description: String, expand: T::Array[String], metadata: T::Hash[String, String], transfer_data: ::Stripe::PaymentIntent::DecrementAuthorizationParams::TransferData).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + transfer_data: nil + ); end + end + class IncrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { + returns(::Stripe::PaymentIntent::IncrementAuthorizationParams::AsyncWorkflows::Inputs::Tax) + } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntent::IncrementAuthorizationParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { + returns(::Stripe::PaymentIntent::IncrementAuthorizationParams::AsyncWorkflows::Inputs) + } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntent::IncrementAuthorizationParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + sig { params(request_partial_authorization: String).void } + def initialize(request_partial_authorization: nil); end + end + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions::Card) + } + attr_accessor :card + sig { + params(card: ::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions::Card).void + } + def initialize(card: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntent::IncrementAuthorizationParams::AsyncWorkflows) } + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Payment method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData) } + attr_accessor :transfer_data + sig { + params(amount: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntent::IncrementAuthorizationParams::AsyncWorkflows, description: String, expand: T::Array[String], metadata: T::Hash[String, String], payment_method_options: ::Stripe::PaymentIntent::IncrementAuthorizationParams::PaymentMethodOptions, statement_descriptor: String, transfer_data: ::Stripe::PaymentIntent::IncrementAuthorizationParams::TransferData).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + payment_method_options: nil, + statement_descriptor: nil, + transfer_data: nil + ); end + end + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + sig { returns(T::Array[Integer]) } + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + sig { returns(String) } + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(amounts: T::Array[Integer], descriptor_code: String, expand: T::Array[String]).void + } + def initialize(amounts: nil, descriptor_code: nil, expand: nil); end + end + class TriggerActionParams < Stripe::RequestParams + class ScanQrCode < Stripe::RequestParams + # Whether the QR Code scan's payment should succeed or fail. + sig { returns(String) } + attr_accessor :result + sig { params(result: String).void } + def initialize(result: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # True to simulate success, false to simulate failure. + sig { returns(::Stripe::PaymentIntent::TriggerActionParams::ScanQrCode) } + attr_accessor :scan_qr_code + # The type of action to be simulated. + sig { returns(String) } + attr_accessor :type + sig { + params(expand: T::Array[String], scan_qr_code: ::Stripe::PaymentIntent::TriggerActionParams::ScanQrCode, type: String).void + } + def initialize(expand: nil, scan_qr_code: nil, type: nil); end + end + # Manually reconcile the remaining amount for a customer_balance PaymentIntent. + sig { + params(params: T.any(::Stripe::PaymentIntent::ApplyCustomerBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def apply_customer_balance(params = {}, opts = {}); end + + # Manually reconcile the remaining amount for a customer_balance PaymentIntent. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::ApplyCustomerBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.apply_customer_balance(intent, params = {}, opts = {}); end + + # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing. + # + # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded. + # + # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { + params(params: T.any(::Stripe::PaymentIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def cancel(params = {}, opts = {}); end + + # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing. + # + # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded. + # + # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.cancel(intent, params = {}, opts = {}); end + + # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. + # + # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. + # + # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later). + sig { + params(params: T.any(::Stripe::PaymentIntent::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def capture(params = {}, opts = {}); end + + # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. + # + # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. + # + # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later). + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.capture(intent, params = {}, opts = {}); end + + # Confirm that your customer intends to pay with current or provided + # payment method. Upon confirmation, the PaymentIntent will attempt to initiate + # a payment. + # If the selected payment method requires additional authentication steps, the + # PaymentIntent will transition to the requires_action status and + # suggest additional actions via next_action. If payment fails, + # the PaymentIntent transitions to the requires_payment_method status or the + # canceled status if the confirmation limit is reached. If + # payment succeeds, the PaymentIntent will transition to the succeeded + # status (or requires_capture, if capture_method is set to manual). + # If the confirmation_method is automatic, payment may be attempted + # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment) + # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret). + # After next_actions are handled by the client, no additional + # confirmation is required to complete the payment. + # If the confirmation_method is manual, all payment attempts must be + # initiated using a secret key. + # If any actions are required for the payment, the PaymentIntent will + # return to the requires_confirmation state + # after those actions are completed. Your server needs to then + # explicitly re-confirm the PaymentIntent to initiate the next payment + # attempt. + # There is a variable upper limit on how many times a PaymentIntent can be confirmed. + # After this limit is reached, any further calls to this endpoint will + # transition the PaymentIntent to the canceled state. + sig { + params(params: T.any(::Stripe::PaymentIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def confirm(params = {}, opts = {}); end + + # Confirm that your customer intends to pay with current or provided + # payment method. Upon confirmation, the PaymentIntent will attempt to initiate + # a payment. + # If the selected payment method requires additional authentication steps, the + # PaymentIntent will transition to the requires_action status and + # suggest additional actions via next_action. If payment fails, + # the PaymentIntent transitions to the requires_payment_method status or the + # canceled status if the confirmation limit is reached. If + # payment succeeds, the PaymentIntent will transition to the succeeded + # status (or requires_capture, if capture_method is set to manual). + # If the confirmation_method is automatic, payment may be attempted + # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment) + # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret). + # After next_actions are handled by the client, no additional + # confirmation is required to complete the payment. + # If the confirmation_method is manual, all payment attempts must be + # initiated using a secret key. + # If any actions are required for the payment, the PaymentIntent will + # return to the requires_confirmation state + # after those actions are completed. Your server needs to then + # explicitly re-confirm the PaymentIntent to initiate the next payment + # attempt. + # There is a variable upper limit on how many times a PaymentIntent can be confirmed. + # After this limit is reached, any further calls to this endpoint will + # transition the PaymentIntent to the canceled state. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.confirm(intent, params = {}, opts = {}); end + + # Creates a PaymentIntent object. + # + # After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm) + # to continue the payment. Learn more about the available payment flows + # with the Payment Intents API. + # + # When you use confirm=true during creation, it's equivalent to creating + # and confirming the PaymentIntent in the same call. You can use any parameters + # available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply + # confirm=true. + sig { + params(params: T.any(::Stripe::PaymentIntent::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.create(params = {}, opts = {}); end + + # Perform a decremental authorization on an eligible + # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the + # PaymentIntent's status must be requires_capture and + # [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization) + # must be available. + # + # Decremental authorizations decrease the authorized amount on your customer's card + # to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount. + # + # After decrement, the PaymentIntent object + # returns with the updated + # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). + # The PaymentIntent will now be capturable up to the new authorized amount. + # + # Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines. + # After it's fully captured, a PaymentIntent can no longer be decremented. + sig { + params(params: T.any(::Stripe::PaymentIntent::DecrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def decrement_authorization(params = {}, opts = {}); end + + # Perform a decremental authorization on an eligible + # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the + # PaymentIntent's status must be requires_capture and + # [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization) + # must be available. + # + # Decremental authorizations decrease the authorized amount on your customer's card + # to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount. + # + # After decrement, the PaymentIntent object + # returns with the updated + # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). + # The PaymentIntent will now be capturable up to the new authorized amount. + # + # Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines. + # After it's fully captured, a PaymentIntent can no longer be decremented. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::DecrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.decrement_authorization(intent, params = {}, opts = {}); end + + # Perform an incremental authorization on an eligible + # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the + # PaymentIntent's status must be requires_capture and + # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + # must be true. + # + # Incremental authorizations attempt to increase the authorized amount on + # your customer's card to the new, higher amount provided. Similar to the + # initial authorization, incremental authorizations can be declined. A + # single PaymentIntent can call this endpoint multiple times to further + # increase the authorized amount. + # + # If the incremental authorization succeeds, the PaymentIntent object + # returns with the updated + # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). + # If the incremental authorization fails, a + # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other + # fields on the PaymentIntent or Charge update. The PaymentIntent + # object remains capturable for the previously authorized amount. + # + # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + # After it's captured, a PaymentIntent can no longer be incremented. + # + # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations). + sig { + params(params: T.any(::Stripe::PaymentIntent::IncrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def increment_authorization(params = {}, opts = {}); end + + # Perform an incremental authorization on an eligible + # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the + # PaymentIntent's status must be requires_capture and + # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + # must be true. + # + # Incremental authorizations attempt to increase the authorized amount on + # your customer's card to the new, higher amount provided. Similar to the + # initial authorization, incremental authorizations can be declined. A + # single PaymentIntent can call this endpoint multiple times to further + # increase the authorized amount. + # + # If the incremental authorization succeeds, the PaymentIntent object + # returns with the updated + # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). + # If the incremental authorization fails, a + # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other + # fields on the PaymentIntent or Charge update. The PaymentIntent + # object remains capturable for the previously authorized amount. + # + # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + # After it's captured, a PaymentIntent can no longer be incremented. + # + # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations). + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::IncrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.increment_authorization(intent, params = {}, opts = {}); end + + # Returns a list of PaymentIntents. + sig { + params(params: T.any(::Stripe::PaymentIntent::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Trigger an external action on a PaymentIntent. + sig { + params(params: T.any(::Stripe::PaymentIntent::TriggerActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def trigger_action(params = {}, opts = {}); end + + # Trigger an external action on a PaymentIntent. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::TriggerActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.trigger_action(intent, params = {}, opts = {}); end + + # Updates properties on a PaymentIntent object without confirming. + # + # Depending on which properties you update, you might need to confirm the + # PaymentIntent again. For example, updating the payment_method + # always requires you to confirm the PaymentIntent again. If you prefer to + # update and confirm at the same time, we recommend updating properties through + # the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead. + sig { + params(id: String, params: T.any(::Stripe::PaymentIntent::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.update(id, params = {}, opts = {}); end + + # Verifies microdeposits on a PaymentIntent object. + sig { + params(params: T.any(::Stripe::PaymentIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def verify_microdeposits(params = {}, opts = {}); end + + # Verifies microdeposits on a PaymentIntent object. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def self.verify_microdeposits(intent, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_link.rbi b/rbi/stripe/resources/payment_link.rbi index 2b51a69b1..11f3067cb 100644 --- a/rbi/stripe/resources/payment_link.rbi +++ b/rbi/stripe/resources/payment_link.rbi @@ -11,332 +11,1643 @@ module Stripe class PaymentLink < APIResource class AfterCompletion < Stripe::StripeObject class HostedConfirmation < Stripe::StripeObject + # The custom message that is displayed to the customer after the purchase is complete. sig { returns(T.nilable(String)) } attr_reader :custom_message end class Redirect < Stripe::StripeObject + # The URL the customer will be redirected to after the purchase is complete. sig { returns(String) } attr_reader :url end + # Attribute for field hosted_confirmation sig { returns(HostedConfirmation) } attr_reader :hosted_confirmation + # Attribute for field redirect sig { returns(Redirect) } attr_reader :redirect + # The specified behavior after the purchase is complete. sig { returns(String) } attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If `true`, tax will be calculated automatically using the customer's location. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class ConsentCollection < Stripe::StripeObject class PaymentMethodReuseAgreement < Stripe::StripeObject + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's defaults will be used. + # + # When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. sig { returns(String) } attr_reader :position end + # Settings related to the payment method reuse text shown in the Checkout UI. sig { returns(T.nilable(PaymentMethodReuseAgreement)) } attr_reader :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. sig { returns(T.nilable(String)) } attr_reader :promotions + # If set to `required`, it requires cutomers to accept the terms of service before being able to pay. If set to `none`, customers won't be shown a checkbox to accept the terms of service. sig { returns(T.nilable(String)) } attr_reader :terms_of_service end class CustomField < Stripe::StripeObject class Dropdown < Stripe::StripeObject class Option < Stripe::StripeObject + # The label for the option, displayed to the customer. Up to 100 characters. sig { returns(String) } attr_reader :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. sig { returns(String) } attr_reader :value end + # The options available for the customer to select. Up to 200 options allowed. sig { returns(T::Array[Option]) } attr_reader :options end class Label < Stripe::StripeObject + # Custom text for the label, displayed to the customer. Up to 50 characters. sig { returns(T.nilable(String)) } attr_reader :custom + # The type of the label. sig { returns(String) } attr_reader :type end class Numeric < Stripe::StripeObject + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length end class Text < Stripe::StripeObject + # The maximum character length constraint for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :maximum_length + # The minimum character length requirement for the customer's input. sig { returns(T.nilable(Integer)) } attr_reader :minimum_length end + # Attribute for field dropdown sig { returns(Dropdown) } attr_reader :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. sig { returns(String) } attr_reader :key + # Attribute for field label sig { returns(Label) } attr_reader :label + # Attribute for field numeric sig { returns(Numeric) } attr_reader :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. sig { returns(T::Boolean) } attr_reader :optional + # Attribute for field text sig { returns(Text) } attr_reader :text + # The type of the field. sig { returns(String) } attr_reader :type end class CustomText < Stripe::StripeObject class AfterSubmit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class ShippingAddress < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class Submit < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end class TermsOfServiceAcceptance < Stripe::StripeObject + # Text may be up to 1200 characters in length. sig { returns(String) } attr_reader :message end + # Custom text that should be displayed after the payment confirmation button. sig { returns(T.nilable(AfterSubmit)) } attr_reader :after_submit + # Custom text that should be displayed alongside shipping address collection. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. sig { returns(T.nilable(Submit)) } attr_reader :submit + # Custom text that should be displayed in place of the default terms of service agreement text. sig { returns(T.nilable(TermsOfServiceAcceptance)) } attr_reader :terms_of_service_acceptance end class InvoiceCreation < Stripe::StripeObject class InvoiceData < Stripe::StripeObject class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class RenderingOptions < Stripe::StripeObject + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display end + # The account tax IDs associated with the invoice. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # A list of up to 4 custom fields to be displayed on the invoice. sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Footer to be displayed on the invoice. sig { returns(T.nilable(String)) } attr_reader :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # Options for invoice PDF rendering. sig { returns(T.nilable(RenderingOptions)) } attr_reader :rendering_options end + # Enable creating an invoice on successful payment. sig { returns(T::Boolean) } attr_reader :enabled + # Configuration for the invoice. Default invoice values will be used if unspecified. sig { returns(T.nilable(InvoiceData)) } attr_reader :invoice_data end class PaymentIntentData < Stripe::StripeObject + # Indicates when the funds will be captured from the customer's account. sig { returns(T.nilable(String)) } attr_reader :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # Indicates that you intend to make future payments with the payment method collected during checkout. sig { returns(T.nilable(String)) } attr_reader :setup_future_usage + # For a non-card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # For a card payment, information about the charge that appears on the customer's statement when this payment succeeds in creating a charge. Concatenated with the account's statement descriptor prefix to form the complete statement descriptor. sig { returns(T.nilable(String)) } attr_reader :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. sig { returns(T.nilable(String)) } attr_reader :transfer_group end class PhoneNumberCollection < Stripe::StripeObject + # If `true`, a phone number will be collected during checkout. sig { returns(T::Boolean) } attr_reader :enabled end class Restrictions < Stripe::StripeObject class CompletedSessions < Stripe::StripeObject + # The current number of checkout sessions that have been completed on the payment link which count towards the `completed_sessions` restriction to be met. sig { returns(Integer) } attr_reader :count + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. sig { returns(Integer) } attr_reader :limit end + # Attribute for field completed_sessions sig { returns(CompletedSessions) } attr_reader :completed_sessions end class ShippingAddressCollection < Stripe::StripeObject + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for shipping locations. Unsupported country codes: `AS, CX, CC, CU, HM, IR, KP, MH, FM, NF, MP, PW, SD, SY, UM, VI`. sig { returns(T::Array[String]) } attr_reader :allowed_countries end class ShippingOption < Stripe::StripeObject + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :shipping_amount + # The ID of the Shipping Rate to use for this shipping option. sig { returns(T.any(String, Stripe::ShippingRate)) } attr_reader :shipping_rate end class SubscriptionData < Stripe::StripeObject class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. sig { returns(String) } attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. sig { returns(EndBehavior) } attr_reader :end_behavior end + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days + # Settings related to subscription trials. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class TaxIdCollection < Stripe::StripeObject + # Indicates whether tax ID collection is enabled for the session. sig { returns(T::Boolean) } attr_reader :enabled + # Attribute for field required sig { returns(String) } attr_reader :required end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The connected account receiving the transfer. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T::Boolean) } # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(AfterCompletion) } # Attribute for field after_completion + sig { returns(AfterCompletion) } attr_reader :after_completion - sig { returns(T::Boolean) } # Whether user redeemable promotion codes are enabled. + sig { returns(T::Boolean) } attr_reader :allow_promotion_codes - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # The ID of the Connect application that created the Payment Link. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(T.nilable(Float)) } # This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(String) } # Configuration for collecting the customer's billing address. Defaults to `auto`. + sig { returns(String) } attr_reader :billing_address_collection - sig { returns(T.nilable(ConsentCollection)) } # When set, provides configuration to gather active consent from customers. + sig { returns(T.nilable(ConsentCollection)) } attr_reader :consent_collection - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T::Array[CustomField]) } # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[CustomField]) } attr_reader :custom_fields - sig { returns(CustomText) } # Attribute for field custom_text + sig { returns(CustomText) } attr_reader :custom_text - sig { returns(String) } # Configuration for Customer creation during checkout. - attr_reader :customer_creation sig { returns(String) } + attr_reader :customer_creation # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The custom message to be displayed to a customer when a payment link is no longer active. + sig { returns(T.nilable(String)) } attr_reader :inactive_message - sig { returns(T.nilable(InvoiceCreation)) } # Configuration for creating invoice for payment mode payment links. + sig { returns(T.nilable(InvoiceCreation)) } attr_reader :invoice_creation - sig { returns(Stripe::ListObject) } # The line items representing what is being sold. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(PaymentIntentData)) } # Indicates the parameters to be passed to PaymentIntent creation during checkout. + sig { returns(T.nilable(PaymentIntentData)) } attr_reader :payment_intent_data - sig { returns(String) } # Configuration for collecting a payment method during checkout. Defaults to `always`. + sig { returns(String) } attr_reader :payment_method_collection - sig { returns(T.nilable(T::Array[String])) } # The list of payment method types that customers can use. When `null`, Stripe will dynamically show relevant payment methods you've enabled in your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types - sig { returns(PhoneNumberCollection) } # Attribute for field phone_number_collection + sig { returns(PhoneNumberCollection) } attr_reader :phone_number_collection - sig { returns(T.nilable(Restrictions)) } # Settings that restrict the usage of a payment link. + sig { returns(T.nilable(Restrictions)) } attr_reader :restrictions - sig { returns(T.nilable(ShippingAddressCollection)) } # Configuration for collecting the customer's shipping address. + sig { returns(T.nilable(ShippingAddressCollection)) } attr_reader :shipping_address_collection - sig { returns(T::Array[ShippingOption]) } # The shipping rate options applied to the session. + sig { returns(T::Array[ShippingOption]) } attr_reader :shipping_options - sig { returns(String) } # Indicates the type of transaction being performed which customizes relevant text on the page, such as the submit button. + sig { returns(String) } attr_reader :submit_type - sig { returns(T.nilable(SubscriptionData)) } # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + sig { returns(T.nilable(SubscriptionData)) } attr_reader :subscription_data - sig { returns(TaxIdCollection) } # Attribute for field tax_id_collection + sig { returns(TaxIdCollection) } attr_reader :tax_id_collection - sig { returns(T.nilable(TransferData)) } # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(String) } # The public URL that can be shared with customers. + sig { returns(String) } attr_reader :url + class ListParams < Stripe::RequestParams + # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + sig { returns(T::Boolean) } + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + sig { returns(String) } + attr_accessor :custom_message + sig { params(custom_message: String).void } + def initialize(custom_message: nil); end + end + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + sig { returns(String) } + attr_accessor :url + sig { params(url: String).void } + def initialize(url: nil); end + end + # Configuration when `type=hosted_confirmation`. + sig { returns(::Stripe::PaymentLink::CreateParams::AfterCompletion::HostedConfirmation) } + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + sig { returns(::Stripe::PaymentLink::CreateParams::AfterCompletion::Redirect) } + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + sig { returns(String) } + attr_accessor :type + sig { + params(hosted_confirmation: ::Stripe::PaymentLink::CreateParams::AfterCompletion::HostedConfirmation, redirect: ::Stripe::PaymentLink::CreateParams::AfterCompletion::Redirect, type: String).void + } + def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::PaymentLink::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::PaymentLink::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + sig { returns(String) } + attr_accessor :position + sig { params(position: String).void } + def initialize(position: nil); end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + sig { + returns(::Stripe::PaymentLink::CreateParams::ConsentCollection::PaymentMethodReuseAgreement) + } + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + sig { returns(String) } + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + sig { returns(String) } + attr_accessor :terms_of_service + sig { + params(payment_method_reuse_agreement: ::Stripe::PaymentLink::CreateParams::ConsentCollection::PaymentMethodReuseAgreement, promotions: String, terms_of_service: String).void + } + def initialize( + payment_method_reuse_agreement: nil, + promotions: nil, + terms_of_service: nil + ); end + end + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + sig { returns(String) } + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + sig { returns(String) } + attr_accessor :value + sig { params(label: String, value: String).void } + def initialize(label: nil, value: nil); end + end + # The options available for the customer to select. Up to 200 options allowed. + sig { + returns(T::Array[::Stripe::PaymentLink::CreateParams::CustomField::Dropdown::Option]) + } + attr_accessor :options + sig { + params(options: T::Array[::Stripe::PaymentLink::CreateParams::CustomField::Dropdown::Option]).void + } + def initialize(options: nil); end + end + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + sig { returns(String) } + attr_accessor :custom + # The type of the label. + sig { returns(String) } + attr_accessor :type + sig { params(custom: String, type: String).void } + def initialize(custom: nil, type: nil); end + end + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + # Configuration for `type=dropdown` fields. + sig { returns(::Stripe::PaymentLink::CreateParams::CustomField::Dropdown) } + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + sig { returns(String) } + attr_accessor :key + # The label for the field, displayed to the customer. + sig { returns(::Stripe::PaymentLink::CreateParams::CustomField::Label) } + attr_accessor :label + # Configuration for `type=numeric` fields. + sig { returns(::Stripe::PaymentLink::CreateParams::CustomField::Numeric) } + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :optional + # Configuration for `type=text` fields. + sig { returns(::Stripe::PaymentLink::CreateParams::CustomField::Text) } + attr_accessor :text + # The type of the field. + sig { returns(String) } + attr_accessor :type + sig { + params(dropdown: ::Stripe::PaymentLink::CreateParams::CustomField::Dropdown, key: String, label: ::Stripe::PaymentLink::CreateParams::CustomField::Label, numeric: ::Stripe::PaymentLink::CreateParams::CustomField::Numeric, optional: T::Boolean, text: ::Stripe::PaymentLink::CreateParams::CustomField::Text, type: String).void + } + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ); end + end + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + # Custom text that should be displayed after the payment confirmation button. + sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::AfterSubmit)) } + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::ShippingAddress)) } + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + sig { returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::Submit)) } + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + sig { + returns(T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::TermsOfServiceAcceptance)) + } + attr_accessor :terms_of_service_acceptance + sig { + params(after_submit: T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::AfterSubmit), shipping_address: T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::ShippingAddress), submit: T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::Submit), terms_of_service_acceptance: T.nilable(::Stripe::PaymentLink::CreateParams::CustomText::TermsOfServiceAcceptance)).void + } + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ); end + end + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + sig { params(amount_tax_display: T.nilable(String)).void } + def initialize(amount_tax_display: nil); end + end + # The account tax IDs associated with the invoice. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + sig { + returns(T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::CustomField])) + } + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::Issuer) } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(account_tax_ids: T.nilable(T::Array[String]), custom_fields: T.nilable(T::Array[::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::CustomField]), description: String, footer: String, issuer: ::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::Issuer, metadata: T.nilable(T::Hash[String, String]), rendering_options: T.nilable(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)).void + } + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ); end + end + # Whether the feature is enabled + sig { returns(T::Boolean) } + attr_accessor :enabled + # Invoice PDF configuration. + sig { returns(::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData) } + attr_accessor :invoice_data + sig { + params(enabled: T::Boolean, invoice_data: ::Stripe::PaymentLink::CreateParams::InvoiceCreation::InvoiceData).void + } + def initialize(enabled: nil, invoice_data: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + sig { returns(::Stripe::PaymentLink::CreateParams::LineItem::AdjustableQuantity) } + attr_accessor :adjustable_quantity + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + sig { returns(String) } + attr_accessor :price + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + sig { + params(adjustable_quantity: ::Stripe::PaymentLink::CreateParams::LineItem::AdjustableQuantity, price: String, quantity: Integer).void + } + def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end + end + class PaymentIntentData < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + # + # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + sig { returns(String) } + attr_accessor :setup_future_usage + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(capture_method: String, description: String, metadata: T::Hash[String, String], setup_future_usage: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_group: String).void + } + def initialize( + capture_method: nil, + description: nil, + metadata: nil, + setup_future_usage: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ); end + end + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + sig { returns(Integer) } + attr_accessor :limit + sig { params(limit: Integer).void } + def initialize(limit: nil); end + end + # Configuration for the `completed_sessions` restriction type. + sig { returns(::Stripe::PaymentLink::CreateParams::Restrictions::CompletedSessions) } + attr_accessor :completed_sessions + sig { + params(completed_sessions: ::Stripe::PaymentLink::CreateParams::Restrictions::CompletedSessions).void + } + def initialize(completed_sessions: nil); end + end + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + sig { returns(T::Array[String]) } + attr_accessor :allowed_countries + sig { params(allowed_countries: T::Array[String]).void } + def initialize(allowed_countries: nil); end + end + class ShippingOption < Stripe::RequestParams + # The ID of the Shipping Rate to use for this shipping option. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(issuer: ::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings::Issuer).void + } + def initialize(issuer: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { + returns(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings) } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + sig { returns(Integer) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { returns(::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings) } + attr_accessor :trial_settings + sig { + params(description: String, invoice_settings: ::Stripe::PaymentLink::CreateParams::SubscriptionData::InvoiceSettings, metadata: T::Hash[String, String], trial_period_days: Integer, trial_settings: ::Stripe::PaymentLink::CreateParams::SubscriptionData::TrialSettings).void + } + def initialize( + description: nil, + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + sig { returns(String) } + attr_accessor :required + sig { params(enabled: T::Boolean, required: String).void } + def initialize(enabled: nil, required: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # Behavior after the purchase is complete. + sig { returns(::Stripe::PaymentLink::CreateParams::AfterCompletion) } + attr_accessor :after_completion + # Enables user redeemable promotion codes. + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. + sig { returns(Integer) } + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + sig { returns(Float) } + attr_accessor :application_fee_percent + # Configuration for automatic tax collection. + sig { returns(::Stripe::PaymentLink::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + sig { returns(String) } + attr_accessor :billing_address_collection + # Configure fields to gather active consent from customers. + sig { returns(::Stripe::PaymentLink::CreateParams::ConsentCollection) } + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. + sig { returns(String) } + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[::Stripe::PaymentLink::CreateParams::CustomField]) } + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + sig { returns(::Stripe::PaymentLink::CreateParams::CustomText) } + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + sig { returns(String) } + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + sig { returns(String) } + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + sig { returns(::Stripe::PaymentLink::CreateParams::InvoiceCreation) } + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + sig { returns(T::Array[::Stripe::PaymentLink::CreateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge. + sig { returns(String) } + attr_accessor :on_behalf_of + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + sig { returns(::Stripe::PaymentLink::CreateParams::PaymentIntentData) } + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + sig { returns(String) } + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Controls phone number collection settings during checkout. + # + # We recommend that you review your privacy policy and check with your legal contacts. + sig { returns(::Stripe::PaymentLink::CreateParams::PhoneNumberCollection) } + attr_accessor :phone_number_collection + # Settings that restrict the usage of a payment link. + sig { returns(::Stripe::PaymentLink::CreateParams::Restrictions) } + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + sig { returns(::Stripe::PaymentLink::CreateParams::ShippingAddressCollection) } + attr_accessor :shipping_address_collection + # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + sig { returns(T::Array[::Stripe::PaymentLink::CreateParams::ShippingOption]) } + attr_accessor :shipping_options + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + sig { returns(String) } + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + sig { returns(::Stripe::PaymentLink::CreateParams::SubscriptionData) } + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + sig { returns(::Stripe::PaymentLink::CreateParams::TaxIdCollection) } + attr_accessor :tax_id_collection + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + sig { returns(::Stripe::PaymentLink::CreateParams::TransferData) } + attr_accessor :transfer_data + sig { + params(after_completion: ::Stripe::PaymentLink::CreateParams::AfterCompletion, allow_promotion_codes: T::Boolean, application_fee_amount: Integer, application_fee_percent: Float, automatic_tax: ::Stripe::PaymentLink::CreateParams::AutomaticTax, billing_address_collection: String, consent_collection: ::Stripe::PaymentLink::CreateParams::ConsentCollection, currency: String, custom_fields: T::Array[::Stripe::PaymentLink::CreateParams::CustomField], custom_text: ::Stripe::PaymentLink::CreateParams::CustomText, customer_creation: String, expand: T::Array[String], inactive_message: String, invoice_creation: ::Stripe::PaymentLink::CreateParams::InvoiceCreation, line_items: T::Array[::Stripe::PaymentLink::CreateParams::LineItem], metadata: T::Hash[String, String], on_behalf_of: String, payment_intent_data: ::Stripe::PaymentLink::CreateParams::PaymentIntentData, payment_method_collection: String, payment_method_types: T::Array[String], phone_number_collection: ::Stripe::PaymentLink::CreateParams::PhoneNumberCollection, restrictions: ::Stripe::PaymentLink::CreateParams::Restrictions, shipping_address_collection: ::Stripe::PaymentLink::CreateParams::ShippingAddressCollection, shipping_options: T::Array[::Stripe::PaymentLink::CreateParams::ShippingOption], submit_type: String, subscription_data: ::Stripe::PaymentLink::CreateParams::SubscriptionData, tax_id_collection: ::Stripe::PaymentLink::CreateParams::TaxIdCollection, transfer_data: ::Stripe::PaymentLink::CreateParams::TransferData).void + } + def initialize( + after_completion: nil, + allow_promotion_codes: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_address_collection: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + on_behalf_of: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + phone_number_collection: nil, + restrictions: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil, + transfer_data: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + sig { returns(String) } + attr_accessor :custom_message + sig { params(custom_message: String).void } + def initialize(custom_message: nil); end + end + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + sig { returns(String) } + attr_accessor :url + sig { params(url: String).void } + def initialize(url: nil); end + end + # Configuration when `type=hosted_confirmation`. + sig { returns(::Stripe::PaymentLink::UpdateParams::AfterCompletion::HostedConfirmation) } + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + sig { returns(::Stripe::PaymentLink::UpdateParams::AfterCompletion::Redirect) } + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + sig { returns(String) } + attr_accessor :type + sig { + params(hosted_confirmation: ::Stripe::PaymentLink::UpdateParams::AfterCompletion::HostedConfirmation, redirect: ::Stripe::PaymentLink::UpdateParams::AfterCompletion::Redirect, type: String).void + } + def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::PaymentLink::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::PaymentLink::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + sig { returns(String) } + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + sig { returns(String) } + attr_accessor :value + sig { params(label: String, value: String).void } + def initialize(label: nil, value: nil); end + end + # The options available for the customer to select. Up to 200 options allowed. + sig { + returns(T::Array[::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown::Option]) + } + attr_accessor :options + sig { + params(options: T::Array[::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown::Option]).void + } + def initialize(options: nil); end + end + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + sig { returns(String) } + attr_accessor :custom + # The type of the label. + sig { returns(String) } + attr_accessor :type + sig { params(custom: String, type: String).void } + def initialize(custom: nil, type: nil); end + end + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + # Configuration for `type=dropdown` fields. + sig { returns(::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown) } + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + sig { returns(String) } + attr_accessor :key + # The label for the field, displayed to the customer. + sig { returns(::Stripe::PaymentLink::UpdateParams::CustomField::Label) } + attr_accessor :label + # Configuration for `type=numeric` fields. + sig { returns(::Stripe::PaymentLink::UpdateParams::CustomField::Numeric) } + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :optional + # Configuration for `type=text` fields. + sig { returns(::Stripe::PaymentLink::UpdateParams::CustomField::Text) } + attr_accessor :text + # The type of the field. + sig { returns(String) } + attr_accessor :type + sig { + params(dropdown: ::Stripe::PaymentLink::UpdateParams::CustomField::Dropdown, key: String, label: ::Stripe::PaymentLink::UpdateParams::CustomField::Label, numeric: ::Stripe::PaymentLink::UpdateParams::CustomField::Numeric, optional: T::Boolean, text: ::Stripe::PaymentLink::UpdateParams::CustomField::Text, type: String).void + } + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ); end + end + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + # Custom text that should be displayed after the payment confirmation button. + sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::AfterSubmit)) } + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::ShippingAddress)) } + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::Submit)) } + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + sig { + returns(T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::TermsOfServiceAcceptance)) + } + attr_accessor :terms_of_service_acceptance + sig { + params(after_submit: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::AfterSubmit), shipping_address: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::ShippingAddress), submit: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::Submit), terms_of_service_acceptance: T.nilable(::Stripe::PaymentLink::UpdateParams::CustomText::TermsOfServiceAcceptance)).void + } + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ); end + end + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + sig { params(amount_tax_display: T.nilable(String)).void } + def initialize(amount_tax_display: nil); end + end + # The account tax IDs associated with the invoice. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + sig { + returns(T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::CustomField])) + } + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::Issuer) } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(account_tax_ids: T.nilable(T::Array[String]), custom_fields: T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::CustomField]), description: String, footer: String, issuer: ::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::Issuer, metadata: T.nilable(T::Hash[String, String]), rendering_options: T.nilable(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions)).void + } + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ); end + end + # Whether the feature is enabled + sig { returns(T::Boolean) } + attr_accessor :enabled + # Invoice PDF configuration. + sig { returns(::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData) } + attr_accessor :invoice_data + sig { + params(enabled: T::Boolean, invoice_data: ::Stripe::PaymentLink::UpdateParams::InvoiceCreation::InvoiceData).void + } + def initialize(enabled: nil, invoice_data: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + sig { returns(::Stripe::PaymentLink::UpdateParams::LineItem::AdjustableQuantity) } + attr_accessor :adjustable_quantity + # The ID of an existing line item on the payment link. + sig { returns(String) } + attr_accessor :id + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + sig { + params(adjustable_quantity: ::Stripe::PaymentLink::UpdateParams::LineItem::AdjustableQuantity, id: String, quantity: Integer).void + } + def initialize(adjustable_quantity: nil, id: nil, quantity: nil); end + end + class PaymentIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(T.nilable(String)) } + attr_accessor :transfer_group + sig { + params(description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_group: T.nilable(String)).void + } + def initialize( + description: nil, + metadata: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ); end + end + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + sig { returns(Integer) } + attr_accessor :limit + sig { params(limit: Integer).void } + def initialize(limit: nil); end + end + # Configuration for the `completed_sessions` restriction type. + sig { returns(::Stripe::PaymentLink::UpdateParams::Restrictions::CompletedSessions) } + attr_accessor :completed_sessions + sig { + params(completed_sessions: ::Stripe::PaymentLink::UpdateParams::Restrictions::CompletedSessions).void + } + def initialize(completed_sessions: nil); end + end + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + sig { returns(T::Array[String]) } + attr_accessor :allowed_countries + sig { params(allowed_countries: T::Array[String]).void } + def initialize(allowed_countries: nil); end + end + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(issuer: ::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings::Issuer).void + } + def initialize(issuer: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { + returns(::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings) } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { + returns(T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings)) + } + attr_accessor :trial_settings + sig { + params(invoice_settings: ::Stripe::PaymentLink::UpdateParams::SubscriptionData::InvoiceSettings, metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::PaymentLink::UpdateParams::SubscriptionData::TrialSettings)).void + } + def initialize( + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + sig { returns(String) } + attr_accessor :required + sig { params(enabled: T::Boolean, required: String).void } + def initialize(enabled: nil, required: nil); end + end + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + sig { returns(T::Boolean) } + attr_accessor :active + # Behavior after the purchase is complete. + sig { returns(::Stripe::PaymentLink::UpdateParams::AfterCompletion) } + attr_accessor :after_completion + # Enables user redeemable promotion codes. + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # Configuration for automatic tax collection. + sig { returns(::Stripe::PaymentLink::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + sig { returns(String) } + attr_accessor :billing_address_collection + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::CustomField])) } + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + sig { returns(::Stripe::PaymentLink::UpdateParams::CustomText) } + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + sig { returns(String) } + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + sig { returns(T.nilable(String)) } + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + sig { returns(::Stripe::PaymentLink::UpdateParams::InvoiceCreation) } + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + sig { returns(T::Array[::Stripe::PaymentLink::UpdateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + sig { returns(::Stripe::PaymentLink::UpdateParams::PaymentIntentData) } + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + sig { returns(String) } + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + # Settings that restrict the usage of a payment link. + sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::Restrictions)) } + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + sig { returns(T.nilable(::Stripe::PaymentLink::UpdateParams::ShippingAddressCollection)) } + attr_accessor :shipping_address_collection + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + sig { returns(String) } + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + sig { returns(::Stripe::PaymentLink::UpdateParams::SubscriptionData) } + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + sig { returns(::Stripe::PaymentLink::UpdateParams::TaxIdCollection) } + attr_accessor :tax_id_collection + sig { + params(active: T::Boolean, after_completion: ::Stripe::PaymentLink::UpdateParams::AfterCompletion, allow_promotion_codes: T::Boolean, automatic_tax: ::Stripe::PaymentLink::UpdateParams::AutomaticTax, billing_address_collection: String, custom_fields: T.nilable(T::Array[::Stripe::PaymentLink::UpdateParams::CustomField]), custom_text: ::Stripe::PaymentLink::UpdateParams::CustomText, customer_creation: String, expand: T::Array[String], inactive_message: T.nilable(String), invoice_creation: ::Stripe::PaymentLink::UpdateParams::InvoiceCreation, line_items: T::Array[::Stripe::PaymentLink::UpdateParams::LineItem], metadata: T::Hash[String, String], payment_intent_data: ::Stripe::PaymentLink::UpdateParams::PaymentIntentData, payment_method_collection: String, payment_method_types: T.nilable(T::Array[String]), restrictions: T.nilable(::Stripe::PaymentLink::UpdateParams::Restrictions), shipping_address_collection: T.nilable(::Stripe::PaymentLink::UpdateParams::ShippingAddressCollection), submit_type: String, subscription_data: ::Stripe::PaymentLink::UpdateParams::SubscriptionData, tax_id_collection: ::Stripe::PaymentLink::UpdateParams::TaxIdCollection).void + } + def initialize( + active: nil, + after_completion: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + restrictions: nil, + shipping_address_collection: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil + ); end + end + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Creates a payment link. + sig { + params(params: T.any(::Stripe::PaymentLink::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of your payment links. + sig { + params(params: T.any(::Stripe::PaymentLink::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::PaymentLink::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_line_items(params = {}, opts = {}); end + + # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(payment_link: String, params: T.any(::Stripe::PaymentLink::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_line_items(payment_link, params = {}, opts = {}); end + + # Updates a payment link. + sig { + params(id: String, params: T.any(::Stripe::PaymentLink::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method.rbi b/rbi/stripe/resources/payment_method.rbi index ca2e437d2..c87616950 100644 --- a/rbi/stripe/resources/payment_method.rbi +++ b/rbi/stripe/resources/payment_method.rbi @@ -10,14 +10,19 @@ module Stripe # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). class PaymentMethod < APIResource class AcssDebit < Stripe::StripeObject + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Institution number of the bank account. sig { returns(T.nilable(String)) } attr_reader :institution_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Transit number of the bank account. sig { returns(T.nilable(String)) } attr_reader :transit_number end @@ -27,57 +32,77 @@ module Stripe class Alma < Stripe::StripeObject; end class AmazonPay < Stripe::StripeObject; end class AuBecsDebit < Stripe::StripeObject + # Six-digit number identifying bank and branch associated with this bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 end class BacsDebit < Stripe::StripeObject + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Sort code of the bank account. (e.g., `10-20-30`) sig { returns(T.nilable(String)) } attr_reader :sort_code end class Bancontact < Stripe::StripeObject; end class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Billing address. sig { returns(T.nilable(Address)) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name + # Billing phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone end class Blik < Stripe::StripeObject; end class Boleto < Stripe::StripeObject + # Uniquely identifies the customer tax id (CNPJ or CPF) sig { returns(String) } attr_reader :tax_id end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end @@ -85,105 +110,152 @@ module Stripe class PaymentMethodDetails < Stripe::StripeObject class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Receipt < Stripe::StripeObject + # The type of account being debited or credited sig { returns(String) } attr_reader :account_type + # EMV tag 9F26, cryptogram generated by the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :application_cryptogram + # Mnenomic of the Application Identifier. sig { returns(T.nilable(String)) } attr_reader :application_preferred_name + # Identifier for this transaction. sig { returns(T.nilable(String)) } attr_reader :authorization_code + # EMV tag 8A. A code returned by the card issuer. sig { returns(T.nilable(String)) } attr_reader :authorization_response_code + # Describes the method used by the cardholder to verify ownership of the card. One of the following: `approval`, `failure`, `none`, `offline_pin`, `offline_pin_and_signature`, `online_pin`, or `signature`. sig { returns(T.nilable(String)) } attr_reader :cardholder_verification_method + # EMV tag 84. Similar to the application identifier stored on the integrated circuit chip. sig { returns(T.nilable(String)) } attr_reader :dedicated_file_name + # The outcome of a series of EMV functions performed by the card reader. sig { returns(T.nilable(String)) } attr_reader :terminal_verification_results + # An indication of various EMV functions performed during the transaction. sig { returns(T.nilable(String)) } attr_reader :transaction_status_information end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # The authorized amount sig { returns(T.nilable(Integer)) } attr_reader :amount_authorized + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # When using manual capture, a future timestamp after which the charge will be automatically refunded if uncaptured. sig { returns(Integer) } attr_reader :capture_before + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Authorization response cryptogram. sig { returns(T.nilable(String)) } attr_reader :emv_auth_data + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(T.nilable(String)) } attr_reader :generated_card + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # Whether this [PaymentIntent](https://stripe.com/docs/api/payment_intents) is eligible for incremental authorizations. Request support using [request_incremental_authorization_support](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-payment_method_options-card_present-request_incremental_authorization_support). sig { returns(T::Boolean) } attr_reader :incremental_authorization_supported + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # This is used by the financial networks to identify a transaction. Visa calls this the Transaction ID, Mastercard calls this the Trace ID, and American Express calls this the Acquirer Reference Data. The first three digits of the Trace ID is the Financial Network Code, the next 6 digits is the Banknet Reference Number, and the last 4 digits represent the date (MM/DD). This field will be available for successful Visa, Mastercard, or American Express transactions and always null for other card brands. sig { returns(T.nilable(String)) } attr_reader :network_transaction_id + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # Defines whether the authorized amount can be over-captured or not sig { returns(T::Boolean) } attr_reader :overcapture_supported + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # A collection of fields required to be displayed on receipts. Only required for EMV transactions. sig { returns(T.nilable(Receipt)) } attr_reader :receipt + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # The type of payment method transaction-specific details from the transaction that generated this `card` payment method. Always `card_present`. sig { returns(String) } attr_reader :type end + # The charge that created this object. sig { returns(T.nilable(String)) } attr_reader :charge + # Transaction-specific details of the payment method used in the payment. sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for co-branded cards. Can be `cartes_bancaires`, `mastercard`, `visa` or `invalid_preference` if requested network is not valid for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class ThreeDSecureUsage < Stripe::StripeObject + # Whether 3D Secure is supported on this card. sig { returns(T::Boolean) } attr_reader :supported end @@ -194,201 +266,290 @@ module Stripe class Link < Stripe::StripeObject; end class Masterpass < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end class SamsungPay < Stripe::StripeObject; end class VisaCheckout < Stripe::StripeObject class BillingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class ShippingAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's verified billing address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(BillingAddress)) } attr_reader :billing_address + # Owner's verified email. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's verified full name. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's verified shipping address. Values are verified or provided by the wallet directly (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(ShippingAddress)) } attr_reader :shipping_address end + # Attribute for field amex_express_checkout sig { returns(AmexExpressCheckout) } attr_reader :amex_express_checkout + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # (For tokenized numbers only.) The last four digits of the device account number. sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field masterpass sig { returns(Masterpass) } attr_reader :masterpass + # Attribute for field samsung_pay sig { returns(SamsungPay) } attr_reader :samsung_pay + # The type of the card wallet, one of `amex_express_checkout`, `apple_pay`, `google_pay`, `masterpass`, `samsung_pay`, `visa_checkout`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type + # Attribute for field visa_checkout sig { returns(VisaCheckout) } attr_reader :visa_checkout end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(String) } attr_reader :brand + # Checks on Card address and CVC if provided. sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # The brand to use when displaying the card, this accounts for customer's brand choice on dual-branded cards. Can be `american_express`, `cartes_bancaires`, `diners_club`, `discover`, `eftpos_australia`, `interac`, `jcb`, `mastercard`, `union_pay`, `visa`, or `other` and may contain more values in the future. sig { returns(T.nilable(String)) } attr_reader :display_brand + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(String) } attr_reader :funding + # Details of the original PaymentMethod that created this object. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(String) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Status of a card based on the card issuer. sig { returns(T.nilable(String)) } attr_reader :regulated_status + # Contains details on how this Card may be used for 3D Secure authentication. sig { returns(T.nilable(ThreeDSecureUsage)) } attr_reader :three_d_secure_usage + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end class Wallet < Stripe::StripeObject + # The type of mobile wallet, one of `apple_pay`, `google_pay`, `samsung_pay`, or `unknown`. sig { returns(String) } attr_reader :type end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # The [product code](https://stripe.com/docs/card-product-codes) that identifies the specific program or product associated with a card. sig { returns(T.nilable(String)) } attr_reader :brand_product + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Details about payment methods collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method + # Attribute for field wallet sig { returns(Wallet) } attr_reader :wallet end class Cashapp < Stripe::StripeObject + # A unique and immutable identifier assigned by Cash App to every buyer. sig { returns(T.nilable(String)) } attr_reader :buyer_id + # A public identifier for buyers using Cash App. sig { returns(T.nilable(String)) } attr_reader :cashtag end class CustomerBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject + # The customer's bank. Should be one of `arzte_und_apotheker_bank`, `austrian_anadi_bank_ag`, `bank_austria`, `bankhaus_carl_spangler`, `bankhaus_schelhammer_und_schattera_ag`, `bawag_psk_ag`, `bks_bank_ag`, `brull_kallmus_bank_ag`, `btv_vier_lander_bank`, `capital_bank_grawe_gruppe_ag`, `deutsche_bank_ag`, `dolomitenbank`, `easybank_ag`, `erste_bank_und_sparkassen`, `hypo_alpeadriabank_international_ag`, `hypo_noe_lb_fur_niederosterreich_u_wien`, `hypo_oberosterreich_salzburg_steiermark`, `hypo_tirol_bank_ag`, `hypo_vorarlberg_bank_ag`, `hypo_bank_burgenland_aktiengesellschaft`, `marchfelder_bank`, `oberbank_ag`, `raiffeisen_bankengruppe_osterreich`, `schoellerbank_ag`, `sparda_bank_wien`, `volksbank_gruppe`, `volkskreditbank_ag`, or `vr_bank_braunau`. sig { returns(T.nilable(String)) } attr_reader :bank end class Fpx < Stripe::StripeObject + # Account holder type, if provided. Can be one of `individual` or `company`. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # The customer's bank, if provided. Can be one of `affin_bank`, `agrobank`, `alliance_bank`, `ambank`, `bank_islam`, `bank_muamalat`, `bank_rakyat`, `bsn`, `cimb`, `hong_leong_bank`, `hsbc`, `kfh`, `maybank2u`, `ocbc`, `public_bank`, `rhb`, `standard_chartered`, `uob`, `deutsche_bank`, `maybank2e`, `pb_enterprise`, or `bank_of_china`. sig { returns(String) } attr_reader :bank end @@ -396,80 +557,112 @@ module Stripe class Gopay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field display_name sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank, if provided. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank, if the bank was provided. sig { returns(T.nilable(String)) } attr_reader :bic end class InteracPresent < Stripe::StripeObject class Networks < Stripe::StripeObject + # All available networks for the card. sig { returns(T::Array[String]) } attr_reader :available + # The preferred network for the card. sig { returns(T.nilable(String)) } attr_reader :preferred end + # Card brand. Can be `interac`, `mastercard` or `visa`. sig { returns(T.nilable(String)) } attr_reader :brand + # The cardholder name as read from the card, in [ISO 7813](https://en.wikipedia.org/wiki/ISO/IEC_7813) format. May include alphanumeric characters, special characters and first/last name separator (`/`). In some cases, the cardholder name may not be available depending on how the issuer has configured the card. Cardholder name is typically not available on swipe or contactless payments, such as those made with Apple Pay and Google Pay. sig { returns(T.nilable(String)) } attr_reader :cardholder_name + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(Integer) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(Integer) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about card networks that can be used to process the payment. sig { returns(T.nilable(Networks)) } attr_reader :networks + # EMV tag 5F2D. Preferred languages specified by the integrated circuit chip. sig { returns(T.nilable(T::Array[String])) } attr_reader :preferred_locales + # How card details were read in this transaction. sig { returns(T.nilable(String)) } attr_reader :read_method end class KakaoPay < Stripe::StripeObject; end class Klarna < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end + # The customer's date of birth, if provided. sig { returns(T.nilable(Dob)) } attr_reader :dob end class Konbini < Stripe::StripeObject; end class KrCard < Stripe::StripeObject + # The local credit or debit card brand. sig { returns(T.nilable(String)) } attr_reader :brand + # The last four digits of the card. This may not be present for American Express cards. sig { returns(T.nilable(String)) } attr_reader :last4 end class Link < Stripe::StripeObject + # Account owner's email address. sig { returns(T.nilable(String)) } attr_reader :email + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(String) } attr_reader :persistent_token end @@ -477,31 +670,42 @@ module Stripe class Mobilepay < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject; end class NaverPay < Stripe::StripeObject + # Whether to fund this transaction with Naver Pay points or a card. sig { returns(String) } attr_reader :funding end class Oxxo < Stripe::StripeObject; end class P24 < Stripe::StripeObject + # The customer's bank, if provided. sig { returns(T.nilable(String)) } attr_reader :bank end class Payco < Stripe::StripeObject; end class Paynow < Stripe::StripeObject; end class Paypal < Stripe::StripeObject + # Uniquely identifies this particular PayPal account. You can use this attribute to check whether two PayPal accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Owner's email. Values are provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :payer_email + # PayPal account PayerID. This identifier uniquely identifies the PayPal customer. sig { returns(T.nilable(String)) } attr_reader :payer_id + # Owner's verified email. Values are verified or provided by PayPal directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email end class Payto < Stripe::StripeObject + # Bank-State-Branch number of the bank account. sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The PayID alias for the bank account. sig { returns(T.nilable(String)) } attr_reader :pay_id end @@ -509,18 +713,23 @@ module Stripe class Promptpay < Stripe::StripeObject; end class Qris < Stripe::StripeObject; end class RadarOptions < Stripe::StripeObject + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. sig { returns(String) } attr_reader :session end class Rechnung < Stripe::StripeObject class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(Integer) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(Integer) } attr_reader :month + # The four-digit year of birth. sig { returns(Integer) } attr_reader :year end + # Attribute for field dob sig { returns(Dob) } attr_reader :dob end @@ -528,26 +737,35 @@ module Stripe class SamsungPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject class GeneratedFrom < Stripe::StripeObject + # The ID of the Charge that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge + # The ID of the SetupAttempt that generated this PaymentMethod, if any. sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :setup_attempt end + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Branch code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :branch_code + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Information about the object that generated this PaymentMethod. sig { returns(T.nilable(GeneratedFrom)) } attr_reader :generated_from + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :last4 end class Shopeepay < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Two-letter ISO code representing the country the bank account is located in. sig { returns(T.nilable(String)) } attr_reader :country end @@ -555,229 +773,1133 @@ module Stripe class Twint < Stripe::StripeObject; end class UsBankAccount < Stripe::StripeObject class Networks < Stripe::StripeObject + # The preferred network. sig { returns(T.nilable(String)) } attr_reader :preferred + # All supported networks. sig { returns(T::Array[String]) } attr_reader :supported end class StatusDetails < Stripe::StripeObject class Blocked < Stripe::StripeObject + # The ACH network code that resulted in this block. sig { returns(T.nilable(String)) } attr_reader :network_code + # The reason why this PaymentMethod's fingerprint has been blocked sig { returns(T.nilable(String)) } attr_reader :reason end + # Attribute for field blocked sig { returns(Blocked) } attr_reader :blocked end + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account number of the bank account. sig { returns(T.nilable(String)) } attr_reader :account_number + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # The name of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The ID of the Financial Connections Account used to create the payment method. sig { returns(T.nilable(String)) } attr_reader :financial_connections_account + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # Contains information about US bank account networks that can be used. sig { returns(T.nilable(Networks)) } attr_reader :networks + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number + # Contains information about the future reusability of this PaymentMethod. sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(Affirm) } # Attribute for field affirm + sig { returns(Affirm) } attr_reader :affirm - sig { returns(AfterpayClearpay) } # Attribute for field afterpay_clearpay + sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - sig { returns(Alipay) } # Attribute for field alipay + sig { returns(Alipay) } attr_reader :alipay - sig { returns(String) } # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + sig { returns(String) } attr_reader :allow_redisplay - sig { returns(Alma) } # Attribute for field alma + sig { returns(Alma) } attr_reader :alma - sig { returns(AmazonPay) } # Attribute for field amazon_pay + sig { returns(AmazonPay) } attr_reader :amazon_pay - sig { returns(AuBecsDebit) } # Attribute for field au_becs_debit + sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - sig { returns(BacsDebit) } # Attribute for field bacs_debit + sig { returns(BacsDebit) } attr_reader :bacs_debit - sig { returns(Bancontact) } # Attribute for field bancontact + sig { returns(Bancontact) } attr_reader :bancontact - sig { returns(BillingDetails) } # Attribute for field billing_details + sig { returns(BillingDetails) } attr_reader :billing_details - sig { returns(Blik) } # Attribute for field blik + sig { returns(Blik) } attr_reader :blik - sig { returns(Boleto) } # Attribute for field boleto + sig { returns(Boleto) } attr_reader :boleto - sig { returns(Card) } # Attribute for field card + sig { returns(Card) } attr_reader :card - sig { returns(CardPresent) } # Attribute for field card_present + sig { returns(CardPresent) } attr_reader :card_present - sig { returns(Cashapp) } # Attribute for field cashapp + sig { returns(Cashapp) } attr_reader :cashapp - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(CustomerBalance) } # Attribute for field customer_balance + sig { returns(CustomerBalance) } attr_reader :customer_balance - sig { returns(Eps) } # Attribute for field eps + sig { returns(Eps) } attr_reader :eps - sig { returns(Fpx) } # Attribute for field fpx + sig { returns(Fpx) } attr_reader :fpx - sig { returns(Giropay) } # Attribute for field giropay + sig { returns(Giropay) } attr_reader :giropay - sig { returns(Gopay) } # Attribute for field gopay + sig { returns(Gopay) } attr_reader :gopay - sig { returns(Grabpay) } # Attribute for field grabpay + sig { returns(Grabpay) } attr_reader :grabpay - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(IdBankTransfer) } # Attribute for field id_bank_transfer + sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - sig { returns(Ideal) } # Attribute for field ideal + sig { returns(Ideal) } attr_reader :ideal - sig { returns(InteracPresent) } # Attribute for field interac_present + sig { returns(InteracPresent) } attr_reader :interac_present - sig { returns(KakaoPay) } # Attribute for field kakao_pay + sig { returns(KakaoPay) } attr_reader :kakao_pay - sig { returns(Klarna) } # Attribute for field klarna + sig { returns(Klarna) } attr_reader :klarna - sig { returns(Konbini) } # Attribute for field konbini + sig { returns(Konbini) } attr_reader :konbini - sig { returns(KrCard) } # Attribute for field kr_card + sig { returns(KrCard) } attr_reader :kr_card - sig { returns(Link) } # Attribute for field link + sig { returns(Link) } attr_reader :link - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(MbWay) } # Attribute for field mb_way + sig { returns(MbWay) } attr_reader :mb_way - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(Mobilepay) } # Attribute for field mobilepay + sig { returns(Mobilepay) } attr_reader :mobilepay - sig { returns(Multibanco) } # Attribute for field multibanco + sig { returns(Multibanco) } attr_reader :multibanco - sig { returns(NaverPay) } # Attribute for field naver_pay + sig { returns(NaverPay) } attr_reader :naver_pay - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Oxxo) } # Attribute for field oxxo + sig { returns(Oxxo) } attr_reader :oxxo - sig { returns(P24) } # Attribute for field p24 + sig { returns(P24) } attr_reader :p24 - sig { returns(Payco) } # Attribute for field payco + sig { returns(Payco) } attr_reader :payco - sig { returns(Paynow) } # Attribute for field paynow + sig { returns(Paynow) } attr_reader :paynow - sig { returns(Paypal) } # Attribute for field paypal + sig { returns(Paypal) } attr_reader :paypal - sig { returns(Payto) } # Attribute for field payto + sig { returns(Payto) } attr_reader :payto - sig { returns(Pix) } # Attribute for field pix + sig { returns(Pix) } attr_reader :pix - sig { returns(Promptpay) } # Attribute for field promptpay + sig { returns(Promptpay) } attr_reader :promptpay - sig { returns(Qris) } # Attribute for field qris + sig { returns(Qris) } attr_reader :qris - sig { returns(RadarOptions) } # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(RadarOptions) } attr_reader :radar_options - sig { returns(Rechnung) } # Attribute for field rechnung + sig { returns(Rechnung) } attr_reader :rechnung - sig { returns(RevolutPay) } # Attribute for field revolut_pay + sig { returns(RevolutPay) } attr_reader :revolut_pay - sig { returns(SamsungPay) } # Attribute for field samsung_pay + sig { returns(SamsungPay) } attr_reader :samsung_pay - sig { returns(SepaDebit) } # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Shopeepay) } # Attribute for field shopeepay + sig { returns(Shopeepay) } attr_reader :shopeepay - sig { returns(Sofort) } # Attribute for field sofort + sig { returns(Sofort) } attr_reader :sofort - sig { returns(Swish) } # Attribute for field swish + sig { returns(Swish) } attr_reader :swish - sig { returns(Twint) } # Attribute for field twint + sig { returns(Twint) } attr_reader :twint - sig { returns(String) } # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } attr_reader :type - sig { returns(UsBankAccount) } # Attribute for field us_bank_account + sig { returns(UsBankAccount) } attr_reader :us_bank_account - sig { returns(WechatPay) } # Attribute for field wechat_pay + sig { returns(WechatPay) } attr_reader :wechat_pay - sig { returns(Zip) } # Attribute for field zip + sig { returns(Zip) } attr_reader :zip + class ListParams < Stripe::RequestParams + # The ID of the customer whose PaymentMethods will be retrieved. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + sig { returns(String) } + attr_accessor :type + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { returns(T.nilable(::Stripe::PaymentMethod::CreateParams::BillingDetails::Address)) } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentMethod::CreateParams::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + sig { returns(String) } + attr_accessor :preferred + sig { params(preferred: String).void } + def initialize(preferred: nil); end + end + # The card's CVC. It is highly recommended to always include this value. + sig { returns(String) } + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + sig { returns(Integer) } + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(Integer) } + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + sig { returns(::Stripe::PaymentMethod::CreateParams::Card::Networks) } + attr_accessor :networks + # The card number, as a string without any separators. + sig { returns(String) } + attr_accessor :number + # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + sig { returns(String) } + attr_accessor :token + sig { + params(cvc: String, exp_month: Integer, exp_year: Integer, networks: ::Stripe::PaymentMethod::CreateParams::Card::Networks, number: String, token: String).void + } + def initialize( + cvc: nil, + exp_month: nil, + exp_year: nil, + networks: nil, + number: nil, + token: nil + ); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentMethod::CreateParams::Klarna::Dob) } + attr_accessor :dob + sig { params(dob: ::Stripe::PaymentMethod::CreateParams::Klarna::Dob).void } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentMethod::CreateParams::Rechnung::Dob) } + attr_accessor :dob + sig { params(dob: ::Stripe::PaymentMethod::CreateParams::Rechnung::Dob).void } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::PaymentMethod::CreateParams::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentMethod::CreateParams::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentMethod::CreateParams::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Boleto) } + attr_accessor :boleto + # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. + sig { returns(::Stripe::PaymentMethod::CreateParams::Card) } + attr_accessor :card + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Cashapp) } + attr_accessor :cashapp + # The `Customer` to whom the original PaymentMethod is attached. + sig { returns(String) } + attr_accessor :customer + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Eps) } + attr_accessor :eps + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Payco) } + attr_accessor :payco + # The PaymentMethod to share. + sig { returns(String) } + attr_accessor :payment_method + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::PaymentMethod::CreateParams::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentMethod::CreateParams::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentMethod::CreateParams::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentMethod::CreateParams::AcssDebit, affirm: ::Stripe::PaymentMethod::CreateParams::Affirm, afterpay_clearpay: ::Stripe::PaymentMethod::CreateParams::AfterpayClearpay, alipay: ::Stripe::PaymentMethod::CreateParams::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentMethod::CreateParams::Alma, amazon_pay: ::Stripe::PaymentMethod::CreateParams::AmazonPay, au_becs_debit: ::Stripe::PaymentMethod::CreateParams::AuBecsDebit, bacs_debit: ::Stripe::PaymentMethod::CreateParams::BacsDebit, bancontact: ::Stripe::PaymentMethod::CreateParams::Bancontact, billing_details: ::Stripe::PaymentMethod::CreateParams::BillingDetails, blik: ::Stripe::PaymentMethod::CreateParams::Blik, boleto: ::Stripe::PaymentMethod::CreateParams::Boleto, card: ::Stripe::PaymentMethod::CreateParams::Card, cashapp: ::Stripe::PaymentMethod::CreateParams::Cashapp, customer: String, customer_balance: ::Stripe::PaymentMethod::CreateParams::CustomerBalance, eps: ::Stripe::PaymentMethod::CreateParams::Eps, expand: T::Array[String], fpx: ::Stripe::PaymentMethod::CreateParams::Fpx, giropay: ::Stripe::PaymentMethod::CreateParams::Giropay, gopay: ::Stripe::PaymentMethod::CreateParams::Gopay, grabpay: ::Stripe::PaymentMethod::CreateParams::Grabpay, id_bank_transfer: ::Stripe::PaymentMethod::CreateParams::IdBankTransfer, ideal: ::Stripe::PaymentMethod::CreateParams::Ideal, interac_present: ::Stripe::PaymentMethod::CreateParams::InteracPresent, kakao_pay: ::Stripe::PaymentMethod::CreateParams::KakaoPay, klarna: ::Stripe::PaymentMethod::CreateParams::Klarna, konbini: ::Stripe::PaymentMethod::CreateParams::Konbini, kr_card: ::Stripe::PaymentMethod::CreateParams::KrCard, link: ::Stripe::PaymentMethod::CreateParams::Link, mb_way: ::Stripe::PaymentMethod::CreateParams::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentMethod::CreateParams::Mobilepay, multibanco: ::Stripe::PaymentMethod::CreateParams::Multibanco, naver_pay: ::Stripe::PaymentMethod::CreateParams::NaverPay, oxxo: ::Stripe::PaymentMethod::CreateParams::Oxxo, p24: ::Stripe::PaymentMethod::CreateParams::P24, payco: ::Stripe::PaymentMethod::CreateParams::Payco, payment_method: String, paynow: ::Stripe::PaymentMethod::CreateParams::Paynow, paypal: ::Stripe::PaymentMethod::CreateParams::Paypal, payto: ::Stripe::PaymentMethod::CreateParams::Payto, pix: ::Stripe::PaymentMethod::CreateParams::Pix, promptpay: ::Stripe::PaymentMethod::CreateParams::Promptpay, qris: ::Stripe::PaymentMethod::CreateParams::Qris, radar_options: ::Stripe::PaymentMethod::CreateParams::RadarOptions, rechnung: ::Stripe::PaymentMethod::CreateParams::Rechnung, revolut_pay: ::Stripe::PaymentMethod::CreateParams::RevolutPay, samsung_pay: ::Stripe::PaymentMethod::CreateParams::SamsungPay, sepa_debit: ::Stripe::PaymentMethod::CreateParams::SepaDebit, shopeepay: ::Stripe::PaymentMethod::CreateParams::Shopeepay, sofort: ::Stripe::PaymentMethod::CreateParams::Sofort, swish: ::Stripe::PaymentMethod::CreateParams::Swish, twint: ::Stripe::PaymentMethod::CreateParams::Twint, type: String, us_bank_account: ::Stripe::PaymentMethod::CreateParams::UsBankAccount, wechat_pay: ::Stripe::PaymentMethod::CreateParams::WechatPay, zip: ::Stripe::PaymentMethod::CreateParams::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + payment_method: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { returns(T.nilable(::Stripe::PaymentMethod::UpdateParams::BillingDetails::Address)) } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentMethod::UpdateParams::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + sig { returns(T.nilable(String)) } + attr_accessor :preferred + sig { params(preferred: T.nilable(String)).void } + def initialize(preferred: nil); end + end + # Two-digit number representing the card's expiration month. + sig { returns(Integer) } + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(Integer) } + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + sig { returns(::Stripe::PaymentMethod::UpdateParams::Card::Networks) } + attr_accessor :networks + sig { + params(exp_month: Integer, exp_year: Integer, networks: ::Stripe::PaymentMethod::UpdateParams::Card::Networks).void + } + def initialize(exp_month: nil, exp_year: nil, networks: nil); end + end + class Link < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class UsBankAccount < Stripe::RequestParams + # Bank account holder type. + sig { returns(String) } + attr_accessor :account_holder_type + # Bank account type. + sig { returns(String) } + attr_accessor :account_type + sig { params(account_holder_type: String, account_type: String).void } + def initialize(account_holder_type: nil, account_type: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentMethod::UpdateParams::BillingDetails) } + attr_accessor :billing_details + # If this is a `card` PaymentMethod, this hash contains the user's card details. + sig { returns(::Stripe::PaymentMethod::UpdateParams::Card) } + attr_accessor :card + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentMethod::UpdateParams::Link) } + attr_accessor :link + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentMethod::UpdateParams::NaverPay) } + attr_accessor :naver_pay + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentMethod::UpdateParams::Payto) } + attr_accessor :payto + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentMethod::UpdateParams::UsBankAccount) } + attr_accessor :us_bank_account + sig { + params(allow_redisplay: String, billing_details: ::Stripe::PaymentMethod::UpdateParams::BillingDetails, card: ::Stripe::PaymentMethod::UpdateParams::Card, expand: T::Array[String], link: ::Stripe::PaymentMethod::UpdateParams::Link, metadata: T.nilable(T::Hash[String, String]), naver_pay: ::Stripe::PaymentMethod::UpdateParams::NaverPay, payto: ::Stripe::PaymentMethod::UpdateParams::Payto, us_bank_account: ::Stripe::PaymentMethod::UpdateParams::UsBankAccount).void + } + def initialize( + allow_redisplay: nil, + billing_details: nil, + card: nil, + expand: nil, + link: nil, + metadata: nil, + naver_pay: nil, + payto: nil, + us_bank_account: nil + ); end + end + class AttachParams < Stripe::RequestParams + # The ID of the customer to which to attach the PaymentMethod. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(customer: String, expand: T::Array[String]).void } + def initialize(customer: nil, expand: nil); end + end + class DetachParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Attaches a PaymentMethod object to a Customer. + # + # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents) + # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). + # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + # future use, which makes later declines and payment friction more likely. + # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up + # future payments. + # + # To use this PaymentMethod as the default for invoice or subscription payments, + # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), + # on the Customer to the PaymentMethod's ID. + sig { + params(params: T.any(::Stripe::PaymentMethod::AttachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def attach(params = {}, opts = {}); end + + # Attaches a PaymentMethod object to a Customer. + # + # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents) + # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). + # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + # future use, which makes later declines and payment friction more likely. + # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up + # future payments. + # + # To use this PaymentMethod as the default for invoice or subscription payments, + # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), + # on the Customer to the PaymentMethod's ID. + sig { + params(payment_method: String, params: T.any(::Stripe::PaymentMethod::AttachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def self.attach(payment_method, params = {}, opts = {}); end + + # Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. + # + # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment. + sig { + params(params: T.any(::Stripe::PaymentMethod::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def self.create(params = {}, opts = {}); end + + # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. + sig { + params(params: T.any(::Stripe::PaymentMethod::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def detach(params = {}, opts = {}); end + + # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. + sig { + params(payment_method: String, params: T.any(::Stripe::PaymentMethod::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def self.detach(payment_method, params = {}, opts = {}); end + + # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. + sig { + params(params: T.any(::Stripe::PaymentMethod::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. + sig { + params(id: String, params: T.any(::Stripe::PaymentMethod::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_configuration.rbi b/rbi/stripe/resources/payment_method_configuration.rbi index ad627de89..f415a4653 100644 --- a/rbi/stripe/resources/payment_method_configuration.rbi +++ b/rbi/stripe/resources/payment_method_configuration.rbi @@ -20,809 +20,3152 @@ module Stripe class PaymentMethodConfiguration < APIResource class AcssDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Affirm < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AfterpayClearpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Alipay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Alma < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AmazonPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class ApplePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class AuBecsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class BacsDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Bancontact < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Blik < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Boleto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Card < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class CartesBancaires < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Cashapp < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class CustomerBalance < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Eps < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Fpx < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Giropay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class GooglePay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Gopay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Grabpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class IdBankTransfer < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Ideal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Jcb < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Klarna < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Konbini < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Link < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Mobilepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Multibanco < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Oxxo < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class P24 < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Paynow < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Paypal < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Payto < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Promptpay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Qris < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class RevolutPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class SepaDebit < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Shopeepay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Sofort < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Swish < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Twint < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class UsBankAccount < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class WechatPay < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end class Zip < Stripe::StripeObject class DisplayPreference < Stripe::StripeObject + # For child configs, whether or not the account's preference will be observed. If `false`, the parent configuration's default is used. sig { returns(T.nilable(T::Boolean)) } attr_reader :overridable + # The account's display preference. sig { returns(String) } attr_reader :preference + # The effective display preference value. sig { returns(String) } attr_reader :value end + # Whether this payment method may be offered at checkout. True if `display_preference` is `on` and the payment method's capability is active. sig { returns(T::Boolean) } attr_reader :available + # Attribute for field display_preference sig { returns(DisplayPreference) } attr_reader :display_preference end - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(T::Boolean) } # Whether the configuration can be used for new payments. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Affirm) } # Attribute for field affirm + sig { returns(Affirm) } attr_reader :affirm - sig { returns(AfterpayClearpay) } # Attribute for field afterpay_clearpay + sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay - sig { returns(Alipay) } # Attribute for field alipay + sig { returns(Alipay) } attr_reader :alipay - sig { returns(Alma) } # Attribute for field alma + sig { returns(Alma) } attr_reader :alma - sig { returns(AmazonPay) } # Attribute for field amazon_pay + sig { returns(AmazonPay) } attr_reader :amazon_pay - sig { returns(ApplePay) } # Attribute for field apple_pay + sig { returns(ApplePay) } attr_reader :apple_pay - sig { returns(T.nilable(String)) } # For child configs, the Connect application associated with the configuration. + sig { returns(T.nilable(String)) } attr_reader :application - sig { returns(AuBecsDebit) } # Attribute for field au_becs_debit + sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - sig { returns(BacsDebit) } # Attribute for field bacs_debit + sig { returns(BacsDebit) } attr_reader :bacs_debit - sig { returns(Bancontact) } # Attribute for field bancontact + sig { returns(Bancontact) } attr_reader :bancontact - sig { returns(Blik) } # Attribute for field blik + sig { returns(Blik) } attr_reader :blik - sig { returns(Boleto) } # Attribute for field boleto + sig { returns(Boleto) } attr_reader :boleto - sig { returns(Card) } # Attribute for field card + sig { returns(Card) } attr_reader :card - sig { returns(CartesBancaires) } # Attribute for field cartes_bancaires + sig { returns(CartesBancaires) } attr_reader :cartes_bancaires - sig { returns(Cashapp) } # Attribute for field cashapp + sig { returns(Cashapp) } attr_reader :cashapp - sig { returns(CustomerBalance) } # Attribute for field customer_balance + sig { returns(CustomerBalance) } attr_reader :customer_balance - sig { returns(Eps) } # Attribute for field eps + sig { returns(Eps) } attr_reader :eps - sig { returns(Fpx) } # Attribute for field fpx + sig { returns(Fpx) } attr_reader :fpx - sig { returns(Giropay) } # Attribute for field giropay + sig { returns(Giropay) } attr_reader :giropay - sig { returns(GooglePay) } # Attribute for field google_pay + sig { returns(GooglePay) } attr_reader :google_pay - sig { returns(Gopay) } # Attribute for field gopay + sig { returns(Gopay) } attr_reader :gopay - sig { returns(Grabpay) } # Attribute for field grabpay + sig { returns(Grabpay) } attr_reader :grabpay - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(IdBankTransfer) } # Attribute for field id_bank_transfer + sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer - sig { returns(Ideal) } # Attribute for field ideal + sig { returns(Ideal) } attr_reader :ideal - sig { returns(T::Boolean) } # The default configuration is used whenever a payment method configuration is not specified. + sig { returns(T::Boolean) } attr_reader :is_default - sig { returns(Jcb) } # Attribute for field jcb + sig { returns(Jcb) } attr_reader :jcb - sig { returns(Klarna) } # Attribute for field klarna + sig { returns(Klarna) } attr_reader :klarna - sig { returns(Konbini) } # Attribute for field konbini + sig { returns(Konbini) } attr_reader :konbini - sig { returns(Link) } # Attribute for field link + sig { returns(Link) } attr_reader :link - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(Mobilepay) } # Attribute for field mobilepay + sig { returns(Mobilepay) } attr_reader :mobilepay - sig { returns(Multibanco) } # Attribute for field multibanco + sig { returns(Multibanco) } attr_reader :multibanco - sig { returns(String) } # The configuration's name. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Oxxo) } # Attribute for field oxxo + sig { returns(Oxxo) } attr_reader :oxxo - sig { returns(P24) } # Attribute for field p24 + sig { returns(P24) } attr_reader :p24 - sig { returns(T.nilable(String)) } # For child configs, the configuration's parent configuration. + sig { returns(T.nilable(String)) } attr_reader :parent - sig { returns(Paynow) } # Attribute for field paynow + sig { returns(Paynow) } attr_reader :paynow - sig { returns(Paypal) } # Attribute for field paypal + sig { returns(Paypal) } attr_reader :paypal - sig { returns(Payto) } # Attribute for field payto + sig { returns(Payto) } attr_reader :payto - sig { returns(Promptpay) } # Attribute for field promptpay + sig { returns(Promptpay) } attr_reader :promptpay - sig { returns(Qris) } # Attribute for field qris + sig { returns(Qris) } attr_reader :qris - sig { returns(RevolutPay) } # Attribute for field revolut_pay + sig { returns(RevolutPay) } attr_reader :revolut_pay - sig { returns(SepaDebit) } # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Shopeepay) } # Attribute for field shopeepay + sig { returns(Shopeepay) } attr_reader :shopeepay - sig { returns(Sofort) } # Attribute for field sofort + sig { returns(Sofort) } attr_reader :sofort - sig { returns(Swish) } # Attribute for field swish + sig { returns(Swish) } attr_reader :swish - sig { returns(Twint) } # Attribute for field twint + sig { returns(Twint) } attr_reader :twint - sig { returns(UsBankAccount) } # Attribute for field us_bank_account + sig { returns(UsBankAccount) } attr_reader :us_bank_account - sig { returns(WechatPay) } # Attribute for field wechat_pay + sig { returns(WechatPay) } attr_reader :wechat_pay - sig { returns(Zip) } # Attribute for field zip + sig { returns(Zip) } attr_reader :zip + class ListParams < Stripe::RequestParams + # The Connect application to filter by. + sig { returns(T.nilable(String)) } + attr_accessor :application + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(application: T.nilable(String), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + application: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Affirm::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Affirm::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Alipay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Alipay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Alma::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Alma::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Blik::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Blik::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Boleto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Boleto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Card::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Card::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Eps::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Eps::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Fpx::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Fpx::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Giropay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Giropay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Gopay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Gopay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::IdBankTransfer::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::IdBankTransfer::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Ideal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Ideal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Jcb::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Jcb::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Klarna::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Klarna::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Konbini::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Konbini::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Link::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Link::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::P24::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::P24::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Paynow::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Paynow::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Paypal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Paypal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Payto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Payto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Qris::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Qris::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Shopeepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Shopeepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Sofort::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Sofort::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Swish::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Swish::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::Twint::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Twint::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Zip::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::CreateParams::Zip::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit) } + attr_accessor :acss_debit + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Affirm) } + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Alipay) } + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Alma) } + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay) } + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay) } + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater) } + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit) } + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit) } + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact) } + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Blik) } + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Boleto) } + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Card) } + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires) } + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp) } + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance) } + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Eps) } + attr_accessor :eps + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Fpx) } + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Giropay) } + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay) } + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Gopay) } + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay) } + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::IdBankTransfer) } + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Ideal) } + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Jcb) } + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Klarna) } + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Konbini) } + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Link) } + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay) } + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco) } + attr_accessor :multibanco + # Configuration name. + sig { returns(String) } + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo) } + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::P24) } + attr_accessor :p24 + # Configuration's parent configuration. Specify to create a child configuration. + sig { returns(String) } + attr_accessor :parent + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Paynow) } + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Paypal) } + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Payto) } + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay) } + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Qris) } + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay) } + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit) } + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Shopeepay) } + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Sofort) } + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Swish) } + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Twint) } + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount) } + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay) } + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfiguration::CreateParams::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentMethodConfiguration::CreateParams::AcssDebit, affirm: ::Stripe::PaymentMethodConfiguration::CreateParams::Affirm, afterpay_clearpay: ::Stripe::PaymentMethodConfiguration::CreateParams::AfterpayClearpay, alipay: ::Stripe::PaymentMethodConfiguration::CreateParams::Alipay, alma: ::Stripe::PaymentMethodConfiguration::CreateParams::Alma, amazon_pay: ::Stripe::PaymentMethodConfiguration::CreateParams::AmazonPay, apple_pay: ::Stripe::PaymentMethodConfiguration::CreateParams::ApplePay, apple_pay_later: ::Stripe::PaymentMethodConfiguration::CreateParams::ApplePayLater, au_becs_debit: ::Stripe::PaymentMethodConfiguration::CreateParams::AuBecsDebit, bacs_debit: ::Stripe::PaymentMethodConfiguration::CreateParams::BacsDebit, bancontact: ::Stripe::PaymentMethodConfiguration::CreateParams::Bancontact, blik: ::Stripe::PaymentMethodConfiguration::CreateParams::Blik, boleto: ::Stripe::PaymentMethodConfiguration::CreateParams::Boleto, card: ::Stripe::PaymentMethodConfiguration::CreateParams::Card, cartes_bancaires: ::Stripe::PaymentMethodConfiguration::CreateParams::CartesBancaires, cashapp: ::Stripe::PaymentMethodConfiguration::CreateParams::Cashapp, customer_balance: ::Stripe::PaymentMethodConfiguration::CreateParams::CustomerBalance, eps: ::Stripe::PaymentMethodConfiguration::CreateParams::Eps, expand: T::Array[String], fpx: ::Stripe::PaymentMethodConfiguration::CreateParams::Fpx, giropay: ::Stripe::PaymentMethodConfiguration::CreateParams::Giropay, google_pay: ::Stripe::PaymentMethodConfiguration::CreateParams::GooglePay, gopay: ::Stripe::PaymentMethodConfiguration::CreateParams::Gopay, grabpay: ::Stripe::PaymentMethodConfiguration::CreateParams::Grabpay, id_bank_transfer: ::Stripe::PaymentMethodConfiguration::CreateParams::IdBankTransfer, ideal: ::Stripe::PaymentMethodConfiguration::CreateParams::Ideal, jcb: ::Stripe::PaymentMethodConfiguration::CreateParams::Jcb, klarna: ::Stripe::PaymentMethodConfiguration::CreateParams::Klarna, konbini: ::Stripe::PaymentMethodConfiguration::CreateParams::Konbini, link: ::Stripe::PaymentMethodConfiguration::CreateParams::Link, mobilepay: ::Stripe::PaymentMethodConfiguration::CreateParams::Mobilepay, multibanco: ::Stripe::PaymentMethodConfiguration::CreateParams::Multibanco, name: String, oxxo: ::Stripe::PaymentMethodConfiguration::CreateParams::Oxxo, p24: ::Stripe::PaymentMethodConfiguration::CreateParams::P24, parent: String, paynow: ::Stripe::PaymentMethodConfiguration::CreateParams::Paynow, paypal: ::Stripe::PaymentMethodConfiguration::CreateParams::Paypal, payto: ::Stripe::PaymentMethodConfiguration::CreateParams::Payto, promptpay: ::Stripe::PaymentMethodConfiguration::CreateParams::Promptpay, qris: ::Stripe::PaymentMethodConfiguration::CreateParams::Qris, revolut_pay: ::Stripe::PaymentMethodConfiguration::CreateParams::RevolutPay, sepa_debit: ::Stripe::PaymentMethodConfiguration::CreateParams::SepaDebit, shopeepay: ::Stripe::PaymentMethodConfiguration::CreateParams::Shopeepay, sofort: ::Stripe::PaymentMethodConfiguration::CreateParams::Sofort, swish: ::Stripe::PaymentMethodConfiguration::CreateParams::Swish, twint: ::Stripe::PaymentMethodConfiguration::CreateParams::Twint, us_bank_account: ::Stripe::PaymentMethodConfiguration::CreateParams::UsBankAccount, wechat_pay: ::Stripe::PaymentMethodConfiguration::CreateParams::WechatPay, zip: ::Stripe::PaymentMethodConfiguration::CreateParams::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + parent: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Alma::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Alma::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Blik::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Blik::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Card::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Card::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Eps::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Eps::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Gopay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Gopay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::IdBankTransfer::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::IdBankTransfer::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Link::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Link::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::P24::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::P24::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Payto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Payto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Qris::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Qris::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Shopeepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Shopeepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Swish::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Swish::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Twint::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Twint::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Zip::DisplayPreference) } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfiguration::UpdateParams::Zip::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit) } + attr_accessor :acss_debit + # Whether the configuration can be used for new payments. + sig { returns(T::Boolean) } + attr_accessor :active + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm) } + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay) } + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Alma) } + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay) } + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay) } + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater) } + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit) } + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit) } + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact) } + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Blik) } + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto) } + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Card) } + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires) } + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp) } + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance) } + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Eps) } + attr_accessor :eps + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx) } + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay) } + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay) } + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Gopay) } + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay) } + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::IdBankTransfer) } + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal) } + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb) } + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna) } + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini) } + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Link) } + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay) } + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco) } + attr_accessor :multibanco + # Configuration name. + sig { returns(String) } + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo) } + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::P24) } + attr_accessor :p24 + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow) } + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal) } + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Payto) } + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay) } + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Qris) } + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay) } + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit) } + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Shopeepay) } + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort) } + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Swish) } + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Twint) } + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount) } + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay) } + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfiguration::UpdateParams::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentMethodConfiguration::UpdateParams::AcssDebit, active: T::Boolean, affirm: ::Stripe::PaymentMethodConfiguration::UpdateParams::Affirm, afterpay_clearpay: ::Stripe::PaymentMethodConfiguration::UpdateParams::AfterpayClearpay, alipay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Alipay, alma: ::Stripe::PaymentMethodConfiguration::UpdateParams::Alma, amazon_pay: ::Stripe::PaymentMethodConfiguration::UpdateParams::AmazonPay, apple_pay: ::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePay, apple_pay_later: ::Stripe::PaymentMethodConfiguration::UpdateParams::ApplePayLater, au_becs_debit: ::Stripe::PaymentMethodConfiguration::UpdateParams::AuBecsDebit, bacs_debit: ::Stripe::PaymentMethodConfiguration::UpdateParams::BacsDebit, bancontact: ::Stripe::PaymentMethodConfiguration::UpdateParams::Bancontact, blik: ::Stripe::PaymentMethodConfiguration::UpdateParams::Blik, boleto: ::Stripe::PaymentMethodConfiguration::UpdateParams::Boleto, card: ::Stripe::PaymentMethodConfiguration::UpdateParams::Card, cartes_bancaires: ::Stripe::PaymentMethodConfiguration::UpdateParams::CartesBancaires, cashapp: ::Stripe::PaymentMethodConfiguration::UpdateParams::Cashapp, customer_balance: ::Stripe::PaymentMethodConfiguration::UpdateParams::CustomerBalance, eps: ::Stripe::PaymentMethodConfiguration::UpdateParams::Eps, expand: T::Array[String], fpx: ::Stripe::PaymentMethodConfiguration::UpdateParams::Fpx, giropay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Giropay, google_pay: ::Stripe::PaymentMethodConfiguration::UpdateParams::GooglePay, gopay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Gopay, grabpay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Grabpay, id_bank_transfer: ::Stripe::PaymentMethodConfiguration::UpdateParams::IdBankTransfer, ideal: ::Stripe::PaymentMethodConfiguration::UpdateParams::Ideal, jcb: ::Stripe::PaymentMethodConfiguration::UpdateParams::Jcb, klarna: ::Stripe::PaymentMethodConfiguration::UpdateParams::Klarna, konbini: ::Stripe::PaymentMethodConfiguration::UpdateParams::Konbini, link: ::Stripe::PaymentMethodConfiguration::UpdateParams::Link, mobilepay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Mobilepay, multibanco: ::Stripe::PaymentMethodConfiguration::UpdateParams::Multibanco, name: String, oxxo: ::Stripe::PaymentMethodConfiguration::UpdateParams::Oxxo, p24: ::Stripe::PaymentMethodConfiguration::UpdateParams::P24, paynow: ::Stripe::PaymentMethodConfiguration::UpdateParams::Paynow, paypal: ::Stripe::PaymentMethodConfiguration::UpdateParams::Paypal, payto: ::Stripe::PaymentMethodConfiguration::UpdateParams::Payto, promptpay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Promptpay, qris: ::Stripe::PaymentMethodConfiguration::UpdateParams::Qris, revolut_pay: ::Stripe::PaymentMethodConfiguration::UpdateParams::RevolutPay, sepa_debit: ::Stripe::PaymentMethodConfiguration::UpdateParams::SepaDebit, shopeepay: ::Stripe::PaymentMethodConfiguration::UpdateParams::Shopeepay, sofort: ::Stripe::PaymentMethodConfiguration::UpdateParams::Sofort, swish: ::Stripe::PaymentMethodConfiguration::UpdateParams::Swish, twint: ::Stripe::PaymentMethodConfiguration::UpdateParams::Twint, us_bank_account: ::Stripe::PaymentMethodConfiguration::UpdateParams::UsBankAccount, wechat_pay: ::Stripe::PaymentMethodConfiguration::UpdateParams::WechatPay, zip: ::Stripe::PaymentMethodConfiguration::UpdateParams::Zip).void + } + def initialize( + acss_debit: nil, + active: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + # Creates a payment method configuration + sig { + params(params: T.any(::Stripe::PaymentMethodConfiguration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration) + } + def self.create(params = {}, opts = {}); end + + # List payment method configurations + sig { + params(params: T.any(::Stripe::PaymentMethodConfiguration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Update payment method configuration + sig { + params(id: String, params: T.any(::Stripe::PaymentMethodConfiguration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_method_domain.rbi b/rbi/stripe/resources/payment_method_domain.rbi index fe03b8a7a..35df24a4b 100644 --- a/rbi/stripe/resources/payment_method_domain.rbi +++ b/rbi/stripe/resources/payment_method_domain.rbi @@ -10,86 +10,208 @@ module Stripe class PaymentMethodDomain < APIResource class AmazonPay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class ApplePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class GooglePay < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class Link < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end class Paypal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject + # The error message associated with the status of the payment method on the domain. sig { returns(String) } attr_reader :error_message end + # The status of the payment method on the domain. sig { returns(String) } attr_reader :status + # Contains additional details about the status of a payment method for a specific payment method domain. sig { returns(StatusDetails) } attr_reader :status_details end - sig { returns(AmazonPay) } # Indicates the status of a specific payment method on a payment method domain. + sig { returns(AmazonPay) } attr_reader :amazon_pay - sig { returns(ApplePay) } # Indicates the status of a specific payment method on a payment method domain. + sig { returns(ApplePay) } attr_reader :apple_pay - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The domain name that this payment method domain object represents. + sig { returns(String) } attr_reader :domain_name - sig { returns(T::Boolean) } # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + sig { returns(T::Boolean) } attr_reader :enabled - sig { returns(GooglePay) } # Indicates the status of a specific payment method on a payment method domain. + sig { returns(GooglePay) } attr_reader :google_pay - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Link) } # Indicates the status of a specific payment method on a payment method domain. + sig { returns(Link) } attr_reader :link - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Paypal) } # Indicates the status of a specific payment method on a payment method domain. + sig { returns(Paypal) } attr_reader :paypal + class ListParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + sig { returns(String) } + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + sig { returns(T::Boolean) } + attr_accessor :enabled + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(domain_name: String, enabled: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + domain_name: nil, + enabled: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + sig { returns(String) } + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(domain_name: String, enabled: T::Boolean, expand: T::Array[String]).void } + def initialize(domain_name: nil, enabled: nil, expand: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(enabled: T::Boolean, expand: T::Array[String]).void } + def initialize(enabled: nil, expand: nil); end + end + class ValidateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a payment method domain. + sig { + params(params: T.any(::Stripe::PaymentMethodDomain::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def self.create(params = {}, opts = {}); end + + # Lists the details of existing payment method domains. + sig { + params(params: T.any(::Stripe::PaymentMethodDomain::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates an existing payment method domain. + sig { + params(id: String, params: T.any(::Stripe::PaymentMethodDomain::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def self.update(id, params = {}, opts = {}); end + + # Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. + # The payment method doesn't appear in Elements for this domain until it is active. + # + # To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint. + # + # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + sig { + params(params: T.any(::Stripe::PaymentMethodDomain::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def validate(params = {}, opts = {}); end + + # Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. + # The payment method doesn't appear in Elements for this domain until it is active. + # + # To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint. + # + # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + sig { + params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomain::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def self.validate(payment_method_domain, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payment_record.rbi b/rbi/stripe/resources/payment_record.rbi index 9e74116a5..d602bdf68 100644 --- a/rbi/stripe/resources/payment_record.rbi +++ b/rbi/stripe/resources/payment_record.rbi @@ -9,148 +9,714 @@ module Stripe # more Payment Attempt Records, which represent individual attempts made on a payment network. class PaymentRecord < APIResource class AmountCanceled < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountFailed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountGuaranteed < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class AmountRequested < Stripe::StripeObject + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :value end class CustomerDetails < Stripe::StripeObject + # ID of the Stripe Customer associated with this payment. sig { returns(T.nilable(String)) } attr_reader :customer + # The customer's email address. sig { returns(T.nilable(String)) } attr_reader :email + # The customer's name. sig { returns(T.nilable(String)) } attr_reader :name + # The customer's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end class PaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The billing email associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :email + # The billing name associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :name + # The billing phone number associated with the method of payment. sig { returns(T.nilable(String)) } attr_reader :phone end class Custom < Stripe::StripeObject + # Display name for the custom (user-defined) payment method type used to make this payment. sig { returns(String) } attr_reader :display_name + # The custom payment method type associated with this payment. sig { returns(T.nilable(String)) } attr_reader :type end + # The billing details associated with the method of payment. sig { returns(T.nilable(BillingDetails)) } attr_reader :billing_details + # Information about the custom (user-defined) payment method used to make this payment. sig { returns(T.nilable(Custom)) } attr_reader :custom + # ID of the Stripe PaymentMethod used to make this payment. sig { returns(T.nilable(String)) } attr_reader :payment_method + # The type of Payment Method used for this payment attempt. sig { returns(String) } attr_reader :type end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # A representation of a physical address. sig { returns(Address) } attr_reader :address + # The shipping recipient's name. sig { returns(T.nilable(String)) } attr_reader :name + # The shipping recipient's phone number. sig { returns(T.nilable(String)) } attr_reader :phone end - sig { returns(AmountCanceled) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountCanceled) } attr_reader :amount_canceled - sig { returns(AmountFailed) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountFailed) } attr_reader :amount_failed - sig { returns(AmountGuaranteed) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountGuaranteed) } attr_reader :amount_guaranteed - sig { returns(AmountRequested) } # A representation of an amount of money, consisting of an amount and a currency. + sig { returns(AmountRequested) } attr_reader :amount_requested - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CustomerDetails)) } # Customer information for this payment. + sig { returns(T.nilable(CustomerDetails)) } attr_reader :customer_details - sig { returns(T.nilable(String)) } # Indicates whether the customer was present in your checkout flow during this payment. - attr_reader :customer_presence sig { returns(T.nilable(String)) } + attr_reader :customer_presence # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # ID of the latest Payment Attempt Record attached to this Payment Record. + sig { returns(String) } attr_reader :latest_payment_attempt_record - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PaymentMethodDetails)) } # Information about the Payment Method debited for this payment. + sig { returns(T.nilable(PaymentMethodDetails)) } attr_reader :payment_method_details - sig { returns(T.nilable(String)) } # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + sig { returns(T.nilable(String)) } attr_reader :payment_reference - sig { returns(T.nilable(ShippingDetails)) } # Shipping information for this payment. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReportPaymentAttemptParams < Stripe::RequestParams + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :failed_at + sig { params(failed_at: Integer).void } + def initialize(failed_at: nil); end + end + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :guaranteed_at + sig { params(guaranteed_at: Integer).void } + def initialize(guaranteed_at: nil); end + end + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address associated with the method of payment. + sig { + returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails::Address) + } + attr_accessor :address + # The billing email associated with the method of payment. + sig { returns(String) } + attr_accessor :email + # The billing name associated with the method of payment. + sig { returns(String) } + attr_accessor :name + # The billing phone number associated with the method of payment. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + sig { returns(String) } + attr_accessor :display_name + # The custom payment method type associated with this payment. + sig { returns(String) } + attr_accessor :type + sig { params(display_name: String, type: String).void } + def initialize(display_name: nil, type: nil); end + end + # The billing details associated with the method of payment. + sig { + returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails) + } + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + sig { + returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails::Custom) + } + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + sig { returns(String) } + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + sig { returns(String) } + attr_accessor :type + sig { + params(billing_details: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails, custom: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails::Custom, payment_method: String, type: String).void + } + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The physical shipping address. + sig { + returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::ShippingDetails::Address) + } + attr_accessor :address + # The shipping recipient's name. + sig { returns(String) } + attr_accessor :name + # The shipping recipient's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::ShippingDetails::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the payment attempt failure. + sig { returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::Failed) } + attr_accessor :failed + # Information about the payment attempt guarantee. + sig { returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::Guaranteed) } + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The outcome of the reported payment. + sig { returns(String) } + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails) } + attr_accessor :payment_method_details + # Shipping information for this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentAttemptParams::ShippingDetails) } + attr_accessor :shipping_details + sig { + params(description: String, expand: T::Array[String], failed: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::Failed, guaranteed: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::Guaranteed, initiated_at: Integer, metadata: T::Hash[String, String], outcome: String, payment_method_details: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::PaymentMethodDetails, shipping_details: ::Stripe::PaymentRecord::ReportPaymentAttemptParams::ShippingDetails).void + } + def initialize( + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + shipping_details: nil + ); end + end + class ReportPaymentAttemptCanceledParams < Stripe::RequestParams + # When the reported payment was canceled. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :canceled_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(canceled_at: Integer, expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(canceled_at: nil, expand: nil, metadata: nil); end + end + class ReportPaymentAttemptFailedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # When the reported payment failed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :failed_at + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], failed_at: Integer, metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, failed_at: nil, metadata: nil); end + end + class ReportPaymentAttemptGuaranteedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :guaranteed_at + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], guaranteed_at: Integer, metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, guaranteed_at: nil, metadata: nil); end + end + class ReportPaymentParams < Stripe::RequestParams + class AmountRequested < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :value + sig { params(currency: String, value: Integer).void } + def initialize(currency: nil, value: nil); end + end + class CustomerDetails < Stripe::RequestParams + # The customer who made the payment. + sig { returns(String) } + attr_accessor :customer + # The customer's phone number. + sig { returns(String) } + attr_accessor :email + # The customer's name. + sig { returns(String) } + attr_accessor :name + # The customer's phone number. + sig { returns(String) } + attr_accessor :phone + sig { params(customer: String, email: String, name: String, phone: String).void } + def initialize(customer: nil, email: nil, name: nil, phone: nil); end + end + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :failed_at + sig { params(failed_at: Integer).void } + def initialize(failed_at: nil); end + end + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :guaranteed_at + sig { params(guaranteed_at: Integer).void } + def initialize(guaranteed_at: nil); end + end + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address associated with the method of payment. + sig { + returns(::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails::BillingDetails::Address) + } + attr_accessor :address + # The billing email associated with the method of payment. + sig { returns(String) } + attr_accessor :email + # The billing name associated with the method of payment. + sig { returns(String) } + attr_accessor :name + # The billing phone number associated with the method of payment. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + sig { returns(String) } + attr_accessor :display_name + # The custom payment method type associated with this payment. + sig { returns(String) } + attr_accessor :type + sig { params(display_name: String, type: String).void } + def initialize(display_name: nil, type: nil); end + end + # The billing details associated with the method of payment. + sig { + returns(::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails::BillingDetails) + } + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails::Custom) } + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + sig { returns(String) } + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + sig { returns(String) } + attr_accessor :type + sig { + params(billing_details: ::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails::BillingDetails, custom: ::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails::Custom, payment_method: String, type: String).void + } + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The physical shipping address. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::ShippingDetails::Address) } + attr_accessor :address + # The shipping recipient's name. + sig { returns(String) } + attr_accessor :name + # The shipping recipient's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecord::ReportPaymentParams::ShippingDetails::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + # The amount you intend to collect for this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::AmountRequested) } + attr_accessor :amount_requested + # Customer information for this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::CustomerDetails) } + attr_accessor :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. + sig { returns(String) } + attr_accessor :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the payment attempt failure. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::Failed) } + attr_accessor :failed + # Information about the payment attempt guarantee. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::Guaranteed) } + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The outcome of the reported payment. + sig { returns(String) } + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails) } + attr_accessor :payment_method_details + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + sig { returns(String) } + attr_accessor :payment_reference + # Shipping information for this payment. + sig { returns(::Stripe::PaymentRecord::ReportPaymentParams::ShippingDetails) } + attr_accessor :shipping_details + sig { + params(amount_requested: ::Stripe::PaymentRecord::ReportPaymentParams::AmountRequested, customer_details: ::Stripe::PaymentRecord::ReportPaymentParams::CustomerDetails, customer_presence: String, description: String, expand: T::Array[String], failed: ::Stripe::PaymentRecord::ReportPaymentParams::Failed, guaranteed: ::Stripe::PaymentRecord::ReportPaymentParams::Guaranteed, initiated_at: Integer, metadata: T::Hash[String, String], outcome: String, payment_method_details: ::Stripe::PaymentRecord::ReportPaymentParams::PaymentMethodDetails, payment_reference: String, shipping_details: ::Stripe::PaymentRecord::ReportPaymentParams::ShippingDetails).void + } + def initialize( + amount_requested: nil, + customer_details: nil, + customer_presence: nil, + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + payment_reference: nil, + shipping_details: nil + ); end + end + # Report a new Payment Record. You may report a Payment Record as it is + # initialized and later report updates through the other report_* methods, or report Payment + # Records in a terminal state directly, through this method. + sig { + params(params: T.any(::Stripe::PaymentRecord::ReportPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def self.report_payment(params = {}, opts = {}); end + + # Report a new payment attempt on the specified Payment Record. A new payment + # attempt can only be specified if all other payment attempts are canceled or failed. + sig { + params(params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt(params = {}, opts = {}); end + + # Report a new payment attempt on the specified Payment Record. A new payment + # attempt can only be specified if all other payment attempts are canceled or failed. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def self.report_payment_attempt(id, params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # was canceled. + sig { + params(params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptCanceledParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt_canceled(params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # was canceled. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptCanceledParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def self.report_payment_attempt_canceled(id, params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # failed or errored. + sig { + params(params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptFailedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt_failed(params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # failed or errored. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptFailedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def self.report_payment_attempt_failed(id, params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # was guaranteed. + sig { + params(params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptGuaranteedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt_guaranteed(params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # was guaranteed. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecord::ReportPaymentAttemptGuaranteedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def self.report_payment_attempt_guaranteed(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/payout.rbi b/rbi/stripe/resources/payout.rbi index dfd1615fa..4f7dac529 100644 --- a/rbi/stripe/resources/payout.rbi +++ b/rbi/stripe/resources/payout.rbi @@ -13,88 +13,287 @@ module Stripe # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) class Payout < APIResource class TraceId < Stripe::StripeObject + # Possible values are `pending`, `supported`, and `unsupported`. When `payout.status` is `pending` or `in_transit`, this will be `pending`. When the payout transitions to `paid`, `failed`, or `canceled`, this status will become `supported` or `unsupported` shortly after in most cases. In some cases, this may appear as `pending` for up to 10 days after `arrival_date` until transitioning to `supported` or `unsupported`. sig { returns(String) } attr_reader :status + # The trace ID value if `trace_id.status` is `supported`, otherwise `nil`. sig { returns(T.nilable(String)) } attr_reader :value end - sig { returns(Integer) } # The amount (in cents (or local equivalent)) that transfers to your bank account or debit card. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } # The application fee (if any) for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + sig { returns(T.nilable(T.any(String, Stripe::ApplicationFee))) } attr_reader :application_fee - sig { returns(T.nilable(Integer)) } # The amount of the application fee (if any) requested for the payout. [See the Connect documentation](https://stripe.com/docs/connect/instant-payouts#monetization-and-fees) for details. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(Integer) } # Date that you can expect the payout to arrive in the bank. This factors in delays to account for weekends or bank holidays. + sig { returns(Integer) } attr_reader :arrival_date - sig { returns(T::Boolean) } # Returns `true` if the payout is created by an [automated payout schedule](https://stripe.com/docs/payouts#payout-schedule) and `false` if it's [requested manually](https://stripe.com/docs/payouts#manual-payouts). + sig { returns(T::Boolean) } attr_reader :automatic - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # ID of the balance transaction that describes the impact of this payout on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) } # ID of the bank account or card the payout is sent to. + sig { returns(T.nilable(T.any(String, T.any(Stripe::BankAccount, Stripe::Card)))) } attr_reader :destination - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # If the payout fails or cancels, this is the ID of the balance transaction that reverses the initial balance transaction and returns the funds from the failed payout back in your balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :failure_balance_transaction - sig { returns(T.nilable(String)) } # Error code that provides a reason for a payout failure, if available. View our [list of failure codes](https://stripe.com/docs/api#payout_failures). - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code # Message that provides the reason for a payout failure, if available. + sig { returns(T.nilable(String)) } attr_reader :failure_message - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # The method used to send this payout, which can be `standard` or `instant`. `instant` is supported for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). - attr_reader :method sig { returns(String) } + attr_reader :method # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Payout))) } # If the payout reverses another, this is the ID of the original payout. + sig { returns(T.nilable(T.any(String, Stripe::Payout))) } attr_reader :original_payout - sig { returns(String) } # If `completed`, you can use the [Balance Transactions API](https://stripe.com/docs/api/balance_transactions/list#balance_transaction_list-payout) to list all balance transactions that are paid out in this payout. + sig { returns(String) } attr_reader :reconciliation_status - sig { returns(T.nilable(T.any(String, Stripe::Payout))) } # If the payout reverses, this is the ID of the payout that reverses this payout. + sig { returns(T.nilable(T.any(String, Stripe::Payout))) } attr_reader :reversed_by - sig { returns(String) } # The source balance this payout came from, which can be one of the following: `card`, `fpx`, or `bank_account`. + sig { returns(String) } attr_reader :source_type - sig { returns(T.nilable(String)) } # Extra information about a payout that displays on the user's bank statement. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(String) } # Current status of the payout: `paid`, `pending`, `in_transit`, `canceled` or `failed`. A payout is `pending` until it's submitted to the bank, when it becomes `in_transit`. The status changes to `paid` if the transaction succeeds, or to `failed` or `canceled` (within 5 business days). Some payouts that fail might initially show as `paid`, then change to `failed`. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(TraceId)) } # A value that generates from the beneficiary's bank that allows users to track payouts with their bank. Banks might call this a "reference number" or something similar. + sig { returns(T.nilable(TraceId)) } attr_reader :trace_id - sig { returns(String) } # Can be `bank_account` or `card`. + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class ArrivalDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return payouts that are expected to arrive during the given date interval. + sig { returns(T.any(::Stripe::Payout::ListParams::ArrivalDate, Integer)) } + attr_accessor :arrival_date + # Only return payouts that were created during the given date interval. + sig { returns(T.any(::Stripe::Payout::ListParams::Created, Integer)) } + attr_accessor :created + # The ID of an external account - only return payouts sent to this external account. + sig { returns(String) } + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + sig { returns(String) } + attr_accessor :status + sig { + params(arrival_date: T.any(::Stripe::Payout::ListParams::ArrivalDate, Integer), created: T.any(::Stripe::Payout::ListParams::Created, Integer), destination: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + arrival_date: nil, + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # A positive integer in cents representing how much to payout. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. + sig { returns(String) } + attr_accessor :destination + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + sig { returns(String) } + attr_accessor :method + # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. + sig { returns(String) } + attr_accessor :source_type + # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, description: String, destination: String, expand: T::Array[String], metadata: T::Hash[String, String], method: String, source_type: String, statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + method: nil, + source_type: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T::Hash[String, String]).void } + def initialize(expand: nil, metadata: nil); end + end + # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. + sig { + params(params: T.any(::Stripe::Payout::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def cancel(params = {}, opts = {}); end + + # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. + sig { + params(payout: String, params: T.any(::Stripe::Payout::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def self.cancel(payout, params = {}, opts = {}); end + + # To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error. + # + # If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode. + # + # If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type. + sig { + params(params: T.any(::Stripe::Payout::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. + sig { + params(params: T.any(::Stripe::Payout::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. + # + # By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. + sig { + params(params: T.any(::Stripe::Payout::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def reverse(params = {}, opts = {}); end + + # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. + # + # By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. + sig { + params(payout: String, params: T.any(::Stripe::Payout::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def self.reverse(payout, params = {}, opts = {}); end + + # Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. + sig { + params(id: String, params: T.any(::Stripe::Payout::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/person.rbi b/rbi/stripe/resources/person.rbi index 0c747f1d8..73402c18c 100644 --- a/rbi/stripe/resources/person.rbi +++ b/rbi/stripe/resources/person.rbi @@ -11,285 +11,361 @@ module Stripe class Person < APIResource class AdditionalTosAcceptances < Stripe::StripeObject class Account < Stripe::StripeObject + # The Unix timestamp marking when the legal guardian accepted the service agreement. sig { returns(T.nilable(Integer)) } attr_reader :date + # The IP address from which the legal guardian accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :ip + # The user agent of the browser from which the legal guardian accepted the service agreement. sig { returns(T.nilable(String)) } attr_reader :user_agent end + # Details on the legal guardian's acceptance of the main Stripe service agreement. sig { returns(T.nilable(Account)) } attr_reader :account end class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class AddressKana < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class AddressKanji < Stripe::StripeObject + # City/Ward. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Block/Building number. sig { returns(T.nilable(String)) } attr_reader :line1 + # Building details. sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # Prefecture. sig { returns(T.nilable(String)) } attr_reader :state + # Town/cho-me. sig { returns(T.nilable(String)) } attr_reader :town end class Dob < Stripe::StripeObject + # The day of birth, between 1 and 31. sig { returns(T.nilable(Integer)) } attr_reader :day + # The month of birth, between 1 and 12. sig { returns(T.nilable(Integer)) } attr_reader :month + # The four-digit year of birth. sig { returns(T.nilable(Integer)) } attr_reader :year end class FutureRequirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `future_requirements[current_deadline]`, these fields will transition to the main `requirements` hash, and may immediately become `past_due`, but the account may also be given a grace period depending on the account's enablement state prior to transition. sig { returns(T::Array[String]) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `future_requirements[current_deadline]` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by the account's `requirements.current_deadline`. These fields need to be collected to enable the person's account. New fields will never appear here; `future_requirements.past_due` will always be a subset of `requirements.past_due`. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due` or `currently_due`. Fields might appear in `eventually_due` or `currently_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class RegisteredAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class Relationship < Stripe::StripeObject + # Whether the person is the authorizer of the account's representative. sig { returns(T.nilable(T::Boolean)) } attr_reader :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. sig { returns(T.nilable(T::Boolean)) } attr_reader :director + # Whether the person has significant responsibility to control, manage, or direct the organization. sig { returns(T.nilable(T::Boolean)) } attr_reader :executive + # Whether the person is the legal guardian of the account's representative. sig { returns(T.nilable(T::Boolean)) } attr_reader :legal_guardian + # Whether the person is an owner of the account’s legal entity. sig { returns(T.nilable(T::Boolean)) } attr_reader :owner + # The percent owned by the person of the account's legal entity. sig { returns(T.nilable(Float)) } attr_reader :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. sig { returns(T.nilable(T::Boolean)) } attr_reader :representative + # The person's title (e.g., CEO, Support Engineer). sig { returns(T.nilable(String)) } attr_reader :title end class Requirements < Stripe::StripeObject class Alternative < Stripe::StripeObject + # Fields that can be provided to satisfy all fields in `original_fields_due`. sig { returns(T::Array[String]) } attr_reader :alternative_fields_due + # Fields that are due and can be satisfied by providing all fields in `alternative_fields_due`. sig { returns(T::Array[String]) } attr_reader :original_fields_due end class Error < Stripe::StripeObject + # The code for the type of error. sig { returns(String) } attr_reader :code + # An informative message that indicates the error type and provides additional details about the error. sig { returns(String) } attr_reader :reason + # The specific user onboarding requirement field (in the requirements hash) that needs to be resolved. sig { returns(String) } attr_reader :requirement end + # Fields that are due and can be satisfied by providing the corresponding alternative fields instead. sig { returns(T.nilable(T::Array[Alternative])) } attr_reader :alternatives + # Fields that need to be collected to keep the person's account enabled. If not collected by the account's `current_deadline`, these fields appear in `past_due` as well, and the account is disabled. sig { returns(T::Array[String]) } attr_reader :currently_due + # Fields that are `currently_due` and need to be collected again because validation or verification failed. sig { returns(T::Array[Error]) } attr_reader :errors + # Fields that need to be collected assuming all volume thresholds are reached. As they become required, they appear in `currently_due` as well, and the account's `current_deadline` becomes set. sig { returns(T::Array[String]) } attr_reader :eventually_due + # Fields that weren't collected by the account's `current_deadline`. These fields need to be collected to enable the person's account. sig { returns(T::Array[String]) } attr_reader :past_due + # Fields that might become required depending on the results of verification or review. It's an empty array unless an asynchronous verification is pending. If verification fails, these fields move to `eventually_due`, `currently_due`, or `past_due`. Fields might appear in `eventually_due`, `currently_due`, or `past_due` and in `pending_verification` if verification fails but another verification is still pending. sig { returns(T::Array[String]) } attr_reader :pending_verification end class Verification < Stripe::StripeObject class AdditionalDocument < Stripe::StripeObject + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end class Document < Stripe::StripeObject + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :back + # A user-displayable string describing the verification state of this document. For example, if a document is uploaded and the picture is too fuzzy, this may say "Identity document is too unclear to read". sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_corrupt`, `document_country_not_supported`, `document_expired`, `document_failed_copy`, `document_failed_other`, `document_failed_test_mode`, `document_fraudulent`, `document_failed_greyscale`, `document_incomplete`, `document_invalid`, `document_manipulated`, `document_missing_back`, `document_missing_front`, `document_not_readable`, `document_not_uploaded`, `document_photo_mismatch`, `document_too_large`, or `document_type_not_supported`. A machine-readable code specifying the verification state for this document. sig { returns(T.nilable(String)) } attr_reader :details_code + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. sig { returns(T.nilable(T.any(String, Stripe::File))) } attr_reader :front end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. sig { returns(T.nilable(AdditionalDocument)) } attr_reader :additional_document + # A user-displayable string describing the verification state for the person. For example, this may say "Provided identity information could not be verified". sig { returns(T.nilable(String)) } attr_reader :details + # One of `document_address_mismatch`, `document_dob_mismatch`, `document_duplicate_type`, `document_id_number_mismatch`, `document_name_mismatch`, `document_nationality_mismatch`, `failed_keyed_identity`, or `failed_other`. A machine-readable code specifying the verification state for the person. sig { returns(T.nilable(String)) } attr_reader :details_code + # Attribute for field document sig { returns(Document) } attr_reader :document + # The state of verification for the person. Possible values are `unverified`, `pending`, or `verified`. sig { returns(String) } attr_reader :status end - sig { returns(String) } # The account the person is associated with. + sig { returns(String) } attr_reader :account - sig { returns(AdditionalTosAcceptances) } # Attribute for field additional_tos_acceptances + sig { returns(AdditionalTosAcceptances) } attr_reader :additional_tos_acceptances - sig { returns(Address) } # Attribute for field address + sig { returns(Address) } attr_reader :address - sig { returns(T.nilable(AddressKana)) } # The Kana variation of the person's address (Japan only). + sig { returns(T.nilable(AddressKana)) } attr_reader :address_kana - sig { returns(T.nilable(AddressKanji)) } # The Kanji variation of the person's address (Japan only). + sig { returns(T.nilable(AddressKanji)) } attr_reader :address_kanji - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(Dob) } # Attribute for field dob + sig { returns(Dob) } attr_reader :dob - sig { returns(T.nilable(String)) } # The person's email address. - attr_reader :email sig { returns(T.nilable(String)) } + attr_reader :email # The person's first name. - attr_reader :first_name sig { returns(T.nilable(String)) } + attr_reader :first_name # The Kana variation of the person's first name (Japan only). - attr_reader :first_name_kana sig { returns(T.nilable(String)) } + attr_reader :first_name_kana # The Kanji variation of the person's first name (Japan only). + sig { returns(T.nilable(String)) } attr_reader :first_name_kanji - sig { returns(T::Array[String]) } # A list of alternate names or aliases that the person is known by. + sig { returns(T::Array[String]) } attr_reader :full_name_aliases - sig { returns(T.nilable(FutureRequirements)) } # Information about the [upcoming new requirements for this person](https://stripe.com/docs/connect/custom-accounts/future-requirements), including what information needs to be collected, and by when. + sig { returns(T.nilable(FutureRequirements)) } attr_reader :future_requirements - sig { returns(T.nilable(String)) } # The person's gender. + sig { returns(T.nilable(String)) } attr_reader :gender - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Whether the person's `id_number` was provided. True if either the full ID number was provided or if only the required part of the ID number was provided (ex. last four of an individual's SSN for the US indicated by `ssn_last_4_provided`). - attr_reader :id_number_provided sig { returns(T::Boolean) } + attr_reader :id_number_provided # Whether the person's `id_number_secondary` was provided. + sig { returns(T::Boolean) } attr_reader :id_number_secondary_provided - sig { returns(T.nilable(String)) } # The person's last name. - attr_reader :last_name sig { returns(T.nilable(String)) } + attr_reader :last_name # The Kana variation of the person's last name (Japan only). - attr_reader :last_name_kana sig { returns(T.nilable(String)) } + attr_reader :last_name_kana # The Kanji variation of the person's last name (Japan only). - attr_reader :last_name_kanji sig { returns(T.nilable(String)) } + attr_reader :last_name_kanji # The person's maiden name. + sig { returns(T.nilable(String)) } attr_reader :maiden_name - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } # The country where the person is a national. + sig { returns(T.nilable(String)) } attr_reader :nationality - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The person's phone number. + sig { returns(T.nilable(String)) } attr_reader :phone - sig { returns(String) } # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } attr_reader :political_exposure - sig { returns(RegisteredAddress) } # Attribute for field registered_address + sig { returns(RegisteredAddress) } attr_reader :registered_address - sig { returns(Relationship) } # Attribute for field relationship + sig { returns(Relationship) } attr_reader :relationship - sig { returns(T.nilable(Requirements)) } # Information about the requirements for this person, including what information needs to be collected, and by when. + sig { returns(T.nilable(Requirements)) } attr_reader :requirements - sig { returns(T::Boolean) } # Whether the last four digits of the person's Social Security number have been provided (U.S. only). + sig { returns(T::Boolean) } attr_reader :ssn_last_4_provided - sig { returns(Verification) } # Attribute for field verification + sig { returns(Verification) } attr_reader :verification - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/plan.rbi b/rbi/stripe/resources/plan.rbi index 247c12a81..1cc5e81ea 100644 --- a/rbi/stripe/resources/plan.rbi +++ b/rbi/stripe/resources/plan.rbi @@ -13,88 +13,373 @@ module Stripe # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). class Plan < APIResource class Tier < Stripe::StripeObject + # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end class TransformUsage < Stripe::StripeObject + # Divide usage by this number. sig { returns(Integer) } attr_reader :divide_by + # After division, either round the result `up` or `down`. sig { returns(String) } attr_reader :round end - sig { returns(T::Boolean) } # Whether the plan can be used for new purchases. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(T.nilable(String)) } # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + sig { returns(T.nilable(String)) } attr_reader :aggregate_usage - sig { returns(T.nilable(Integer)) } # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(Integer)) } attr_reader :amount - sig { returns(T.nilable(String)) } # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(String)) } attr_reader :amount_decimal - sig { returns(String) } # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } attr_reader :billing_scheme - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. + sig { returns(String) } attr_reader :interval - sig { returns(Integer) } # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. + sig { returns(Integer) } attr_reader :interval_count - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(String)) } # The meter tracking the usage of a metered price - attr_reader :meter sig { returns(T.nilable(String)) } + attr_reader :meter # A brief description of the plan, hidden from customers. + sig { returns(T.nilable(String)) } attr_reader :nickname - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Product))) } # The product whose pricing this plan determines. + sig { returns(T.nilable(T.any(String, Stripe::Product))) } attr_reader :product - sig { returns(T::Array[Tier]) } # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[Tier]) } attr_reader :tiers - sig { returns(T.nilable(String)) } # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + sig { returns(T.nilable(String)) } attr_reader :tiers_mode - sig { returns(T.nilable(TransformUsage)) } # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + sig { returns(T.nilable(TransformUsage)) } attr_reader :transform_usage - sig { returns(T.nilable(Integer)) } # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days - sig { returns(String) } # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + sig { returns(String) } attr_reader :usage_type - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Whether the plan is currently available for new subscriptions. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A brief description of the plan, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + sig { returns(String) } + attr_accessor :product + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(Integer) } + attr_accessor :trial_period_days + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), nickname: String, product: String, trial_period_days: Integer).void + } + def initialize( + active: nil, + expand: nil, + metadata: nil, + nickname: nil, + product: nil, + trial_period_days: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + sig { returns(T::Boolean) } + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::Plan::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return plans for the given product. + sig { returns(String) } + attr_accessor :product + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, created: T.any(::Stripe::Plan::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, product: String, starting_after: String).void + } + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + product: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Product < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(String) } + attr_accessor :unit_label + sig { + params(active: T::Boolean, id: String, metadata: T::Hash[String, String], name: String, statement_descriptor: String, tax_code: String, unit_label: String).void + } + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + class TransformUsage < Stripe::RequestParams + # Divide usage by this number. + sig { returns(Integer) } + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + sig { returns(String) } + attr_accessor :round + sig { params(divide_by: Integer, round: String).void } + def initialize(divide_by: nil, round: nil); end + end + # Whether the plan is currently available for new subscriptions. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + sig { returns(String) } + attr_accessor :aggregate_usage + # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. + sig { returns(Integer) } + attr_accessor :amount + # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + sig { returns(String) } + attr_accessor :amount_decimal + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + sig { returns(String) } + attr_accessor :id + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The meter tracking the usage of a metered price + sig { returns(String) } + attr_accessor :meter + # A brief description of the plan, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # Attribute for param field product + sig { returns(T.any(::Stripe::Plan::CreateParams::Product, String)) } + attr_accessor :product + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::Plan::CreateParams::Tier]) } + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + sig { returns(String) } + attr_accessor :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + sig { returns(::Stripe::Plan::CreateParams::TransformUsage) } + attr_accessor :transform_usage + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(Integer) } + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + sig { returns(String) } + attr_accessor :usage_type + sig { + params(active: T::Boolean, aggregate_usage: String, amount: Integer, amount_decimal: String, billing_scheme: String, currency: String, expand: T::Array[String], id: String, interval: String, interval_count: Integer, metadata: T.nilable(T::Hash[String, String]), meter: String, nickname: String, product: T.any(::Stripe::Plan::CreateParams::Product, String), tiers: T::Array[::Stripe::Plan::CreateParams::Tier], tiers_mode: String, transform_usage: ::Stripe::Plan::CreateParams::TransformUsage, trial_period_days: Integer, usage_type: String).void + } + def initialize( + active: nil, + aggregate_usage: nil, + amount: nil, + amount_decimal: nil, + billing_scheme: nil, + currency: nil, + expand: nil, + id: nil, + interval: nil, + interval_count: nil, + metadata: nil, + meter: nil, + nickname: nil, + product: nil, + tiers: nil, + tiers_mode: nil, + transform_usage: nil, + trial_period_days: nil, + usage_type: nil + ); end + end + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + sig { + params(params: T.any(::Stripe::Plan::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def self.create(params = {}, opts = {}); end + + # Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. + sig { + params(id: String, params: T.any(::Stripe::Plan::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def self.delete(id, params = {}, opts = {}); end + + # Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. + sig { + params(params: T.any(::Stripe::Plan::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your plans. + sig { + params(params: T.any(::Stripe::Plan::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. + sig { + params(id: String, params: T.any(::Stripe::Plan::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/price.rbi b/rbi/stripe/resources/price.rbi index 7e012570b..2e2b0fde0 100644 --- a/rbi/stripe/resources/price.rbi +++ b/rbi/stripe/resources/price.rbi @@ -12,152 +12,718 @@ module Stripe class Price < APIResource class CurrencyOptions < Stripe::StripeObject class CustomUnitAmount < Stripe::StripeObject + # The maximum unit amount the customer can specify for this item. sig { returns(T.nilable(Integer)) } attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. sig { returns(T.nilable(Integer)) } attr_reader :minimum + # The starting unit amount which can be updated by the customer. sig { returns(T.nilable(Integer)) } attr_reader :preset end class Tier < Stripe::StripeObject + # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. sig { returns(T.nilable(CustomUnitAmount)) } attr_reader :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. sig { returns(T.nilable(String)) } attr_reader :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. sig { returns(T::Array[Tier]) } attr_reader :tiers + # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal end class CustomUnitAmount < Stripe::StripeObject + # The maximum unit amount the customer can specify for this item. sig { returns(T.nilable(Integer)) } attr_reader :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. sig { returns(T.nilable(Integer)) } attr_reader :minimum + # The starting unit amount which can be updated by the customer. sig { returns(T.nilable(Integer)) } attr_reader :preset end class MigrateTo < Stripe::StripeObject + # The behavior controlling at what point in the subscription lifecycle to migrate the price sig { returns(String) } attr_reader :behavior + # The unix timestamp after at which subscriptions will start to migrate to the new price. sig { returns(Integer) } attr_reader :effective_after + # The id of the price being migrated to sig { returns(String) } attr_reader :price end class Recurring < Stripe::StripeObject + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. sig { returns(T.nilable(String)) } attr_reader :aggregate_usage + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } attr_reader :interval_count + # The meter tracking the usage of a metered price sig { returns(T.nilable(String)) } attr_reader :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. sig { returns(String) } attr_reader :usage_type end class Tier < Stripe::StripeObject + # Price for the entire tier. sig { returns(T.nilable(Integer)) } attr_reader :flat_amount + # Same as `flat_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :flat_amount_decimal + # Per unit price for units relevant to the tier. sig { returns(T.nilable(Integer)) } attr_reader :unit_amount + # Same as `unit_amount`, but contains a decimal value with at most 12 decimal places. sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal + # Up to and including to this quantity will be contained in the tier. sig { returns(T.nilable(Integer)) } attr_reader :up_to end class TransformQuantity < Stripe::StripeObject + # Divide usage by this number. sig { returns(Integer) } attr_reader :divide_by + # After division, either round the result `up` or `down`. sig { returns(String) } attr_reader :round end - sig { returns(T::Boolean) } # Whether the price can be used for new purchases. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(String) } # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } attr_reader :billing_scheme - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T::Hash[String, CurrencyOptions]) } # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options - sig { returns(T.nilable(CustomUnitAmount)) } # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(T.nilable(CustomUnitAmount)) } attr_reader :custom_unit_amount - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + sig { returns(T.nilable(String)) } attr_reader :lookup_key - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(MigrateTo)) } # Subscriptions using this price will be migrated to use the new referenced price. + sig { returns(T.nilable(MigrateTo)) } attr_reader :migrate_to - sig { returns(T.nilable(String)) } # A brief description of the price, hidden from customers. + sig { returns(T.nilable(String)) } attr_reader :nickname - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Product)) } # The ID of the product this price is associated with. + sig { returns(T.any(String, Stripe::Product)) } attr_reader :product - sig { returns(T.nilable(Recurring)) } # The recurring components of a price such as `interval` and `usage_type`. + sig { returns(T.nilable(Recurring)) } attr_reader :recurring - sig { returns(T.nilable(String)) } # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(T.nilable(String)) } attr_reader :tax_behavior - sig { returns(T::Array[Tier]) } # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[Tier]) } attr_reader :tiers - sig { returns(T.nilable(String)) } # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price. In `graduated` tiering, pricing can change as the quantity grows. + sig { returns(T.nilable(String)) } attr_reader :tiers_mode - sig { returns(T.nilable(TransformQuantity)) } # Apply a transformation to the reported usage or set quantity before computing the amount billed. Cannot be combined with `tiers`. + sig { returns(T.nilable(TransformQuantity)) } attr_reader :transform_quantity - sig { returns(String) } # One of `one_time` or `recurring` depending on whether the price is for a one-time purchase or a recurring (subscription) purchase. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(Integer)) } # The unit amount in cents (or local equivalent) to be charged, represented as a whole integer if possible. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(Integer)) } attr_reader :unit_amount - sig { returns(T.nilable(String)) } # The unit amount in cents (or local equivalent) to be charged, represented as a decimal string with at most 12 decimal places. Only set if `billing_scheme=per_unit`. + sig { returns(T.nilable(String)) } attr_reader :unit_amount_decimal - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Recurring < Stripe::RequestParams + # Filter by billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # Filter by the price's meter. + sig { returns(String) } + attr_accessor :meter + # Filter by the usage type for this price. Can be either `metered` or `licensed`. + sig { returns(String) } + attr_accessor :usage_type + sig { params(interval: String, meter: String, usage_type: String).void } + def initialize(interval: nil, meter: nil, usage_type: nil); end + end + # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + sig { returns(T::Boolean) } + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::Price::ListParams::Created, Integer)) } + attr_accessor :created + # Only return prices for the given currency. + sig { returns(String) } + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. + sig { returns(T::Array[String]) } + attr_accessor :lookup_keys + # Only return prices for the given product. + sig { returns(String) } + attr_accessor :product + # Only return prices with these recurring fields. + sig { returns(::Stripe::Price::ListParams::Recurring) } + attr_accessor :recurring + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return prices of type `recurring` or `one_time`. + sig { returns(String) } + attr_accessor :type + sig { + params(active: T::Boolean, created: T.any(::Stripe::Price::ListParams::Created, Integer), currency: String, ending_before: String, expand: T::Array[String], limit: Integer, lookup_keys: T::Array[String], product: String, recurring: ::Stripe::Price::ListParams::Recurring, starting_after: String, type: String).void + } + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + product: nil, + recurring: nil, + starting_after: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::Price::CreateParams::CurrencyOptions::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::Price::CreateParams::CurrencyOptions::Tier]) } + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(custom_unit_amount: ::Stripe::Price::CreateParams::CurrencyOptions::CustomUnitAmount, tax_behavior: String, tiers: T::Array[::Stripe::Price::CreateParams::CurrencyOptions::Tier], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class ProductData < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(String) } + attr_accessor :unit_label + sig { + params(active: T::Boolean, id: String, metadata: T::Hash[String, String], name: String, statement_descriptor: String, tax_code: String, unit_label: String).void + } + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ); end + end + class Recurring < Stripe::RequestParams + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. + sig { returns(String) } + attr_accessor :aggregate_usage + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + # The meter tracking the usage of a metered price + sig { returns(String) } + attr_accessor :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(Integer) } + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + sig { returns(String) } + attr_accessor :usage_type + sig { + params(aggregate_usage: String, interval: String, interval_count: Integer, meter: String, trial_period_days: Integer, usage_type: String).void + } + def initialize( + aggregate_usage: nil, + interval: nil, + interval_count: nil, + meter: nil, + trial_period_days: nil, + usage_type: nil + ); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + class TransformQuantity < Stripe::RequestParams + # Divide usage by this number. + sig { returns(Integer) } + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + sig { returns(String) } + attr_accessor :round + sig { params(divide_by: Integer, round: String).void } + def initialize(divide_by: nil, round: nil); end + end + # Whether the price can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, ::Stripe::Price::CreateParams::CurrencyOptions]) } + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::Price::CreateParams::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A brief description of the price, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # These fields can be used to create a new product that this price will belong to. + sig { returns(::Stripe::Price::CreateParams::ProductData) } + attr_accessor :product_data + # The recurring components of a price such as `interval` and `usage_type`. + sig { returns(::Stripe::Price::CreateParams::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::Price::CreateParams::Tier]) } + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + sig { returns(String) } + attr_accessor :tiers_mode + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + sig { returns(::Stripe::Price::CreateParams::TransformQuantity) } + attr_accessor :transform_quantity + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(active: T::Boolean, billing_scheme: String, currency: String, currency_options: T::Hash[String, ::Stripe::Price::CreateParams::CurrencyOptions], custom_unit_amount: ::Stripe::Price::CreateParams::CustomUnitAmount, expand: T::Array[String], lookup_key: String, metadata: T::Hash[String, String], nickname: String, product: String, product_data: ::Stripe::Price::CreateParams::ProductData, recurring: ::Stripe::Price::CreateParams::Recurring, tax_behavior: String, tiers: T::Array[::Stripe::Price::CreateParams::Tier], tiers_mode: String, transfer_lookup_key: T::Boolean, transform_quantity: ::Stripe::Price::CreateParams::TransformQuantity, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + active: nil, + billing_scheme: nil, + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + nickname: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + tiers: nil, + tiers_mode: nil, + transfer_lookup_key: nil, + transform_quantity: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::Price::UpdateParams::CurrencyOptions::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::Price::UpdateParams::CurrencyOptions::Tier]) } + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(custom_unit_amount: ::Stripe::Price::UpdateParams::CurrencyOptions::CustomUnitAmount, tax_behavior: String, tiers: T::Array[::Stripe::Price::UpdateParams::CurrencyOptions::Tier], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class MigrateTo < Stripe::RequestParams + # The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. + sig { returns(String) } + attr_accessor :behavior + # The time after which subscriptions should start using the new price. + sig { returns(Integer) } + attr_accessor :effective_after + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + sig { params(behavior: String, effective_after: Integer, price: String).void } + def initialize(behavior: nil, effective_after: nil, price: nil); end + end + # Whether the price can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T.nilable(T::Hash[String, ::Stripe::Price::UpdateParams::CurrencyOptions])) } + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # If specified, subscriptions using this price will be updated to use the new referenced price. + sig { returns(T.nilable(::Stripe::Price::UpdateParams::MigrateTo)) } + attr_accessor :migrate_to + # A brief description of the price, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + sig { + params(active: T::Boolean, currency_options: T.nilable(T::Hash[String, ::Stripe::Price::UpdateParams::CurrencyOptions]), expand: T::Array[String], lookup_key: String, metadata: T.nilable(T::Hash[String, String]), migrate_to: T.nilable(::Stripe::Price::UpdateParams::MigrateTo), nickname: String, tax_behavior: String, transfer_lookup_key: T::Boolean).void + } + def initialize( + active: nil, + currency_options: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + migrate_to: nil, + nickname: nil, + tax_behavior: nil, + transfer_lookup_key: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + # Creates a new price for an existing product. The price can be recurring or one-time. + sig { + params(params: T.any(::Stripe::Price::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. + sig { + params(params: T.any(::Stripe::Price::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Price::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/product.rbi b/rbi/stripe/resources/product.rbi index ce669dfed..52c91a79a 100644 --- a/rbi/stripe/resources/product.rbi +++ b/rbi/stripe/resources/product.rbi @@ -13,99 +13,601 @@ module Stripe # and more about [Products and Prices](https://stripe.com/docs/products-prices/overview) class Product < APIResource class MarketingFeature < Stripe::StripeObject + # The marketing feature name. Up to 80 characters long. sig { returns(String) } attr_reader :name end class PackageDimensions < Stripe::StripeObject + # Height, in inches. sig { returns(Float) } attr_reader :height + # Length, in inches. sig { returns(Float) } attr_reader :length + # Weight, in ounces. sig { returns(Float) } attr_reader :weight + # Width, in inches. sig { returns(Float) } attr_reader :width end class Provisioning < Stripe::StripeObject class GiftCard < Stripe::StripeObject class FixedAmount < Stripe::StripeObject + # The initial amount with which the provisioned gift card will be created. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency end + # Attribute for field fixed_amount sig { returns(T.nilable(FixedAmount)) } attr_reader :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. sig { returns(String) } attr_reader :type end + # Attribute for field gift_card sig { returns(T.nilable(GiftCard)) } attr_reader :gift_card + # The type of provisioning, only `gift_card` currently supported. sig { returns(String) } attr_reader :type end - sig { returns(T::Boolean) } # Whether the product is currently available for purchase. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Price))) } # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + sig { returns(T.nilable(T.any(String, Stripe::Price))) } attr_reader :default_price - sig { returns(T.nilable(String)) } # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Array[String]) } # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } attr_reader :images - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Array[MarketingFeature]) } # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + sig { returns(T::Array[MarketingFeature]) } attr_reader :marketing_features - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The product's name, meant to be displayable to the customer. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(PackageDimensions)) } # The dimensions of this product for shipping purposes. + sig { returns(T.nilable(PackageDimensions)) } attr_reader :package_dimensions - sig { returns(T.nilable(Provisioning)) } # Provisioning configuration for this product. + sig { returns(T.nilable(Provisioning)) } attr_reader :provisioning - sig { returns(T.nilable(T::Boolean)) } # Whether this product is shipped (i.e., physical goods). + sig { returns(T.nilable(T::Boolean)) } attr_reader :shippable - sig { returns(T.nilable(String)) } # Extra information about a product which will appear on your customer's credit card statement. In the case that multiple products are billed at once, the first statement descriptor will be used. Only used for subscription payments. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } attr_reader :tax_code - sig { returns(String) } # The type of the product. The product is either of type `good`, which is eligible for use with Orders and SKUs, or `service`, which is eligible for use with Subscriptions and Plans. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(T.nilable(String)) } attr_reader :unit_label - sig { returns(Integer) } # Time at which the object was last updated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :updated - sig { returns(T.nilable(String)) } # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } attr_reader :url - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + # Whether the product is available for purchase. + sig { returns(T::Boolean) } + attr_accessor :active + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + sig { returns(String) } + attr_accessor :default_price + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + sig { returns(T.nilable(T::Array[::Stripe::Product::UpdateParams::MarketingFeature])) } + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { returns(T.nilable(::Stripe::Product::UpdateParams::PackageDimensions)) } + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + sig { returns(T.nilable(String)) } + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } + attr_accessor :url + sig { + params(active: T::Boolean, default_price: String, description: T.nilable(String), expand: T::Array[String], images: T.nilable(T::Array[String]), marketing_features: T.nilable(T::Array[::Stripe::Product::UpdateParams::MarketingFeature]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::Product::UpdateParams::PackageDimensions), shippable: T::Boolean, statement_descriptor: String, tax_code: T.nilable(String), unit_label: T.nilable(String), url: T.nilable(String)).void + } + def initialize( + active: nil, + default_price: nil, + description: nil, + expand: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil, + url: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + sig { returns(T::Boolean) } + attr_accessor :active + # Only return products that were created during the given date interval. + sig { returns(T.any(::Stripe::Product::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). + sig { returns(T::Array[String]) } + attr_accessor :ids + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return products that can be shipped (i.e., physical, not digital products). + sig { returns(T::Boolean) } + attr_accessor :shippable + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return products of this type. + sig { returns(String) } + attr_accessor :type + # Only return products with the given url. + sig { returns(String) } + attr_accessor :url + sig { + params(active: T::Boolean, created: T.any(::Stripe::Product::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], ids: T::Array[String], limit: Integer, shippable: T::Boolean, starting_after: String, type: String, url: String).void + } + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + ids: nil, + limit: nil, + shippable: nil, + starting_after: nil, + type: nil, + url: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DefaultPriceData < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { + returns(::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount) + } + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { + returns(T::Array[::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::Tier]) + } + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(custom_unit_amount: ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount, tax_behavior: String, tiers: T::Array[::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions::Tier], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions]) + } + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::Product::CreateParams::DefaultPriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, currency_options: T::Hash[String, ::Stripe::Product::CreateParams::DefaultPriceData::CurrencyOptions], custom_unit_amount: ::Stripe::Product::CreateParams::DefaultPriceData::CustomUnitAmount, recurring: ::Stripe::Product::CreateParams::DefaultPriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + class Provisioning < Stripe::RequestParams + class GiftCard < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + # The initial amount with which the provisioned gift card will be created. + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + # Attribute for param field fixed_amount + sig { returns(::Stripe::Product::CreateParams::Provisioning::GiftCard::FixedAmount) } + attr_accessor :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. + sig { returns(String) } + attr_accessor :type + sig { + params(fixed_amount: ::Stripe::Product::CreateParams::Provisioning::GiftCard::FixedAmount, type: String).void + } + def initialize(fixed_amount: nil, type: nil); end + end + # Attribute for param field gift_card + sig { returns(::Stripe::Product::CreateParams::Provisioning::GiftCard) } + attr_accessor :gift_card + # The type of provisioning, only `gift_card` currently supported. + sig { returns(String) } + attr_accessor :type + sig { + params(gift_card: ::Stripe::Product::CreateParams::Provisioning::GiftCard, type: String).void + } + def initialize(gift_card: nil, type: nil); end + end + # Whether the product is currently available for purchase. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + sig { returns(::Stripe::Product::CreateParams::DefaultPriceData) } + attr_accessor :default_price_data + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. + sig { returns(String) } + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + sig { returns(T::Array[::Stripe::Product::CreateParams::MarketingFeature]) } + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { returns(::Stripe::Product::CreateParams::PackageDimensions) } + attr_accessor :package_dimensions + # Provisioning configuration for this product. + sig { returns(::Stripe::Product::CreateParams::Provisioning) } + attr_accessor :provisioning + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. Only used for subscription payments. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + sig { returns(String) } + attr_accessor :type + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(String) } + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + sig { returns(String) } + attr_accessor :url + sig { + params(active: T::Boolean, default_price_data: ::Stripe::Product::CreateParams::DefaultPriceData, description: String, expand: T::Array[String], id: String, images: T::Array[String], marketing_features: T::Array[::Stripe::Product::CreateParams::MarketingFeature], metadata: T::Hash[String, String], name: String, package_dimensions: ::Stripe::Product::CreateParams::PackageDimensions, provisioning: ::Stripe::Product::CreateParams::Provisioning, shippable: T::Boolean, statement_descriptor: String, tax_code: String, type: String, unit_label: String, url: String).void + } + def initialize( + active: nil, + default_price_data: nil, + description: nil, + expand: nil, + id: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + provisioning: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + type: nil, + unit_label: nil, + url: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + # Creates a new product object. + sig { + params(params: T.any(::Stripe::Product::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def self.create(params = {}, opts = {}); end + + # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. + sig { + params(id: String, params: T.any(::Stripe::Product::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def self.delete(id, params = {}, opts = {}); end + + # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. + sig { + params(params: T.any(::Stripe::Product::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. + sig { + params(params: T.any(::Stripe::Product::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Product::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/product_feature.rbi b/rbi/stripe/resources/product_feature.rbi index cdb0717a8..09a60cb36 100644 --- a/rbi/stripe/resources/product_feature.rbi +++ b/rbi/stripe/resources/product_feature.rbi @@ -6,21 +6,21 @@ module Stripe # A product_feature represents an attachment between a feature and a product. # When a product is purchased that has a feature attached, Stripe will create an entitlement to the feature for the purchasing customer. class ProductFeature < APIResource - sig { returns(Stripe::Entitlements::Feature) } # A feature represents a monetizable ability or functionality in your system. # Features can be assigned to products, and when those products are purchased, Stripe will create an entitlement to the feature for the purchasing customer. + sig { returns(Stripe::Entitlements::Feature) } attr_reader :entitlement_feature - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted end end \ No newline at end of file diff --git a/rbi/stripe/resources/promotion_code.rbi b/rbi/stripe/resources/promotion_code.rbi index 4c84a56a7..d9a4b3065 100644 --- a/rbi/stripe/resources/promotion_code.rbi +++ b/rbi/stripe/resources/promotion_code.rbi @@ -8,58 +8,259 @@ module Stripe class PromotionCode < APIResource class Restrictions < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). sig { returns(Integer) } attr_reader :minimum_amount end + # Promotion code restrictions defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices sig { returns(T::Boolean) } attr_reader :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). sig { returns(T.nilable(Integer)) } attr_reader :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount sig { returns(T.nilable(String)) } attr_reader :minimum_amount_currency end - sig { returns(T::Boolean) } # Whether the promotion code is currently active. A promotion code is only active if the coupon is also valid. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(String) } # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for each customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + sig { returns(String) } attr_reader :code - sig { returns(Stripe::Coupon) } # A coupon contains information about a percent-off or amount-off discount you # might want to apply to a customer. Coupons may be applied to [subscriptions](https://stripe.com/docs/api#subscriptions), [invoices](https://stripe.com/docs/api#invoices), # [checkout sessions](https://stripe.com/docs/api/checkout/sessions), [quotes](https://stripe.com/docs/api#quotes), and more. Coupons do not work with conventional one-off [charges](https://stripe.com/docs/api#create_charge) or [payment intents](https://stripe.com/docs/api/payment_intents). + sig { returns(Stripe::Coupon) } attr_reader :coupon - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The customer that this promotion code can be used by. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(Integer)) } # Date at which the promotion code can no longer be redeemed. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(Integer)) } # Maximum number of times this promotion code can be redeemed. + sig { returns(T.nilable(Integer)) } attr_reader :max_redemptions - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Restrictions) } # Attribute for field restrictions + sig { returns(Restrictions) } attr_reader :restrictions - sig { returns(Integer) } # Number of times this promotion code has been used. + sig { returns(Integer) } attr_reader :times_redeemed + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Filter promotion codes by whether they are active. + sig { returns(T::Boolean) } + attr_accessor :active + # Only return promotion codes that have this case-insensitive code. + sig { returns(String) } + attr_accessor :code + # Only return promotion codes for this coupon. + sig { returns(String) } + attr_accessor :coupon + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::PromotionCode::ListParams::Created, Integer)) } + attr_accessor :created + # Only return promotion codes that are restricted to this customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, code: String, coupon: String, created: T.any(::Stripe::PromotionCode::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + code: nil, + coupon: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + sig { returns(Integer) } + attr_accessor :minimum_amount + sig { params(minimum_amount: Integer).void } + def initialize(minimum_amount: nil); end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::PromotionCode::CreateParams::Restrictions::CurrencyOptions]) + } + attr_accessor :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + sig { returns(T::Boolean) } + attr_accessor :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + sig { returns(Integer) } + attr_accessor :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + sig { returns(String) } + attr_accessor :minimum_amount_currency + sig { + params(currency_options: T::Hash[String, ::Stripe::PromotionCode::CreateParams::Restrictions::CurrencyOptions], first_time_transaction: T::Boolean, minimum_amount: Integer, minimum_amount_currency: String).void + } + def initialize( + currency_options: nil, + first_time_transaction: nil, + minimum_amount: nil, + minimum_amount_currency: nil + ); end + end + # Whether the promotion code is currently active. + sig { returns(T::Boolean) } + attr_accessor :active + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + # + # If left blank, we will generate one automatically. + sig { returns(String) } + attr_accessor :code + # The coupon for this promotion code. + sig { returns(String) } + attr_accessor :coupon + # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + sig { returns(Integer) } + attr_accessor :expires_at + # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. + sig { returns(Integer) } + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + sig { returns(::Stripe::PromotionCode::CreateParams::Restrictions) } + attr_accessor :restrictions + sig { + params(active: T::Boolean, code: String, coupon: String, customer: String, expand: T::Array[String], expires_at: Integer, max_redemptions: Integer, metadata: T::Hash[String, String], restrictions: ::Stripe::PromotionCode::CreateParams::Restrictions).void + } + def initialize( + active: nil, + code: nil, + coupon: nil, + customer: nil, + expand: nil, + expires_at: nil, + max_redemptions: nil, + metadata: nil, + restrictions: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + sig { returns(Integer) } + attr_accessor :minimum_amount + sig { params(minimum_amount: Integer).void } + def initialize(minimum_amount: nil); end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::PromotionCode::UpdateParams::Restrictions::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(currency_options: T::Hash[String, ::Stripe::PromotionCode::UpdateParams::Restrictions::CurrencyOptions]).void + } + def initialize(currency_options: nil); end + end + # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + sig { returns(::Stripe::PromotionCode::UpdateParams::Restrictions) } + attr_accessor :restrictions + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), restrictions: ::Stripe::PromotionCode::UpdateParams::Restrictions).void + } + def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil); end + end + # A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. + sig { + params(params: T.any(::Stripe::PromotionCode::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of your promotion codes. + sig { + params(params: T.any(::Stripe::PromotionCode::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. + sig { + params(id: String, params: T.any(::Stripe::PromotionCode::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote.rbi b/rbi/stripe/resources/quote.rbi index 219e73629..496dec2e9 100644 --- a/rbi/stripe/resources/quote.rbi +++ b/rbi/stripe/resources/quote.rbi @@ -8,30 +8,40 @@ module Stripe class Quote < APIResource class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Automatically calculate taxes sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this quote. sig { returns(T.nilable(String)) } attr_reader :status end class Computed < Stripe::StripeObject class LastReestimationDetails < Stripe::StripeObject class Failed < Stripe::StripeObject + # The failure `code` is more granular than the `reason` provided and may correspond to a Stripe error code. For automation errors, this field is one of: `reverse_api_failure`, `reverse_api_deadline_exceeeded`, or `reverse_api_response_validation_error`, which are Stripe error codes and map to the error `message` field. sig { returns(T.nilable(String)) } attr_reader :failure_code + # Information derived from the `failure_code` or a freeform message that explains the error as a human-readable English string. For example, "margin ID is not a valid ID". sig { returns(T.nilable(String)) } attr_reader :message + # The reason the reestimation failed. sig { returns(String) } attr_reader :reason end + # When `status` is `failed`, provides details about the quote reestimation failure. sig { returns(T.nilable(Failed)) } attr_reader :failed + # Latest status of the reestimation. sig { returns(String) } attr_reader :status end @@ -39,43 +49,65 @@ module Stripe class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end + # Total before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The frequency at which a subscription is billed. One of `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals (specified in the `interval` attribute) between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. sig { returns(Integer) } attr_reader :interval_count + # Attribute for field total_details sig { returns(TotalDetails) } attr_reader :total_details end @@ -83,134 +115,190 @@ module Stripe class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end + # Total before any discounts or taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total after discounts and taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The line items that will appear on the next invoice after this quote is accepted. This does not include pending invoice items that exist on the customer but may still be included in the next invoice. sig { returns(Stripe::ListObject) } attr_reader :line_items + # Attribute for field total_details sig { returns(TotalDetails) } attr_reader :total_details end + # Details of the most recent reestimate of the quote's preview schedules and upcoming invoices, including the status of Stripe's calculation. sig { returns(T.nilable(LastReestimationDetails)) } attr_reader :last_reestimation_details + # The definitive totals and line items the customer will be charged on a recurring basis. Takes into account the line items with recurring prices and discounts with `duration=forever` coupons only. Defaults to `null` if no inputted line items with recurring prices. sig { returns(T.nilable(Recurring)) } attr_reader :recurring + # The time at which the quote's estimated schedules and upcoming invoices were generated. sig { returns(T.nilable(Integer)) } attr_reader :updated_at + # Attribute for field upfront sig { returns(Upfront) } attr_reader :upfront end class FromQuote < Stripe::StripeObject + # Whether this quote is a revision of a different quote. sig { returns(T::Boolean) } attr_reader :is_revision + # The quote that was cloned. sig { returns(T.any(String, Stripe::Quote)) } attr_reader :quote end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # Number of days within which a customer must pay invoices generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class StatusDetails < Stripe::StripeObject class Canceled < Stripe::StripeObject + # The reason this quote was marked as canceled. sig { returns(T.nilable(String)) } attr_reader :reason + # Time at which the quote was marked as canceled. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :transitioned_at end class Stale < Stripe::StripeObject class LastReason < Stripe::StripeObject class LinesInvalid < Stripe::StripeObject + # The timestamp at which the lines were marked as invalid. sig { returns(Integer) } attr_reader :invalid_at + # The list of lines that became invalid at the given timestamp. sig { returns(T::Array[String]) } attr_reader :lines end class SubscriptionChanged < Stripe::StripeObject + # The subscription's state before the quote was marked as stale. sig { returns(T.nilable(Stripe::Subscription)) } attr_reader :previous_subscription end class SubscriptionScheduleChanged < Stripe::StripeObject + # The subscription schedule's state before the quote was marked as stale. sig { returns(T.nilable(Stripe::SubscriptionSchedule)) } attr_reader :previous_subscription_schedule end + # The ID of the line that is invalid if the stale reason type is `line_invalid`. sig { returns(String) } attr_reader :line_invalid + # The IDs of the lines that are invalid if the stale reason type is `lines_invalid`. sig { returns(T::Array[LinesInvalid]) } attr_reader :lines_invalid + # The user supplied mark stale reason. sig { returns(T.nilable(String)) } attr_reader :marked_stale + # The ID of the subscription that was canceled. sig { returns(String) } attr_reader :subscription_canceled + # Attribute for field subscription_changed sig { returns(SubscriptionChanged) } attr_reader :subscription_changed + # The ID of the subscription that was expired. sig { returns(String) } attr_reader :subscription_expired + # The ID of the subscription schedule that was canceled. sig { returns(String) } attr_reader :subscription_schedule_canceled + # Attribute for field subscription_schedule_changed sig { returns(SubscriptionScheduleChanged) } attr_reader :subscription_schedule_changed + # The ID of the subscription schedule that was released. sig { returns(String) } attr_reader :subscription_schedule_released + # The reason the quote was marked as stale. sig { returns(T.nilable(String)) } attr_reader :type end + # Time at which the quote expires. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :expires_at + # The most recent reason this quote was marked as stale. sig { returns(T.nilable(LastReason)) } attr_reader :last_reason + # Time at which the stale reason was updated. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :last_updated_at + # Time at which the quote was marked as stale. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :transitioned_at end + # Attribute for field canceled sig { returns(Canceled) } attr_reader :canceled + # Attribute for field stale sig { returns(Stale) } attr_reader :stale end class StatusTransitions < Stripe::StripeObject + # The time that the quote was accepted. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :accepted_at + # The time that the quote was canceled. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # The time that the quote was finalized. Measured in seconds since Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at end @@ -218,311 +306,2881 @@ module Stripe class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # The timestamp the given line starts at. sig { returns(T.nilable(LineStartsAt)) } attr_reader :line_starts_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_from` time. sig { returns(String) } attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration + # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_until` time. sig { returns(String) } attr_reader :type end + # The start of the period to bill from when the Quote is accepted. sig { returns(T.nilable(BillFrom)) } attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. sig { returns(T.nilable(BillUntil)) } attr_reader :bill_until end class Prebilling < Stripe::StripeObject + # Attribute for field iterations sig { returns(Integer) } attr_reader :iterations end + # Describes the period to bill for upon accepting the quote. sig { returns(T.nilable(BillOnAcceptance)) } attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # Whether the subscription will always start a new billing period when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. This date is ignored if it is in the past when the quote is accepted. Measured in seconds since the Unix epoch. sig { returns(T.nilable(Integer)) } attr_reader :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. sig { returns(T.nilable(String)) } attr_reader :end_behavior + # The id of the subscription that will be updated when the quote is accepted. sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. sig { returns(String) } attr_reader :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. sig { returns(T.nilable(Integer)) } attr_reader :trial_period_days end class SubscriptionDataOverride < Stripe::StripeObject class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class BillOnAcceptance < Stripe::StripeObject class BillFrom < Stripe::StripeObject class LineStartsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # The timestamp the given line starts at. sig { returns(T.nilable(LineStartsAt)) } attr_reader :line_starts_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_from` time. sig { returns(String) } attr_reader :type end class BillUntil < Stripe::StripeObject class Duration < Stripe::StripeObject + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The materialized time. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration + # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The type of method to specify the `bill_until` time. sig { returns(String) } attr_reader :type end + # The start of the period to bill from when the Quote is accepted. sig { returns(T.nilable(BillFrom)) } attr_reader :bill_from + # The end of the period to bill until when the Quote is accepted. sig { returns(T.nilable(BillUntil)) } attr_reader :bill_until end + # Attribute for field applies_to sig { returns(AppliesTo) } attr_reader :applies_to + # Describes the period to bill for upon accepting the quote. sig { returns(T.nilable(BillOnAcceptance)) } attr_reader :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. sig { returns(String) } attr_reader :billing_behavior + # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. sig { returns(T.nilable(String)) } attr_reader :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Behavior of the subscription schedule and underlying subscription when it ends. sig { returns(T.nilable(String)) } attr_reader :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations) when the quote is accepted. sig { returns(T.nilable(String)) } attr_reader :proration_behavior end class SubscriptionSchedule < Stripe::StripeObject class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end + # Attribute for field applies_to sig { returns(AppliesTo) } attr_reader :applies_to + # The subscription schedule that was created or updated from this quote. sig { returns(String) } attr_reader :subscription_schedule end class TotalDetails < Stripe::StripeObject class Breakdown < Stripe::StripeObject class Discount < Stripe::StripeObject + # The amount discounted. sig { returns(Integer) } attr_reader :amount + # A discount represents the actual application of a [coupon](https://stripe.com/docs/api#coupons) or [promotion code](https://stripe.com/docs/api#promotion_codes). + # It contains information about when the discount began, when it will end, and what it is applied to. + # + # Related guide: [Applying discounts to subscriptions](https://stripe.com/docs/billing/subscriptions/discounts) sig { returns(Stripe::Discount) } attr_reader :discount end class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # The aggregated discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The aggregated tax amounts by rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end + # This is the sum of all the discounts. sig { returns(Integer) } attr_reader :amount_discount + # This is the sum of all the shipping amounts. sig { returns(T.nilable(Integer)) } attr_reader :amount_shipping + # This is the sum of all the tax amounts. sig { returns(Integer) } attr_reader :amount_tax + # Attribute for field breakdown sig { returns(Breakdown) } attr_reader :breakdown end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount will be transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T.nilable(T::Boolean)) } # Allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + sig { returns(T.nilable(T::Boolean)) } attr_reader :allow_backdated_lines - sig { returns(Integer) } # Total before any discounts or taxes are applied. - attr_reader :amount_subtotal sig { returns(Integer) } + attr_reader :amount_subtotal # Total after discounts and taxes are applied. + sig { returns(Integer) } attr_reader :amount_total - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the quote. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Only applicable if there are no line items with recurring prices on the quote. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(T.nilable(Float)) } # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. Only applicable if there are line items with recurring prices on the quote. + sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(String) } # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or on finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } attr_reader :collection_method - sig { returns(Computed) } # Attribute for field computed + sig { returns(Computed) } attr_reader :computed - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The customer which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) } # The tax rates applied to this quote. + sig { returns(T::Array[T.any(String, Stripe::TaxRate)]) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } # A description that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } # The discounts applied to this quote. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(Integer) } # The date on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :expires_at - sig { returns(T.nilable(String)) } # A footer that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } attr_reader :footer - sig { returns(T.nilable(FromQuote)) } # Details of the quote that was cloned. See the [cloning documentation](https://stripe.com/docs/quotes/clone) for more details. + sig { returns(T.nilable(FromQuote)) } attr_reader :from_quote - sig { returns(T.nilable(String)) } # A header that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } attr_reader :header - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # The invoice that was created from this quote. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :invoice - sig { returns(InvoiceSettings) } # Attribute for field invoice_settings + sig { returns(InvoiceSettings) } attr_reader :invoice_settings - sig { returns(Stripe::ListObject) } # A list of items the customer is being quoted for. + sig { returns(Stripe::ListObject) } attr_reader :line_items - sig { returns(T.nilable(T::Array[String])) } # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { returns(T.nilable(T::Array[String])) } attr_reader :lines - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(String)) } # A unique number that identifies this particular quote. This number is assigned once the quote is [finalized](https://stripe.com/docs/quotes/overview#finalize). + sig { returns(T.nilable(String)) } attr_reader :number - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account on behalf of which to charge. See the [Connect documentation](https://support.stripe.com/questions/sending-invoices-on-behalf-of-connected-accounts) for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(String) } # The status of the quote. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(StatusDetails)) } # Details on when and why a quote has been marked as stale or canceled. + sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # The subscription that was created or updated from this quote. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(SubscriptionData) } # Attribute for field subscription_data + sig { returns(SubscriptionData) } attr_reader :subscription_data - sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) } # List representing overrides for `subscription_data` configurations for specific subscription schedules. + sig { returns(T.nilable(T::Array[SubscriptionDataOverride])) } attr_reader :subscription_data_overrides - sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } # The subscription schedule that was created or updated from this quote. + sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } attr_reader :subscription_schedule - sig { returns(T.nilable(T::Array[SubscriptionSchedule])) } # The subscription schedules that were created or updated from this quote. + sig { returns(T.nilable(T::Array[SubscriptionSchedule])) } attr_reader :subscription_schedules - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this quote belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(TotalDetails) } # Attribute for field total_details + sig { returns(TotalDetails) } attr_reader :total_details - sig { returns(T.nilable(TransferData)) } # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the invoices. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data + class ListParams < Stripe::RequestParams + # The ID of the customer whose quotes will be retrieved. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The subscription which the quote updates. + sig { returns(String) } + attr_accessor :from_subscription + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the quote. + sig { returns(String) } + attr_accessor :status + # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. + sig { returns(String) } + attr_accessor :test_clock + sig { + params(customer: String, ending_before: String, expand: T::Array[String], from_subscription: String, limit: Integer, starting_after: String, status: String, test_clock: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + from_subscription: nil, + limit: nil, + starting_after: nil, + status: nil, + test_clock: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Quote::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Quote::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Quote::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Quote::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class FromQuote < Stripe::RequestParams + # Whether this quote is a revision of the previous quote. + sig { returns(T::Boolean) } + attr_accessor :is_revision + # The `id` of the quote that will be cloned. + sig { returns(String) } + attr_accessor :quote + sig { params(is_revision: T::Boolean, quote: String).void } + def initialize(is_revision: nil, quote: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Quote::CreateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(days_until_due: Integer, issuer: ::Stripe::Quote::CreateParams::InvoiceSettings::Issuer).void + } + def initialize(days_until_due: nil, issuer: nil); end + end + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddDiscount::DiscountEnd) } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::CreateParams::Line::Action::AddItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::SetItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::CreateParams::Line::Action::SetItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details for the `add_discount` type. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddDiscount) } + attr_accessor :add_discount + # Details for the `add_item` type. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::AddItem) } + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + sig { returns(T::Hash[String, String]) } + attr_accessor :add_metadata + # Details for the `remove_discount` type. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::RemoveDiscount) } + attr_accessor :remove_discount + # Details for the `remove_item` type. + sig { returns(::Stripe::Quote::CreateParams::Line::Action::RemoveItem) } + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + sig { returns(T::Array[String]) } + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetDiscount]) } + attr_accessor :set_discounts + # Details for the `set_items` type. + sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem]) } + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set_metadata + # The type of action the quote line performs. + sig { returns(String) } + attr_accessor :type + sig { + params(add_discount: ::Stripe::Quote::CreateParams::Line::Action::AddDiscount, add_item: ::Stripe::Quote::CreateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::Quote::CreateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::Quote::CreateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::Quote::CreateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ); end + end + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + sig { returns(String) } + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void } + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end + end + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt::DiscountEnd) } + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt::Duration) } + attr_accessor :duration + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Quote::CreateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::Quote::CreateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { returns(::Stripe::Quote::CreateParams::Line::SetPauseCollection::Set) } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::Quote::CreateParams::Line::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt::DiscountEnd) } + attr_accessor :discount_end + # The timestamp the given line ends at. + sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt::LineEndsAt) } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Quote::CreateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::Quote::CreateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { returns(::Stripe::Quote::CreateParams::Line::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Quote::CreateParams::Line::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # An array of operations the quote line performs. + sig { returns(T::Array[::Stripe::Quote::CreateParams::Line::Action]) } + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + sig { returns(::Stripe::Quote::CreateParams::Line::AppliesTo) } + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + sig { returns(::Stripe::Quote::CreateParams::Line::CancelSubscriptionSchedule) } + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + sig { returns(::Stripe::Quote::CreateParams::Line::EndsAt) } + attr_accessor :ends_at + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { returns(::Stripe::Quote::CreateParams::Line::SetPauseCollection) } + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + sig { returns(String) } + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(::Stripe::Quote::CreateParams::Line::StartsAt) } + attr_accessor :starts_at + # Settings related to subscription trials. + sig { returns(::Stripe::Quote::CreateParams::Line::TrialSettings) } + attr_accessor :trial_settings + sig { + params(actions: T::Array[::Stripe::Quote::CreateParams::Line::Action], applies_to: ::Stripe::Quote::CreateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::Quote::CreateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::Quote::CreateParams::Line::EndsAt, proration_behavior: String, set_pause_collection: ::Stripe::Quote::CreateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::Quote::CreateParams::Line::StartsAt, trial_settings: ::Stripe::Quote::CreateParams::Line::TrialSettings).void + } + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::CreateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Quote::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The discounts applied to this line item. + sig { returns(T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem::Discount])) } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Quote::CreateParams::LineItem::PriceData) } + attr_accessor :price_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T.nilable(T::Array[::Stripe::Quote::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::Quote::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Describes the period to bill for upon accepting the quote. + sig { returns(::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance) } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + sig { returns(T.nilable(String)) } + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. + sig { returns(String) } + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + sig { returns(T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::Prebilling)) } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + sig { returns(T.nilable(Integer)) } + attr_accessor :trial_period_days + sig { + params(bill_on_acceptance: ::Stripe::Quote::CreateParams::SubscriptionData::BillOnAcceptance, billing_behavior: String, billing_cycle_anchor: T.nilable(String), description: String, effective_date: T.nilable(T.any(String, Integer)), end_behavior: String, from_subscription: String, metadata: T::Hash[String, String], prebilling: T.nilable(::Stripe::Quote::CreateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void + } + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + from_subscription: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ); end + end + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + sig { returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::AppliesTo) } + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + sig { returns(::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance) } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. + sig { returns(String) } + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(applies_to: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: ::Stripe::Quote::CreateParams::SubscriptionDataOverride::BillOnAcceptance, billing_behavior: String, customer: String, description: String, end_behavior: String, proration_behavior: String).void + } + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, amount_percent: Float, destination: String).void } + def initialize(amount: nil, amount_percent: nil, destination: nil); end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + sig { returns(T::Boolean) } + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + sig { returns(::Stripe::Quote::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + sig { returns(String) } + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The discounts applied to the quote. + sig { returns(T.nilable(T::Array[::Stripe::Quote::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(Integer) } + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(T.nilable(String)) } + attr_accessor :footer + # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + sig { returns(::Stripe::Quote::CreateParams::FromQuote) } + attr_accessor :from_quote + # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(T.nilable(String)) } + attr_accessor :header + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::Quote::CreateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::Quote::CreateParams::LineItem]) } + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { returns(T::Array[::Stripe::Quote::CreateParams::Line]) } + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + sig { returns(::Stripe::Quote::CreateParams::SubscriptionData) } + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + sig { returns(T::Array[::Stripe::Quote::CreateParams::SubscriptionDataOverride]) } + attr_accessor :subscription_data_overrides + # ID of the test clock to attach to the quote. + sig { returns(String) } + attr_accessor :test_clock + # The data with which to automatically create a Transfer for each of the invoices. + sig { returns(T.nilable(::Stripe::Quote::CreateParams::TransferData)) } + attr_accessor :transfer_data + sig { + params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Quote::CreateParams::AutomaticTax, collection_method: String, customer: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Quote::CreateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), from_quote: ::Stripe::Quote::CreateParams::FromQuote, header: T.nilable(String), invoice_settings: ::Stripe::Quote::CreateParams::InvoiceSettings, line_items: T::Array[::Stripe::Quote::CreateParams::LineItem], lines: T::Array[::Stripe::Quote::CreateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::Quote::CreateParams::SubscriptionData, subscription_data_overrides: T::Array[::Stripe::Quote::CreateParams::SubscriptionDataOverride], test_clock: String, transfer_data: T.nilable(::Stripe::Quote::CreateParams::TransferData)).void + } + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + from_quote: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + test_clock: nil, + transfer_data: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Quote::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Quote::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Quote::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Quote::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(days_until_due: Integer, issuer: ::Stripe::Quote::UpdateParams::InvoiceSettings::Issuer).void + } + def initialize(days_until_due: nil, issuer: nil); end + end + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddDiscount::DiscountEnd) } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::UpdateParams::Line::Action::AddItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::SetItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::Quote::UpdateParams::Line::Action::SetItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details for the `add_discount` type. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddDiscount) } + attr_accessor :add_discount + # Details for the `add_item` type. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::AddItem) } + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + sig { returns(T::Hash[String, String]) } + attr_accessor :add_metadata + # Details for the `remove_discount` type. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::RemoveDiscount) } + attr_accessor :remove_discount + # Details for the `remove_item` type. + sig { returns(::Stripe::Quote::UpdateParams::Line::Action::RemoveItem) } + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + sig { returns(T::Array[String]) } + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetDiscount]) } + attr_accessor :set_discounts + # Details for the `set_items` type. + sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem]) } + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set_metadata + # The type of action the quote line performs. + sig { returns(String) } + attr_accessor :type + sig { + params(add_discount: ::Stripe::Quote::UpdateParams::Line::Action::AddDiscount, add_item: ::Stripe::Quote::UpdateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::Quote::UpdateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::Quote::UpdateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::Quote::UpdateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ); end + end + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + sig { returns(String) } + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void } + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end + end + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt::DiscountEnd) } + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt::Duration) } + attr_accessor :duration + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Quote::UpdateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::Quote::UpdateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { returns(::Stripe::Quote::UpdateParams::Line::SetPauseCollection::Set) } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::Quote::UpdateParams::Line::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt::DiscountEnd) } + attr_accessor :discount_end + # The timestamp the given line ends at. + sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt::LineEndsAt) } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::Quote::UpdateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::Quote::UpdateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { returns(::Stripe::Quote::UpdateParams::Line::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Quote::UpdateParams::Line::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # An array of operations the quote line performs. + sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line::Action]) } + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + sig { returns(::Stripe::Quote::UpdateParams::Line::AppliesTo) } + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + sig { returns(::Stripe::Quote::UpdateParams::Line::CancelSubscriptionSchedule) } + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + sig { returns(::Stripe::Quote::UpdateParams::Line::EndsAt) } + attr_accessor :ends_at + # The ID of an existing line on the quote. + sig { returns(String) } + attr_accessor :id + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { returns(::Stripe::Quote::UpdateParams::Line::SetPauseCollection) } + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + sig { returns(String) } + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(::Stripe::Quote::UpdateParams::Line::StartsAt) } + attr_accessor :starts_at + # Settings related to subscription trials. + sig { returns(::Stripe::Quote::UpdateParams::Line::TrialSettings) } + attr_accessor :trial_settings + sig { + params(actions: T::Array[::Stripe::Quote::UpdateParams::Line::Action], applies_to: ::Stripe::Quote::UpdateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::Quote::UpdateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::Quote::UpdateParams::Line::EndsAt, id: String, proration_behavior: String, set_pause_collection: ::Stripe::Quote::UpdateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::Quote::UpdateParams::Line::StartsAt, trial_settings: ::Stripe::Quote::UpdateParams::Line::TrialSettings).void + } + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + id: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Quote::UpdateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Quote::UpdateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The discounts applied to this line item. + sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount])) } + attr_accessor :discounts + # The ID of an existing line item on the quote. + sig { returns(String) } + attr_accessor :id + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Quote::UpdateParams::LineItem::PriceData) } + attr_accessor :price_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T.nilable(T::Array[::Stripe::Quote::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::Quote::UpdateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + id: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Describes the period to bill for upon accepting the quote. + sig { + returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance)) + } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + sig { returns(T.nilable(String)) } + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + sig { returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::Prebilling)) } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + sig { returns(T.nilable(Integer)) } + attr_accessor :trial_period_days + sig { + params(bill_on_acceptance: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::BillOnAcceptance), billing_behavior: String, billing_cycle_anchor: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.any(String, Integer)), end_behavior: String, metadata: T::Hash[String, String], prebilling: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void + } + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ); end + end + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + sig { returns(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::AppliesTo) } + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + sig { + returns(T.nilable(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance)) + } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. + sig { returns(String) } + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(applies_to: ::Stripe::Quote::UpdateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: T.nilable(::Stripe::Quote::UpdateParams::SubscriptionDataOverride::BillOnAcceptance), billing_behavior: String, customer: String, description: T.nilable(String), end_behavior: String, proration_behavior: String).void + } + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, amount_percent: Float, destination: String).void } + def initialize(amount: nil, amount_percent: nil, destination: nil); end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + sig { returns(T::Boolean) } + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + sig { returns(::Stripe::Quote::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + sig { returns(String) } + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The discounts applied to the quote. + sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } + attr_accessor :footer + # A header that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } + attr_accessor :header + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::Quote::UpdateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::Quote::UpdateParams::LineItem]) } + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { returns(T::Array[::Stripe::Quote::UpdateParams::Line]) } + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + sig { returns(::Stripe::Quote::UpdateParams::SubscriptionData) } + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + sig { returns(T.nilable(T::Array[::Stripe::Quote::UpdateParams::SubscriptionDataOverride])) } + attr_accessor :subscription_data_overrides + # The data with which to automatically create a Transfer for each of the invoices. + sig { returns(T.nilable(::Stripe::Quote::UpdateParams::TransferData)) } + attr_accessor :transfer_data + sig { + params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Quote::UpdateParams::AutomaticTax, collection_method: String, customer: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Quote::UpdateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), header: T.nilable(String), invoice_settings: ::Stripe::Quote::UpdateParams::InvoiceSettings, line_items: T::Array[::Stripe::Quote::UpdateParams::LineItem], lines: T::Array[::Stripe::Quote::UpdateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::Quote::UpdateParams::SubscriptionData, subscription_data_overrides: T.nilable(T::Array[::Stripe::Quote::UpdateParams::SubscriptionDataOverride]), transfer_data: T.nilable(::Stripe::Quote::UpdateParams::TransferData)).void + } + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + transfer_data: nil + ); end + end + class ListComputedUpfrontLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class ListLinesParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class AcceptParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FinalizeQuoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :expires_at + sig { params(expand: T::Array[String], expires_at: Integer).void } + def initialize(expand: nil, expires_at: nil); end + end + class MarkDraftParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class MarkStaleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Reason the Quote is being marked stale. + sig { returns(String) } + attr_accessor :reason + sig { params(expand: T::Array[String], reason: String).void } + def initialize(expand: nil, reason: nil); end + end + class ReestimateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListPreviewInvoiceLinesParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Accepts the specified quote. + sig { + params(params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def accept(params = {}, opts = {}); end + + # Accepts the specified quote. + sig { + params(quote: String, params: T.any(::Stripe::Quote::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.accept(quote, params = {}, opts = {}); end + + # Cancels the quote. + sig { + params(params: T.any(::Stripe::Quote::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def cancel(params = {}, opts = {}); end + + # Cancels the quote. + sig { + params(quote: String, params: T.any(::Stripe::Quote::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.cancel(quote, params = {}, opts = {}); end + + # A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). + sig { + params(params: T.any(::Stripe::Quote::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.create(params = {}, opts = {}); end + + # Finalizes the quote. + sig { + params(params: T.any(::Stripe::Quote::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def finalize_quote(params = {}, opts = {}); end + + # Finalizes the quote. + sig { + params(quote: String, params: T.any(::Stripe::Quote::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.finalize_quote(quote, params = {}, opts = {}); end + + # Returns a list of your quotes. + sig { + params(params: T.any(::Stripe::Quote::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. + sig { + params(params: T.any(::Stripe::Quote::ListComputedUpfrontLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_computed_upfront_line_items(params = {}, opts = {}); end + + # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. + sig { + params(quote: String, params: T.any(::Stripe::Quote::ListComputedUpfrontLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_computed_upfront_line_items(quote, params = {}, opts = {}); end + + # When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::Quote::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_line_items(params = {}, opts = {}); end + + # When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(quote: String, params: T.any(::Stripe::Quote::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_line_items(quote, params = {}, opts = {}); end + + # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { + params(params: T.any(::Stripe::Quote::ListLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_lines(params = {}, opts = {}); end + + # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { + params(quote: String, params: T.any(::Stripe::Quote::ListLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_lines(quote, params = {}, opts = {}); end + + # Preview the invoice line items that would be generated by accepting the quote. + sig { + params(preview_invoice: String, params: T.any(::Stripe::Quote::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_preview_invoice_lines(preview_invoice, params = {}, opts = {}); end + + # Preview the invoice line items that would be generated by accepting the quote. + sig { + params(quote: String, preview_invoice: String, params: T.any(::Stripe::Quote::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {}); end + + # Converts a stale quote to draft. + sig { + params(params: T.any(::Stripe::Quote::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def mark_draft(params = {}, opts = {}); end + + # Converts a stale quote to draft. + sig { + params(quote: String, params: T.any(::Stripe::Quote::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.mark_draft(quote, params = {}, opts = {}); end + + # Converts a draft or open quote to stale. + sig { + params(params: T.any(::Stripe::Quote::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def mark_stale(params = {}, opts = {}); end + + # Converts a draft or open quote to stale. + sig { + params(quote: String, params: T.any(::Stripe::Quote::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.mark_stale(quote, params = {}, opts = {}); end + + # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) + sig { + params(params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped) + } + def pdf(params = {}, opts = {}, &read_body_chunk_block); end + + # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) + sig { + params(quote: String, params: T.any(::Stripe::Quote::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped) + } + def self.pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end + + # Recompute the upcoming invoice estimate for the quote. + sig { + params(params: T.any(::Stripe::Quote::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def reestimate(params = {}, opts = {}); end + + # Recompute the upcoming invoice estimate for the quote. + sig { + params(quote: String, params: T.any(::Stripe::Quote::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.reestimate(quote, params = {}, opts = {}); end + + # A quote models prices and services for a customer. + sig { + params(id: String, params: T.any(::Stripe::Quote::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_line.rbi b/rbi/stripe/resources/quote_line.rbi index bdc5ec3e8..ff39a7755 100644 --- a/rbi/stripe/resources/quote_line.rbi +++ b/rbi/stripe/resources/quote_line.rbi @@ -8,260 +8,343 @@ module Stripe class Action < Stripe::StripeObject class AddDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. sig { returns(T.nilable(Integer)) } attr_reader :index + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class AddItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class RemoveDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class RemoveItem < Stripe::StripeObject + # ID of a price to remove. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price end class SetDiscount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class SetItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end + # Details for the `add_discount` type. sig { returns(T.nilable(AddDiscount)) } attr_reader :add_discount + # Details for the `add_item` type. sig { returns(T.nilable(AddItem)) } attr_reader :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :add_metadata + # Details for the `remove_discount` type. sig { returns(T.nilable(RemoveDiscount)) } attr_reader :remove_discount + # Details for the `remove_item` type. sig { returns(T.nilable(RemoveItem)) } attr_reader :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. sig { returns(T.nilable(T::Array[String])) } attr_reader :remove_metadata + # Details for the `set_discounts` type. sig { returns(T.nilable(T::Array[SetDiscount])) } attr_reader :set_discounts + # Details for the `set_items` type. sig { returns(T.nilable(T::Array[SetItem])) } attr_reader :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :set_metadata + # The type of action the quote line performs. sig { returns(String) } attr_reader :type end class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class CancelSubscriptionSchedule < Stripe::StripeObject + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. sig { returns(String) } attr_reader :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. sig { returns(T.nilable(T::Boolean)) } attr_reader :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. sig { returns(T.nilable(T::Boolean)) } attr_reader :prorate end class EndsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. sig { returns(String) } attr_reader :discount end class Duration < Stripe::StripeObject + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. sig { returns(Integer) } attr_reader :interval_count end + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `ends_at` field. For example, if `ends_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `ends_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `ends_at` is respecified. This field is guaranteed to be populated after quote acceptance. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Use the `end` time of a given discount. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # Time span for the quote line starting from the `starts_at` date. sig { returns(T.nilable(Duration)) } attr_reader :duration + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # Select a way to pass in `ends_at`. sig { returns(String) } attr_reader :type end class SetPauseCollection < Stripe::StripeObject class Set < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(Set)) } attr_reader :set + # Defines the type of the pause_collection behavior for the quote line. sig { returns(String) } attr_reader :type end class StartsAt < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The ID of a specific discount. sig { returns(String) } attr_reader :discount end class LineEndsAt < Stripe::StripeObject + # Unique identifier for the object. sig { returns(String) } attr_reader :id end + # The timestamp value that will be used to determine when to make changes to the subscription schedule, as computed from the `starts_at` field. For example, if `starts_at[type]=upcoming_invoice`, the upcoming invoice date will be computed at the time the `starts_at` field was specified and saved. This field will not be recomputed upon future requests to update or finalize the quote unless `starts_at` is respecified. This field is guaranteed to be populated after quote acceptance. sig { returns(T.nilable(Integer)) } attr_reader :computed + # Use the `end` time of a given discount. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # The timestamp the given line ends at. sig { returns(T.nilable(LineEndsAt)) } attr_reader :line_ends_at + # A precise Unix timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # Select a way to pass in `starts_at`. sig { returns(String) } attr_reader :type end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end - sig { returns(T::Array[Action]) } # A list of items the customer is being quoted for. + sig { returns(T::Array[Action]) } attr_reader :actions - sig { returns(T.nilable(AppliesTo)) } # Details to identify the subscription schedule the quote line applies to. + sig { returns(T.nilable(AppliesTo)) } attr_reader :applies_to - sig { returns(T.nilable(String)) } # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor - sig { returns(T.nilable(CancelSubscriptionSchedule)) } # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + sig { returns(T.nilable(CancelSubscriptionSchedule)) } attr_reader :cancel_subscription_schedule - sig { returns(T.nilable(EndsAt)) } # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + sig { returns(T.nilable(EndsAt)) } attr_reader :ends_at - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + sig { returns(T.nilable(String)) } attr_reader :proration_behavior - sig { returns(T.nilable(SetPauseCollection)) } # Details to modify the pause_collection behavior of the subscription schedule. + sig { returns(T.nilable(SetPauseCollection)) } attr_reader :set_pause_collection - sig { returns(T.nilable(String)) } # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + sig { returns(T.nilable(String)) } attr_reader :set_schedule_end - sig { returns(T.nilable(StartsAt)) } # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(T.nilable(StartsAt)) } attr_reader :starts_at - sig { returns(T.nilable(TrialSettings)) } # Settings related to subscription trials. + sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_invoice.rbi b/rbi/stripe/resources/quote_preview_invoice.rbi index d4c8144c6..b7f6d3b21 100644 --- a/rbi/stripe/resources/quote_preview_invoice.rbi +++ b/rbi/stripe/resources/quote_preview_invoice.rbi @@ -37,140 +37,231 @@ module Stripe # Related guide: [Send invoices to customers](https://stripe.com/docs/billing/invoices/sending) class QuotePreviewInvoice < APIResource class AmountsDue < Stripe::StripeObject + # Incremental amount due for this payment in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount + # The amount in cents (or local equivalent) that was paid for this payment. sig { returns(Integer) } attr_reader :amount_paid + # The difference between the payment’s amount and amount_paid, in cents (or local equivalent). sig { returns(Integer) } attr_reader :amount_remaining + # Number of days from when invoice is finalized until the payment is due. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. sig { returns(T.nilable(String)) } attr_reader :description + # Date on which a payment plan’s payment is due. sig { returns(T.nilable(Integer)) } attr_reader :due_date + # Timestamp when the payment was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The status of the payment, one of `open`, `paid`, or `past_due` sig { returns(String) } attr_reader :status end class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability + # The status of the most recent automated tax calculation for this invoice. sig { returns(T.nilable(String)) } attr_reader :status end class CustomField < Stripe::StripeObject + # The name of the custom field. sig { returns(String) } attr_reader :name + # The value of the custom field. sig { returns(String) } attr_reader :value end class CustomerAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class CustomerShipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class CustomerTaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(T.nilable(String)) } attr_reader :value end class FromInvoice < Stripe::StripeObject + # The relation between this invoice and the cloned invoice sig { returns(String) } attr_reader :action + # The invoice that was cloned. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice end class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end class LastFinalizationError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end @@ -178,41 +269,53 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class Installments < Stripe::StripeObject + # Whether Installments are enabled for this Invoice. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end + # Attribute for field installments sig { returns(Installments) } attr_reader :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -222,234 +325,307 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Card)) } attr_reader :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(Konbini)) } attr_reader :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. sig { returns(T.nilable(String)) } attr_reader :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types end class Rendering < Stripe::StripeObject class Pdf < Stripe::StripeObject + # Page size of invoice pdf. Options include a4, letter, and auto. If set to auto, page size will be switched to a4 or letter based on customer locale. sig { returns(T.nilable(String)) } attr_reader :page_size end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. sig { returns(T.nilable(String)) } attr_reader :amount_tax_display + # Invoice pdf rendering options sig { returns(T.nilable(Pdf)) } attr_reader :pdf + # ID of the rendering template that the invoice is formatted by. sig { returns(T.nilable(String)) } attr_reader :template + # Version of the rendering template that the invoice is using. sig { returns(T.nilable(Integer)) } attr_reader :template_version end class ShippingCost < Stripe::StripeObject class Tax < Stripe::StripeObject + # Amount of tax applied for this rate. sig { returns(Integer) } attr_reader :amount + # Tax rates can be applied to [invoices](https://stripe.com/docs/billing/invoices/tax-rates), [subscriptions](https://stripe.com/docs/billing/subscriptions/taxes) and [Checkout Sessions](https://stripe.com/docs/payments/checkout/set-up-a-subscription#tax-rates) to collect tax. + # + # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) sig { returns(Stripe::TaxRate) } attr_reader :rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end + # Total shipping cost before any taxes are applied. sig { returns(Integer) } attr_reader :amount_subtotal + # Total tax amount applied due to shipping costs. If no tax was applied, defaults to 0. sig { returns(Integer) } attr_reader :amount_tax + # Total shipping cost after taxes are applied. sig { returns(Integer) } attr_reader :amount_total + # The ID of the ShippingRate for this invoice. sig { returns(T.nilable(T.any(String, Stripe::ShippingRate))) } attr_reader :shipping_rate + # The taxes applied to the shipping rate. sig { returns(T::Array[Tax]) } attr_reader :taxes end class ShippingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end class StatusTransitions < Stripe::StripeObject + # The time that the invoice draft was finalized. sig { returns(T.nilable(Integer)) } attr_reader :finalized_at + # The time that the invoice was marked uncollectible. sig { returns(T.nilable(Integer)) } attr_reader :marked_uncollectible_at + # The time that the invoice was paid. sig { returns(T.nilable(Integer)) } attr_reader :paid_at + # The time that the invoice was voided. sig { returns(T.nilable(Integer)) } attr_reader :voided_at end class SubscriptionDetails < Stripe::StripeObject class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior + # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) defined as subscription metadata when an invoice is created. Becomes an immutable snapshot of the subscription metadata at the time of invoice finalization. + # *Note: This attribute is populated only for invoices created on or after June 29, 2023.* sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection end class ThresholdReason < Stripe::StripeObject class ItemReason < Stripe::StripeObject + # The IDs of the line items that triggered the threshold invoice. sig { returns(T::Array[String]) } attr_reader :line_item_ids + # The quantity threshold boundary that applied to the given line item. sig { returns(Integer) } attr_reader :usage_gte end + # The total invoice amount threshold boundary if it triggered the threshold invoice. sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates which line items triggered a threshold invoice. sig { returns(T::Array[ItemReason]) } attr_reader :item_reasons end class TotalDiscountAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the discount. sig { returns(Integer) } attr_reader :amount + # The discount that was applied to get this discount amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount end class TotalMarginAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the reduction in line item amount. sig { returns(Integer) } attr_reader :amount + # The margin that was applied to get this margin amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin end class TotalPretaxCreditAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the pretax credit amount. sig { returns(Integer) } attr_reader :amount + # The credit balance transaction that was applied to get this pretax credit amount. sig { returns(T.nilable(T.any(String, Stripe::Billing::CreditBalanceTransaction))) } attr_reader :credit_balance_transaction + # The discount that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Discount)) } attr_reader :discount + # The margin that was applied to get this pretax credit amount. sig { returns(T.any(String, Stripe::Margin)) } attr_reader :margin + # Type of the pretax credit amount referenced. sig { returns(String) } attr_reader :type end class TotalTaxAmount < Stripe::StripeObject + # The amount, in cents (or local equivalent), of the tax. sig { returns(Integer) } attr_reader :amount + # Whether this tax amount is inclusive or exclusive. sig { returns(T::Boolean) } attr_reader :inclusive + # The tax rate that was applied to get this tax amount. sig { returns(T.any(String, Stripe::TaxRate)) } attr_reader :tax_rate + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(T.nilable(String)) } attr_reader :taxability_reason + # The amount on which tax is calculated, in cents (or local equivalent). sig { returns(T.nilable(Integer)) } attr_reader :taxable_amount end class TransferData < Stripe::StripeObject + # The amount in cents (or local equivalent) that will be transferred to the destination account when the invoice is paid. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end - sig { returns(T.nilable(String)) } # The country of the business associated with this invoice, most often the business creating the invoice. - attr_reader :account_country sig { returns(T.nilable(String)) } + attr_reader :account_country # The public name of the business associated with this invoice, most often the business creating the invoice. + sig { returns(T.nilable(String)) } attr_reader :account_name - sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids - sig { returns(Integer) } # Final amount due at this time for this invoice. If the invoice's total is smaller than the minimum charge amount, for example, or if there is account credit that can be applied to the invoice, the `amount_due` may be 0. If there is a positive `starting_balance` for the invoice (the customer owes money), the `amount_due` will also take that into account. The charge that gets generated for the invoice will be for the amount specified in `amount_due`. - attr_reader :amount_due sig { returns(Integer) } + attr_reader :amount_due # Amount that was overpaid on the invoice. Overpayments are debited to the customer's credit balance. - attr_reader :amount_overpaid sig { returns(Integer) } + attr_reader :amount_overpaid # The amount, in cents (or local equivalent), that was paid. - attr_reader :amount_paid sig { returns(Integer) } + attr_reader :amount_paid # The difference between amount_due and amount_paid, in cents (or local equivalent). - attr_reader :amount_remaining sig { returns(Integer) } + attr_reader :amount_remaining # This is the sum of all the shipping amounts. + sig { returns(Integer) } attr_reader :amount_shipping - sig { returns(T.nilable(T::Array[AmountsDue])) } # List of expected payments and corresponding due dates. This value will be null for invoices where collection_method=charge_automatically. + sig { returns(T.nilable(T::Array[AmountsDue])) } attr_reader :amounts_due - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the invoice. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Integer)) } # The fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account when the invoice is paid. + sig { returns(T.nilable(Integer)) } attr_reader :application_fee_amount - sig { returns(AppliesTo) } # Attribute for field applies_to + sig { returns(AppliesTo) } attr_reader :applies_to - sig { returns(Integer) } # Number of payment attempts made for this invoice, from the perspective of the payment retry schedule. Any payment attempt counts as the first attempt, and subsequently only automatic retries increment the attempt count. In other words, manual payment attempts after the first attempt do not affect the retry schedule. If a failure is returned with a non-retryable return code, the invoice can no longer be retried unless a new payment method is obtained. Retries will continue to be scheduled, and attempt_count will continue to increment, but retries will only be executed if a new payment method is obtained. + sig { returns(Integer) } attr_reader :attempt_count - sig { returns(T::Boolean) } # Whether an attempt has been made to pay the invoice. An invoice is not attempted until 1 hour after the `invoice.created` webhook, for example, so you might not want to display that invoice as unpaid to your users. + sig { returns(T::Boolean) } attr_reader :attempted - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(T.nilable(Integer)) } # The time when this invoice is currently scheduled to be automatically finalized. The field will be `null` if the invoice is not scheduled to finalize in the future. If the invoice is not in the draft state, this field will always be `null` - see `finalized_at` for the time when an already-finalized invoice was finalized. + sig { returns(T.nilable(Integer)) } attr_reader :automatically_finalizes_at - sig { returns(T.nilable(String)) } # Indicates the reason why the invoice was created. # # * `manual`: Unrelated to a subscription, for example, created via the invoice editor. @@ -459,212 +635,213 @@ module Stripe # * `subscription_threshold`: A subscription reached a billing threshold. # * `subscription_update`: A subscription was updated. # * `upcoming`: Reserved for simulated invoices, per the upcoming invoice endpoint. + sig { returns(T.nilable(String)) } attr_reader :billing_reason - sig { returns(String) } # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. + sig { returns(String) } attr_reader :collection_method - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T::Array[CustomField])) } # Custom fields displayed on the invoice. + sig { returns(T.nilable(T::Array[CustomField])) } attr_reader :custom_fields - sig { returns(T.nilable(CustomerAddress)) } # The customer's address. Until the invoice is finalized, this field will equal `customer.address`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerAddress)) } attr_reader :customer_address - sig { returns(T.nilable(String)) } # The customer's email. Until the invoice is finalized, this field will equal `customer.email`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_email sig { returns(T.nilable(String)) } + attr_reader :customer_email # The customer's name. Until the invoice is finalized, this field will equal `customer.name`. Once the invoice is finalized, this field will no longer be updated. - attr_reader :customer_name sig { returns(T.nilable(String)) } + attr_reader :customer_name # The customer's phone number. Until the invoice is finalized, this field will equal `customer.phone`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_phone - sig { returns(T.nilable(CustomerShipping)) } # The customer's shipping information. Until the invoice is finalized, this field will equal `customer.shipping`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(CustomerShipping)) } attr_reader :customer_shipping - sig { returns(T.nilable(String)) } # The customer's tax exempt status. Until the invoice is finalized, this field will equal `customer.tax_exempt`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(String)) } attr_reader :customer_tax_exempt - sig { returns(T.nilable(T::Array[CustomerTaxId])) } # The customer's tax IDs. Until the invoice is finalized, this field will contain the same tax IDs as `customer.tax_ids`. Once the invoice is finalized, this field will no longer be updated. + sig { returns(T.nilable(T::Array[CustomerTaxId])) } attr_reader :customer_tax_ids - sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } # The margins applied to the invoice. Can be overridden by line item `margins`. Use `expand[]=default_margins` to expand each margin. + sig { returns(T.nilable(T::Array[T.any(String, Stripe::Margin)])) } attr_reader :default_margins - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. attr_reader :default_source - sig { returns(T::Array[Stripe::TaxRate]) } # The tax rates applied to this invoice, if any. + sig { returns(T::Array[Stripe::TaxRate]) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } # Describes the current discount applied to this invoice, if there is one. Not populated if there are multiple discounts. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } # The discounts applied to the invoice. Line item discounts are applied before invoice discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(T.nilable(Integer)) } # The date on which payment for this invoice is due. This value will be `null` for invoices where `collection_method=charge_automatically`. - attr_reader :due_date sig { returns(T.nilable(Integer)) } + attr_reader :due_date # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. - attr_reader :effective_at sig { returns(T.nilable(Integer)) } + attr_reader :effective_at # Ending customer balance after the invoice is finalized. Invoices are finalized approximately an hour after successful webhook delivery or when payment collection is attempted for the invoice. If the invoice has not been finalized yet, this will be null. + sig { returns(T.nilable(Integer)) } attr_reader :ending_balance - sig { returns(T.nilable(String)) } # Footer displayed on the invoice. + sig { returns(T.nilable(String)) } attr_reader :footer - sig { returns(T.nilable(FromInvoice)) } # Details of the invoice that was cloned. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + sig { returns(T.nilable(FromInvoice)) } attr_reader :from_invoice - sig { returns(String) } # Unique identifier for the object. This property is always present unless the invoice is an upcoming invoice. See [Retrieve an upcoming invoice](https://stripe.com/docs/api/invoices/upcoming) for more details. + sig { returns(String) } attr_reader :id - sig { returns(Issuer) } # Attribute for field issuer + sig { returns(Issuer) } attr_reader :issuer - sig { returns(T.nilable(LastFinalizationError)) } # The error encountered during the previous attempt to finalize the invoice. This field is cleared when the invoice is successfully finalized. + sig { returns(T.nilable(LastFinalizationError)) } attr_reader :last_finalization_error - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # The ID of the most recent non-draft revision of this invoice + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :latest_revision - sig { returns(Stripe::ListObject) } # The individual line items that make up the invoice. `lines` is sorted as follows: (1) pending invoice items (including prorations) in reverse chronological order, (2) subscription items in reverse chronological order, and (3) invoice items added after invoice creation in chronological order. + sig { returns(Stripe::ListObject) } attr_reader :lines - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(Integer)) } # The time at which payment will next be attempted. This value will be `null` for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(Integer)) } attr_reader :next_payment_attempt - sig { returns(T.nilable(String)) } # A unique, identifying string that appears on emails sent to the customer for this invoice. This starts with the customer's unique invoice_prefix if it is specified. + sig { returns(T.nilable(String)) } attr_reader :number - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T::Boolean) } # Whether payment was successfully collected for this invoice. An invoice can be paid (most commonly) with a charge or with credit from the customer's account balance. - attr_reader :paid sig { returns(T::Boolean) } + attr_reader :paid # Returns true if the invoice was manually marked paid, returns false if the invoice hasn't been paid yet or was paid on Stripe. + sig { returns(T::Boolean) } attr_reader :paid_out_of_band - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } # The PaymentIntent associated with this invoice. The PaymentIntent is generated when the invoice is finalized, and can then be used to pay the invoice. Note that voiding an invoice will cancel the PaymentIntent. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(PaymentSettings) } # Attribute for field payment_settings + sig { returns(PaymentSettings) } attr_reader :payment_settings - sig { returns(Stripe::ListObject) } # Payments for this invoice + sig { returns(Stripe::ListObject) } attr_reader :payments - sig { returns(Integer) } # End of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_end sig { returns(Integer) } + attr_reader :period_end # Start of the usage period during which invoice items were added to this invoice. This looks back one period for a subscription invoice. Use the [line item period](/api/invoices/line_item#invoice_line_item_object-period) to get the service period for each price. - attr_reader :period_start sig { returns(Integer) } + attr_reader :period_start # Total amount of all post-payment credit notes issued for this invoice. - attr_reader :post_payment_credit_notes_amount sig { returns(Integer) } + attr_reader :post_payment_credit_notes_amount # Total amount of all pre-payment credit notes issued for this invoice. + sig { returns(Integer) } attr_reader :pre_payment_credit_notes_amount - sig { returns(T.nilable(T.any(String, Stripe::Quote))) } # The quote this invoice was generated from. + sig { returns(T.nilable(T.any(String, Stripe::Quote))) } attr_reader :quote - sig { returns(T.nilable(String)) } # This is the transaction number that appears on email receipts sent for this invoice. + sig { returns(T.nilable(String)) } attr_reader :receipt_number - sig { returns(T.nilable(Rendering)) } # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(T.nilable(Rendering)) } attr_reader :rendering - sig { returns(T.nilable(ShippingCost)) } # The details of the cost of shipping, including the ShippingRate applied on the invoice. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(T.nilable(ShippingDetails)) } # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(T.nilable(ShippingDetails)) } attr_reader :shipping_details - sig { returns(Integer) } # Starting customer balance before the invoice is finalized. If the invoice has not been finalized yet, this will be the current customer balance. For revision invoices, this also includes any customer balance that was applied to the original invoice. + sig { returns(Integer) } attr_reader :starting_balance - sig { returns(T.nilable(String)) } # Extra information about an invoice for the customer's credit card statement. - attr_reader :statement_descriptor sig { returns(T.nilable(String)) } + attr_reader :statement_descriptor # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # Attribute for field subscription + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(SubscriptionDetails)) } # Details about the subscription that created this invoice. + sig { returns(T.nilable(SubscriptionDetails)) } attr_reader :subscription_details - sig { returns(Integer) } # Only set for upcoming invoices that preview prorations. The time used to calculate prorations. - attr_reader :subscription_proration_date sig { returns(Integer) } + attr_reader :subscription_proration_date # Total of all subscriptions, invoice items, and prorations on the invoice before any invoice level discount or exclusive tax is applied. Item discounts are already incorporated + sig { returns(Integer) } attr_reader :subtotal - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the subtotal of the invoice before any invoice level discount or tax is applied. Item discounts are already incorporated - attr_reader :subtotal_excluding_tax sig { returns(T.nilable(Integer)) } + attr_reader :subtotal_excluding_tax # The amount of tax on this invoice. This is the sum of all the tax amounts on this invoice. + sig { returns(T.nilable(Integer)) } attr_reader :tax - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this invoice belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(ThresholdReason) } # Attribute for field threshold_reason + sig { returns(ThresholdReason) } attr_reader :threshold_reason - sig { returns(Integer) } # Total after discounts and taxes. + sig { returns(Integer) } attr_reader :total - sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } # The aggregate amounts calculated per discount across all line items. + sig { returns(T.nilable(T::Array[TotalDiscountAmount])) } attr_reader :total_discount_amounts - sig { returns(T.nilable(Integer)) } # The integer amount in cents (or local equivalent) representing the total amount of the invoice including all discounts but excluding all tax. + sig { returns(T.nilable(Integer)) } attr_reader :total_excluding_tax - sig { returns(T.nilable(T::Array[TotalMarginAmount])) } # The aggregate amounts calculated per margin across all line items. + sig { returns(T.nilable(T::Array[TotalMarginAmount])) } attr_reader :total_margin_amounts - sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } # Contains pretax credit amounts (ex: discount, credit grants, etc) that apply to this invoice. This is a combined list of total_pretax_credit_amounts across all invoice line items. + sig { returns(T.nilable(T::Array[TotalPretaxCreditAmount])) } attr_reader :total_pretax_credit_amounts - sig { returns(T::Array[TotalTaxAmount]) } # The aggregate amounts calculated per tax rate for all line items. + sig { returns(T::Array[TotalTaxAmount]) } attr_reader :total_tax_amounts - sig { returns(T.nilable(TransferData)) } # The account (if any) the payment will be attributed to for tax reporting, and where funds from the payment will be transferred to for the invoice. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(Integer)) } # Invoices are automatically paid or sent 1 hour after webhooks are delivered, or until all webhook delivery attempts have [been exhausted](https://stripe.com/docs/billing/webhooks#understand). This field tracks the time when webhooks for this invoice were successfully delivered. If the invoice had no webhooks to deliver, this will be set while the invoice is being created. + sig { returns(T.nilable(Integer)) } attr_reader :webhooks_delivered_at end end \ No newline at end of file diff --git a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi index f834292c8..9734a1a04 100644 --- a/rbi/stripe/resources/quote_preview_subscription_schedule.rbi +++ b/rbi/stripe/resources/quote_preview_subscription_schedule.rbi @@ -5,92 +5,126 @@ module Stripe class QuotePreviewSubscriptionSchedule < APIResource class AppliesTo < Stripe::StripeObject + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. sig { returns(T.nilable(String)) } attr_reader :new_reference + # The ID of the schedule the line applies to. sig { returns(T.nilable(String)) } attr_reader :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. sig { returns(String) } attr_reader :type end class CurrentPhase < Stripe::StripeObject + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(String) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject + # The original price to be migrated. sig { returns(String) } attr_reader :source_price + # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end + # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at + # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions + # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end @@ -98,265 +132,343 @@ module Stripe class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end + # The stackable discounts that will be applied to the item. sig { returns(T::Array[Discount]) } attr_reader :discounts + # ID of the price used to generate the invoice item. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # The quantity of the invoice item. sig { returns(T.nilable(Integer)) } attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the plan to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Plan)) } attr_reader :plan + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. sig { returns(T::Array[AddInvoiceItem]) } attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The invoice settings applicable during this phase. sig { returns(T.nilable(InvoiceSettings)) } attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. sig { returns(T::Array[Item]) } attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. sig { returns(String) } attr_reader :proration_behavior + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries sig { returns(T.nilable(String)) } attr_reader :trial_continuation + # When the trial ends within the phase. sig { returns(T.nilable(Integer)) } attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class Prebilling < Stripe::StripeObject + # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end + # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the schedule. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(AppliesTo) } # Attribute for field applies_to + sig { returns(AppliesTo) } attr_reader :applies_to - sig { returns(String) } # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } attr_reader :billing_behavior - sig { returns(T.nilable(Integer)) } # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. - attr_reader :canceled_at sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :completed_at - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CurrentPhase)) } # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + sig { returns(T.nilable(CurrentPhase)) } attr_reader :current_phase - sig { returns(T.any(String, Stripe::Customer)) } # ID of the customer who owns the subscription schedule. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(DefaultSettings) } # Attribute for field default_settings + sig { returns(DefaultSettings) } attr_reader :default_settings - sig { returns(String) } # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - attr_reader :end_behavior sig { returns(String) } + attr_reader :end_behavior # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastPriceMigrationError)) } # Details of the most recent price migration that failed for the subscription schedule. + sig { returns(T.nilable(LastPriceMigrationError)) } attr_reader :last_price_migration_error - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Phase]) } # Configuration for the subscription schedule's phases. + sig { returns(T::Array[Phase]) } attr_reader :phases - sig { returns(T.nilable(Prebilling)) } # Time period and invoice for a Subscription billed in advance. + sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - sig { returns(T.nilable(Integer)) } # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :released_at - sig { returns(T.nilable(String)) } # ID of the subscription once managed by the subscription schedule (if it is released). + sig { returns(T.nilable(String)) } attr_reader :released_subscription - sig { returns(String) } # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # ID of the subscription managed by the subscription schedule. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this subscription schedule belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock end end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/early_fraud_warning.rbi b/rbi/stripe/resources/radar/early_fraud_warning.rbi index 5908a679c..8d1242119 100644 --- a/rbi/stripe/resources/radar/early_fraud_warning.rbi +++ b/rbi/stripe/resources/radar/early_fraud_warning.rbi @@ -9,30 +9,93 @@ module Stripe # # Related guide: [Early fraud warnings](https://stripe.com/docs/disputes/measuring#early-fraud-warnings) class EarlyFraudWarning < APIResource - sig { returns(T::Boolean) } # An EFW is actionable if it has not received a dispute and has not been fully refunded. You may wish to proactively refund a charge that receives an EFW, in order to avoid receiving a dispute later. + sig { returns(T::Boolean) } attr_reader :actionable - sig { returns(T.any(String, Stripe::Charge)) } # ID of the charge this early fraud warning is for, optionally expanded. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The type of fraud labelled by the issuer. One of `card_never_received`, `fraudulent_card_application`, `made_with_counterfeit_card`, `made_with_lost_card`, `made_with_stolen_card`, `misc`, `unauthorized_use_of_card`. - attr_reader :fraud_type sig { returns(String) } + attr_reader :fraud_type # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::PaymentIntent)) } # ID of the Payment Intent this early fraud warning is for, optionally expanded. + sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return early fraud warnings for the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return early fraud warnings that were created during the given date interval. + sig { returns(T.any(::Stripe::Radar::EarlyFraudWarning::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::Radar::EarlyFraudWarning::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of early fraud warnings. + sig { + params(params: T.any(::Stripe::Radar::EarlyFraudWarning::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/value_list.rbi b/rbi/stripe/resources/radar/value_list.rbi index 8d38f344b..1500883ff 100644 --- a/rbi/stripe/resources/radar/value_list.rbi +++ b/rbi/stripe/resources/radar/value_list.rbi @@ -8,39 +8,168 @@ module Stripe # # Related guide: [Default Stripe lists](https://stripe.com/docs/radar/lists#managing-list-items) class ValueList < APIResource - sig { returns(String) } # The name of the value list for use in rules. + sig { returns(String) } attr_reader :alias - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The name or email address of the user who created this value list. - attr_reader :created_by sig { returns(String) } + attr_reader :created_by # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # The type of items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. + sig { returns(String) } attr_reader :item_type - sig { returns(Stripe::ListObject) } # List of items contained within this value list. + sig { returns(Stripe::ListObject) } attr_reader :list_items - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The name of the value list. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # The name of the value list for use in rules. + sig { returns(String) } + attr_accessor :alias + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The human-readable name of the value list. + sig { returns(String) } + attr_accessor :name + sig { + params(alias_: String, expand: T::Array[String], metadata: T::Hash[String, String], name: String).void + } + def initialize(alias_: nil, expand: nil, metadata: nil, name: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # The alias used to reference the value list when writing rules. + sig { returns(String) } + attr_accessor :alias + # A value contained within a value list - returns all value lists containing this value. + sig { returns(String) } + attr_accessor :contains + # Only return value lists that were created during the given date interval. + sig { returns(T.any(::Stripe::Radar::ValueList::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(alias_: String, contains: String, created: T.any(::Stripe::Radar::ValueList::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + alias_: nil, + contains: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # The name of the value list for use in rules. + sig { returns(String) } + attr_accessor :alias + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + sig { returns(String) } + attr_accessor :item_type + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The human-readable name of the value list. + sig { returns(String) } + attr_accessor :name + sig { + params(alias_: String, expand: T::Array[String], item_type: String, metadata: T::Hash[String, String], name: String).void + } + def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil); end + end + # Creates a new ValueList object, which can then be referenced in rules. + sig { + params(params: T.any(::Stripe::Radar::ValueList::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def self.create(params = {}, opts = {}); end + + # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. + sig { + params(id: String, params: T.any(::Stripe::Radar::ValueList::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. + sig { + params(params: T.any(::Stripe::Radar::ValueList::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def delete(params = {}, opts = {}); end + + # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Radar::ValueList::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable. + sig { + params(id: String, params: T.any(::Stripe::Radar::ValueList::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/radar/value_list_item.rbi b/rbi/stripe/resources/radar/value_list_item.rbi index 6b9e595c1..a1894c9dd 100644 --- a/rbi/stripe/resources/radar/value_list_item.rbi +++ b/rbi/stripe/resources/radar/value_list_item.rbi @@ -8,30 +8,127 @@ module Stripe # # Related guide: [Managing list items](https://stripe.com/docs/radar/lists#managing-list-items) class ValueListItem < APIResource - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # The name or email address of the user who added this item to the value list. - attr_reader :created_by sig { returns(String) } + attr_reader :created_by # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The value of the item. - attr_reader :value sig { returns(String) } + attr_reader :value # The identifier of the value list this item belongs to. + sig { returns(String) } attr_reader :value_list - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return items that were created during the given date interval. + sig { returns(T.any(::Stripe::Radar::ValueListItem::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Return items belonging to the parent list whose value matches the specified value (using an "is like" match). + sig { returns(String) } + attr_accessor :value + # Identifier for the parent value list this item belongs to. + sig { returns(String) } + attr_accessor :value_list + sig { + params(created: T.any(::Stripe::Radar::ValueListItem::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, value: String, value_list: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + value: nil, + value_list: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The value of the item (whose type must match the type of the parent value list). + sig { returns(String) } + attr_accessor :value + # The identifier of the value list which the created item will be added to. + sig { returns(String) } + attr_accessor :value_list + sig { params(expand: T::Array[String], value: String, value_list: String).void } + def initialize(expand: nil, value: nil, value_list: nil); end + end + # Creates a new ValueListItem object, which is added to the specified parent value list. + sig { + params(params: T.any(::Stripe::Radar::ValueListItem::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem) + } + def self.create(params = {}, opts = {}); end + + # Deletes a ValueListItem object, removing it from its parent value list. + sig { + params(id: String, params: T.any(::Stripe::Radar::ValueListItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes a ValueListItem object, removing it from its parent value list. + sig { + params(params: T.any(::Stripe::Radar::ValueListItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem) + } + def delete(params = {}, opts = {}); end + + # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Radar::ValueListItem::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/refund.rbi b/rbi/stripe/resources/refund.rbi index fdd1fc9e1..f996d994f 100644 --- a/rbi/stripe/resources/refund.rbi +++ b/rbi/stripe/resources/refund.rbi @@ -17,26 +17,35 @@ module Stripe class AmazonPay < Stripe::StripeObject; end class AuBankTransfer < Stripe::StripeObject; end class Blik < Stripe::StripeObject + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class BrBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Card < Stripe::StripeObject + # Value of the reference number assigned to the refund. sig { returns(String) } attr_reader :reference + # Status of the reference number on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(String) } attr_reader :reference_status + # Type of the reference number assigned to the refund. sig { returns(String) } attr_reader :reference_type + # The type of refund. This can be `refund`, `reversal`, or `pending`. sig { returns(String) } attr_reader :type end @@ -44,47 +53,61 @@ module Stripe class CustomerCashBalance < Stripe::StripeObject; end class Eps < Stripe::StripeObject; end class EuBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class GbBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Giropay < Stripe::StripeObject; end class Grabpay < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class JpBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class Klarna < Stripe::StripeObject; end class Multibanco < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class MxBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class P24 < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end @@ -94,171 +117,399 @@ module Stripe class Revolut < Stripe::StripeObject; end class Sofort < Stripe::StripeObject; end class Swish < Stripe::StripeObject + # For refunds declined by the network, a decline code provided by the network which indicates the reason the refund failed. sig { returns(T.nilable(String)) } attr_reader :network_decline_code + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class ThBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class UsBankTransfer < Stripe::StripeObject + # The reference assigned to the refund. sig { returns(T.nilable(String)) } attr_reader :reference + # Status of the reference on the refund. This can be `pending`, `available` or `unavailable`. sig { returns(T.nilable(String)) } attr_reader :reference_status end class WechatPay < Stripe::StripeObject; end class Zip < Stripe::StripeObject; end + # Attribute for field affirm sig { returns(Affirm) } attr_reader :affirm + # Attribute for field afterpay_clearpay sig { returns(AfterpayClearpay) } attr_reader :afterpay_clearpay + # Attribute for field alipay sig { returns(Alipay) } attr_reader :alipay + # Attribute for field alma sig { returns(Alma) } attr_reader :alma + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_bank_transfer sig { returns(AuBankTransfer) } attr_reader :au_bank_transfer + # Attribute for field blik sig { returns(Blik) } attr_reader :blik + # Attribute for field br_bank_transfer sig { returns(BrBankTransfer) } attr_reader :br_bank_transfer + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field customer_cash_balance sig { returns(CustomerCashBalance) } attr_reader :customer_cash_balance + # Attribute for field eps sig { returns(Eps) } attr_reader :eps + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # Attribute for field gb_bank_transfer sig { returns(GbBankTransfer) } attr_reader :gb_bank_transfer + # Attribute for field giropay sig { returns(Giropay) } attr_reader :giropay + # Attribute for field grabpay sig { returns(Grabpay) } attr_reader :grabpay + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field jp_bank_transfer sig { returns(JpBankTransfer) } attr_reader :jp_bank_transfer + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field multibanco sig { returns(Multibanco) } attr_reader :multibanco + # Attribute for field mx_bank_transfer sig { returns(MxBankTransfer) } attr_reader :mx_bank_transfer + # Attribute for field p24 sig { returns(P24) } attr_reader :p24 + # Attribute for field paynow sig { returns(Paynow) } attr_reader :paynow + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field pix sig { returns(Pix) } attr_reader :pix + # Attribute for field revolut sig { returns(Revolut) } attr_reader :revolut + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # Attribute for field swish sig { returns(Swish) } attr_reader :swish + # Attribute for field th_bank_transfer sig { returns(ThBankTransfer) } attr_reader :th_bank_transfer + # The type of transaction-specific details of the payment method used in the refund (e.g., `card`). An additional hash is included on `destination_details` with a name matching this value. It contains information specific to the refund transaction. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_transfer sig { returns(UsBankTransfer) } attr_reader :us_bank_transfer + # Attribute for field wechat_pay sig { returns(WechatPay) } attr_reader :wechat_pay + # Attribute for field zip sig { returns(Zip) } attr_reader :zip end class NextAction < Stripe::StripeObject class DisplayDetails < Stripe::StripeObject class EmailSent < Stripe::StripeObject + # The timestamp when the email was sent. sig { returns(Integer) } attr_reader :email_sent_at + # The recipient's email address. sig { returns(String) } attr_reader :email_sent_to end + # Attribute for field email_sent sig { returns(EmailSent) } attr_reader :email_sent + # The expiry timestamp. sig { returns(Integer) } attr_reader :expires_at end + # Attribute for field display_details sig { returns(DisplayDetails) } attr_reader :display_details + # Type of the next action to perform. sig { returns(String) } attr_reader :type end - sig { returns(Integer) } # Amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # Balance transaction that describes the impact on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } # ID of the charge that's refunded. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # An arbitrary string attached to the object. You can use this for displaying to users (available on non-card refunds only). + sig { returns(String) } attr_reader :description - sig { returns(DestinationDetails) } # Attribute for field destination_details + sig { returns(DestinationDetails) } attr_reader :destination_details - sig { returns(T.any(String, Stripe::BalanceTransaction)) } # After the refund fails, this balance transaction describes the adjustment made on your account balance that reverses the initial balance transaction. + sig { returns(T.any(String, Stripe::BalanceTransaction)) } attr_reader :failure_balance_transaction - sig { returns(String) } # Provides the reason for the refund failure. Possible values are: `lost_or_stolen_card`, `expired_or_canceled_card`, `charge_for_pending_refund_disputed`, `insufficient_funds`, `declined`, `merchant_request`, or `unknown`. - attr_reader :failure_reason sig { returns(String) } + attr_reader :failure_reason # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # For payment methods without native refund support (for example, Konbini, PromptPay), provide an email address for the customer to receive refund instructions. + sig { returns(String) } attr_reader :instructions_email - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(NextAction) } # Attribute for field next_action + sig { returns(NextAction) } attr_reader :next_action - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } # ID of the PaymentIntent that's refunded. + sig { returns(T.nilable(T.any(String, Stripe::PaymentIntent))) } attr_reader :payment_intent - sig { returns(T.nilable(String)) } # Reason for the refund, which is either user-provided (`duplicate`, `fraudulent`, or `requested_by_customer`) or generated by Stripe internally (`expired_uncaptured_charge`). - attr_reader :reason sig { returns(T.nilable(String)) } + attr_reader :reason # This is the transaction number that appears on email receipts sent for this refund. + sig { returns(T.nilable(String)) } attr_reader :receipt_number - sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } # The transfer reversal that's associated with the refund. Only present if the charge came from another Stripe account. + sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } attr_reader :source_transfer_reversal - sig { returns(T.nilable(String)) } # Status of the refund. This can be `pending`, `requires_action`, `succeeded`, `failed`, or `canceled`. Learn more about [failed refunds](https://stripe.com/docs/refunds#failed-refunds). + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } # This refers to the transfer reversal object if the accompanying transfer reverses. This is only applicable if the charge was created using the destination parameter. + sig { returns(T.nilable(T.any(String, Stripe::Reversal))) } attr_reader :transfer_reversal + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return refunds for the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return refunds that were created during the given date interval. + sig { returns(T.any(::Stripe::Refund::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return refunds for the PaymentIntent specified by this ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::Refund::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Attribute for param field amount + sig { returns(Integer) } + attr_accessor :amount + # The identifier of the charge to refund. + sig { returns(String) } + attr_accessor :charge + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Customer whose customer balance to refund from. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. + sig { returns(String) } + attr_accessor :instructions_email + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Origin of the refund + sig { returns(String) } + attr_accessor :origin + # The identifier of the PaymentIntent to refund. + sig { returns(String) } + attr_accessor :payment_intent + # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + sig { returns(String) } + attr_accessor :reason + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :refund_application_fee + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :reverse_transfer + sig { + params(amount: Integer, charge: String, currency: String, customer: String, expand: T::Array[String], instructions_email: String, metadata: T.nilable(T::Hash[String, String]), origin: String, payment_intent: String, reason: String, refund_application_fee: T::Boolean, reverse_transfer: T::Boolean).void + } + def initialize( + amount: nil, + charge: nil, + currency: nil, + customer: nil, + expand: nil, + instructions_email: nil, + metadata: nil, + origin: nil, + payment_intent: nil, + reason: nil, + refund_application_fee: nil, + reverse_transfer: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels a refund with a status of requires_action. + # + # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state. + sig { + params(params: T.any(::Stripe::Refund::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def cancel(params = {}, opts = {}); end + + # Cancels a refund with a status of requires_action. + # + # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state. + sig { + params(refund: String, params: T.any(::Stripe::Refund::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def self.cancel(refund, params = {}, opts = {}); end + + # When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + # + # Creating a new refund will refund a charge that has previously been created but not yet refunded. + # Funds will be refunded to the credit or debit card that was originally charged. + # + # You can optionally refund only part of a charge. + # You can do so multiple times, until the entire charge has been refunded. + # + # Once entirely refunded, a charge can't be refunded again. + # This method will raise an error when called on an already-refunded charge, + # or when trying to refund more money than is left on a charge. + sig { + params(params: T.any(::Stripe::Refund::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. + sig { + params(params: T.any(::Stripe::Refund::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. + # + # This request only accepts metadata as an argument. + sig { + params(id: String, params: T.any(::Stripe::Refund::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/reporting/report_run.rbi b/rbi/stripe/resources/reporting/report_run.rbi index c9a65293e..e4448d0db 100644 --- a/rbi/stripe/resources/reporting/report_run.rbi +++ b/rbi/stripe/resources/reporting/report_run.rbi @@ -14,58 +14,181 @@ module Stripe # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). class ReportRun < APIResource class Parameters < Stripe::StripeObject + # The set of output columns requested for inclusion in the report run. sig { returns(T::Array[String]) } attr_reader :columns + # Connected account ID by which to filter the report run. sig { returns(String) } attr_reader :connected_account + # Currency of objects to be included in the report run. sig { returns(String) } attr_reader :currency + # Ending timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after the user specified `interval_start` and 1 second before this report's last `data_available_end` value. sig { returns(Integer) } attr_reader :interval_end + # Starting timestamp of data to be included in the report run. Can be any UTC timestamp between 1 second after this report's `data_available_start` and 1 second before the user specified `interval_end` value. sig { returns(Integer) } attr_reader :interval_start + # Payout ID by which to filter the report run. sig { returns(String) } attr_reader :payout + # Category of balance transactions to be included in the report run. sig { returns(String) } attr_reader :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. sig { returns(String) } attr_reader :timezone end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # If something should go wrong during the run, a message about the failure (populated when # `status=failed`). + sig { returns(T.nilable(String)) } attr_reader :error - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # `true` if the report is run on live mode data and `false` if it is run on test mode data. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Parameters) } # Attribute for field parameters + sig { returns(Parameters) } attr_reader :parameters - sig { returns(String) } # The ID of the [report type](https://stripe.com/docs/reports/report-types) to run, such as `"balance.summary.1"`. + sig { returns(String) } attr_reader :report_type - sig { returns(T.nilable(Stripe::File)) } # The file object representing the result of the report run (populated when # `status=succeeded`). + sig { returns(T.nilable(Stripe::File)) } attr_reader :result - sig { returns(String) } # Status of this report run. This will be `pending` when the run is initially created. # When the run finishes, this will be set to `succeeded` and the `result` field will be populated. # Rarely, we may encounter an error, at which point this will be set to `failed` and the `error` field will be populated. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(Integer)) } # Timestamp at which this run successfully finished (populated when # `status=succeeded`). Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :succeeded_at + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return Report Runs that were created during the given date interval. + sig { returns(T.any(::Stripe::Reporting::ReportRun::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Reporting::ReportRun::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Parameters < Stripe::RequestParams + # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. + sig { returns(T::Array[String]) } + attr_accessor :columns + # Connected account ID to filter for in the report run. + sig { returns(String) } + attr_accessor :connected_account + # Currency of objects to be included in the report run. + sig { returns(String) } + attr_accessor :currency + # Ending timestamp of data to be included in the report run (exclusive). + sig { returns(Integer) } + attr_accessor :interval_end + # Starting timestamp of data to be included in the report run. + sig { returns(Integer) } + attr_accessor :interval_start + # Payout ID by which to filter the report run. + sig { returns(String) } + attr_accessor :payout + # Category of balance transactions to be included in the report run. + sig { returns(String) } + attr_accessor :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + sig { returns(String) } + attr_accessor :timezone + sig { + params(columns: T::Array[String], connected_account: String, currency: String, interval_end: Integer, interval_start: Integer, payout: String, reporting_category: String, timezone: String).void + } + def initialize( + columns: nil, + connected_account: nil, + currency: nil, + interval_end: nil, + interval_start: nil, + payout: nil, + reporting_category: nil, + timezone: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + sig { returns(::Stripe::Reporting::ReportRun::CreateParams::Parameters) } + attr_accessor :parameters + # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. + sig { returns(String) } + attr_accessor :report_type + sig { + params(expand: T::Array[String], parameters: ::Stripe::Reporting::ReportRun::CreateParams::Parameters, report_type: String).void + } + def initialize(expand: nil, parameters: nil, report_type: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + sig { + params(params: T.any(::Stripe::Reporting::ReportRun::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportRun) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of Report Runs, with the most recent appearing first. + sig { + params(params: T.any(::Stripe::Reporting::ReportRun::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/reporting/report_type.rbi b/rbi/stripe/resources/reporting/report_type.rbi index b8e3c9782..5380561a3 100644 --- a/rbi/stripe/resources/reporting/report_type.rbi +++ b/rbi/stripe/resources/reporting/report_type.rbi @@ -13,33 +13,52 @@ module Stripe # Note that certain report types can only be run based on your live-mode data (not test-mode # data), and will error when queried without a [live-mode API key](https://stripe.com/docs/keys#test-live-modes). class ReportType < APIResource - sig { returns(Integer) } # Most recent time for which this Report Type is available. Measured in seconds since the Unix epoch. - attr_reader :data_available_end sig { returns(Integer) } + attr_reader :data_available_end # Earliest time for which this Report Type is available. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :data_available_start - sig { returns(T.nilable(T::Array[String])) } # List of column names that are included by default when this Report Type gets run. (If the Report Type doesn't support the `columns` parameter, this will be null.) + sig { returns(T.nilable(T::Array[String])) } attr_reader :default_columns - sig { returns(String) } # The [ID of the Report Type](https://stripe.com/docs/reporting/statements/api#available-report-types), such as `balance.summary.1`. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # Human-readable name of the Report Type - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # When this Report Type was latest updated. Measured in seconds since the Unix epoch. - attr_reader :updated sig { returns(Integer) } + attr_reader :updated # Version of the Report Type. Different versions report with the same ID will have the same purpose, but may take different run parameters or have different result schemas. + sig { returns(Integer) } attr_reader :version + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a full list of Report Types. + sig { + params(params: T.any(::Stripe::Reporting::ReportType::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/reserve_transaction.rbi b/rbi/stripe/resources/reserve_transaction.rbi index 5bec97e5b..4748d8af3 100644 --- a/rbi/stripe/resources/reserve_transaction.rbi +++ b/rbi/stripe/resources/reserve_transaction.rbi @@ -4,20 +4,20 @@ # typed: true module Stripe class ReserveTransaction < APIResource - sig { returns(Integer) } # Attribute for field amount + sig { returns(Integer) } attr_reader :amount - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object end end \ No newline at end of file diff --git a/rbi/stripe/resources/reversal.rbi b/rbi/stripe/resources/reversal.rbi index bc5c1f4eb..4e79bbbd4 100644 --- a/rbi/stripe/resources/reversal.rbi +++ b/rbi/stripe/resources/reversal.rbi @@ -17,35 +17,35 @@ module Stripe # # Related guide: [Reverse transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#reverse-transfers) class Reversal < APIResource - sig { returns(Integer) } # Amount, in cents (or local equivalent). + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # Balance transaction that describes the impact on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(T.any(String, Stripe::Refund))) } # Linked payment refund for the transfer reversal. + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } attr_reader :destination_payment_refund - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Refund))) } # ID of the refund responsible for the transfer reversal. + sig { returns(T.nilable(T.any(String, Stripe::Refund))) } attr_reader :source_refund - sig { returns(T.any(String, Stripe::Transfer)) } # ID of the transfer that was reversed. + sig { returns(T.any(String, Stripe::Transfer)) } attr_reader :transfer end end \ No newline at end of file diff --git a/rbi/stripe/resources/review.rbi b/rbi/stripe/resources/review.rbi index ea0280f45..c700b09ba 100644 --- a/rbi/stripe/resources/review.rbi +++ b/rbi/stripe/resources/review.rbi @@ -9,68 +9,151 @@ module Stripe # [here](https://stripe.com/docs/radar/reviews). class Review < APIResource class IpAddressLocation < Stripe::StripeObject + # The city where the payment originated. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter ISO code representing the country where the payment originated. sig { returns(T.nilable(String)) } attr_reader :country + # The geographic latitude where the payment originated. sig { returns(T.nilable(Float)) } attr_reader :latitude + # The geographic longitude where the payment originated. sig { returns(T.nilable(Float)) } attr_reader :longitude + # The state/county/province/region where the payment originated. sig { returns(T.nilable(String)) } attr_reader :region end class Session < Stripe::StripeObject + # The browser used in this browser session (e.g., `Chrome`). sig { returns(T.nilable(String)) } attr_reader :browser + # Information about the device used for the browser session (e.g., `Samsung SM-G930T`). sig { returns(T.nilable(String)) } attr_reader :device + # The platform for the browser session (e.g., `Macintosh`). sig { returns(T.nilable(String)) } attr_reader :platform + # The version for the browser session (e.g., `61.0.3163.100`). sig { returns(T.nilable(String)) } attr_reader :version end - sig { returns(T.nilable(String)) } # The ZIP or postal code of the card used, if applicable. + sig { returns(T.nilable(String)) } attr_reader :billing_zip - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } # The charge associated with this review. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :charge - sig { returns(T.nilable(String)) } # The reason the review was closed, or null if it has not yet been closed. One of `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + sig { returns(T.nilable(String)) } attr_reader :closed_reason - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The IP address where the payment originated. + sig { returns(T.nilable(String)) } attr_reader :ip_address - sig { returns(T.nilable(IpAddressLocation)) } # Information related to the location of the payment. Note that this information is an approximation and attempts to locate the nearest population center - it should not be used to determine a specific address. + sig { returns(T.nilable(IpAddressLocation)) } attr_reader :ip_address_location - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # If `true`, the review needs action. + sig { returns(T::Boolean) } attr_reader :open - sig { returns(String) } # The reason the review was opened. One of `rule` or `manual`. + sig { returns(String) } attr_reader :opened_reason - sig { returns(T.any(String, Stripe::PaymentIntent)) } # The PaymentIntent ID associated with this review, if one exists. + sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent - sig { returns(String) } # The reason the review is currently open or closed. One of `rule`, `manual`, `approved`, `refunded`, `refunded_as_fraud`, `disputed`, or `redacted`. + sig { returns(String) } attr_reader :reason - sig { returns(T.nilable(Session)) } # Information related to the browsing session of the user who initiated the payment. + sig { returns(T.nilable(Session)) } attr_reader :session + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return reviews that were created during the given date interval. + sig { returns(T.any(::Stripe::Review::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Review::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ApproveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Approves a Review object, closing it and removing it from the list of reviews. + sig { + params(params: T.any(::Stripe::Review::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review) + } + def approve(params = {}, opts = {}); end + + # Approves a Review object, closing it and removing it from the list of reviews. + sig { + params(review: String, params: T.any(::Stripe::Review::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review) + } + def self.approve(review, params = {}, opts = {}); end + + # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Review::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_attempt.rbi b/rbi/stripe/resources/setup_attempt.rbi index 22ce6eaf5..f553672c9 100644 --- a/rbi/stripe/resources/setup_attempt.rbi +++ b/rbi/stripe/resources/setup_attempt.rbi @@ -14,120 +14,177 @@ module Stripe class AuBecsDebit < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject; end class Bancontact < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the Bancontact authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Bancontact directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class Boleto < Stripe::StripeObject; end class Card < Stripe::StripeObject class Checks < Stripe::StripeObject + # If a address line1 was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # If a address postal code was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :address_postal_code_check + # If a CVC was provided, results of the check, one of `pass`, `fail`, `unavailable`, or `unchecked`. sig { returns(T.nilable(String)) } attr_reader :cvc_check end class ThreeDSecure < Stripe::StripeObject + # For authenticated transactions: how the customer was authenticated by + # the issuing bank. sig { returns(T.nilable(String)) } attr_reader :authentication_flow + # The Electronic Commerce Indicator (ECI). A protocol-level field + # indicating what degree of authentication was performed. sig { returns(T.nilable(String)) } attr_reader :electronic_commerce_indicator + # Indicates the outcome of 3D Secure authentication. sig { returns(T.nilable(String)) } attr_reader :result + # Additional information about why 3D Secure succeeded or failed based + # on the `result`. sig { returns(T.nilable(String)) } attr_reader :result_reason + # The 3D Secure 1 XID or 3D Secure 2 Directory Server Transaction ID + # (dsTransId) for this payment. sig { returns(T.nilable(String)) } attr_reader :transaction_id + # The version of 3D Secure that was used. sig { returns(T.nilable(String)) } attr_reader :version end class Wallet < Stripe::StripeObject class ApplePay < Stripe::StripeObject; end class GooglePay < Stripe::StripeObject; end + # Attribute for field apple_pay sig { returns(ApplePay) } attr_reader :apple_pay + # Attribute for field google_pay sig { returns(GooglePay) } attr_reader :google_pay + # The type of the card wallet, one of `apple_pay`, `google_pay`, or `link`. An additional hash is included on the Wallet subhash with a name matching this value. It contains additional information specific to the card wallet type. sig { returns(String) } attr_reader :type end + # Card brand. Can be `amex`, `diners`, `discover`, `eftpos_au`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :brand + # Check results by Card networks on Card address and CVC at the time of authorization sig { returns(T.nilable(Checks)) } attr_reader :checks + # Two-letter ISO code representing the country of the card. You could use this attribute to get a sense of the international breakdown of cards you've collected. sig { returns(T.nilable(String)) } attr_reader :country + # A high-level description of the type of cards issued in this range. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :description + # Two-digit number representing the card's expiration month. sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Four-digit number representing the card's expiration year. sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Uniquely identifies this particular card number. You can use this attribute to check whether two customers who’ve signed up with you are using the same card number, for example. For payment methods that tokenize card information (Apple Pay, Google Pay), the tokenized number might be provided instead of the underlying card number. + # + # *As of May 1, 2021, card fingerprint in India for Connect changed to allow two fingerprints for the same card---one for India and one for the rest of the world.* sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Card funding type. Can be `credit`, `debit`, `prepaid`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :funding + # Issuer identification number of the card. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :iin + # The name of the card's issuing bank. (For internal use only and not typically available in standard API requests.) sig { returns(T.nilable(String)) } attr_reader :issuer + # The last four digits of the card. sig { returns(T.nilable(String)) } attr_reader :last4 + # Identifies which network this charge was processed on. Can be `amex`, `cartes_bancaires`, `diners`, `discover`, `eftpos_au`, `interac`, `jcb`, `link`, `mastercard`, `unionpay`, `visa`, or `unknown`. sig { returns(T.nilable(String)) } attr_reader :network + # Populated if this authorization used 3D Secure authentication. sig { returns(T.nilable(ThreeDSecure)) } attr_reader :three_d_secure + # If this Card is part of a card wallet, this contains the details of the card wallet. sig { returns(T.nilable(Wallet)) } attr_reader :wallet end class CardPresent < Stripe::StripeObject class Offline < Stripe::StripeObject + # Time at which the payment was collected while offline sig { returns(T.nilable(Integer)) } attr_reader :stored_at + # The method used to process this payment method offline. Only deferred is allowed. sig { returns(T.nilable(String)) } attr_reader :type end + # The ID of the Card PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_card + # Details about payments collected offline. sig { returns(T.nilable(Offline)) } attr_reader :offline end class Cashapp < Stripe::StripeObject; end class IdBankTransfer < Stripe::StripeObject + # Bank where the account is located. sig { returns(T.nilable(String)) } attr_reader :bank + # Local bank code of the bank. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Merchant name and billing details name, for the customer to check for the correct merchant when performing the bank transfer. sig { returns(T.nilable(String)) } attr_reader :display_name end class Ideal < Stripe::StripeObject + # The customer's bank. Can be one of `abn_amro`, `asn_bank`, `bunq`, `handelsbanken`, `ing`, `knab`, `moneyou`, `n26`, `nn`, `rabobank`, `regiobank`, `revolut`, `sns_bank`, `triodos_bank`, `van_lanschot`, or `yoursafe`. sig { returns(T.nilable(String)) } attr_reader :bank + # The Bank Identifier Code of the customer's bank. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Owner's verified full name. Values are verified or provided by iDEAL directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end @@ -140,149 +197,285 @@ module Stripe class RevolutPay < Stripe::StripeObject; end class SepaDebit < Stripe::StripeObject; end class Sofort < Stripe::StripeObject + # Bank code of bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_code + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Bank Identifier Code of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bic + # The ID of the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :generated_sepa_debit + # The mandate for the SEPA Direct Debit PaymentMethod which was generated by this SetupAttempt. sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :generated_sepa_debit_mandate + # Last four characters of the IBAN. sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Preferred language of the Sofort authorization page that the customer is redirected to. + # Can be one of `en`, `de`, `fr`, or `nl` sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Owner's verified full name. Values are verified or provided by Sofort directly + # (if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name end class UsBankAccount < Stripe::StripeObject; end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field au_becs_debit sig { returns(AuBecsDebit) } attr_reader :au_becs_debit + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field bancontact sig { returns(Bancontact) } attr_reader :bancontact + # Attribute for field boleto sig { returns(Boleto) } attr_reader :boleto + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field cashapp sig { returns(Cashapp) } attr_reader :cashapp + # Attribute for field id_bank_transfer sig { returns(IdBankTransfer) } attr_reader :id_bank_transfer + # Attribute for field ideal sig { returns(Ideal) } attr_reader :ideal + # Attribute for field kakao_pay sig { returns(KakaoPay) } attr_reader :kakao_pay + # Attribute for field klarna sig { returns(Klarna) } attr_reader :klarna + # Attribute for field kr_card sig { returns(KrCard) } attr_reader :kr_card + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field revolut_pay sig { returns(RevolutPay) } attr_reader :revolut_pay + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field sofort sig { returns(Sofort) } attr_reader :sofort + # The type of the payment method used in the SetupIntent (e.g., `card`). An additional hash is included on `payment_method_details` with a name matching this value. It contains confirmation-specific information for the payment method. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class SetupError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # The value of [application](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-application) on the SetupIntent at the time of this confirmation. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T::Boolean) } # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } attr_reader :attach_to_self - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # The value of [customer](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-customer) on the SetupIntent at the time of this confirmation. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(T::Array[String])) } # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T.nilable(T::Array[String])) } attr_reader :flow_directions - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The value of [on_behalf_of](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-on_behalf_of) on the SetupIntent at the time of this confirmation. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.any(String, Stripe::PaymentMethod)) } # ID of the payment method used with this SetupAttempt. + sig { returns(T.any(String, Stripe::PaymentMethod)) } attr_reader :payment_method - sig { returns(PaymentMethodDetails) } # Attribute for field payment_method_details + sig { returns(PaymentMethodDetails) } attr_reader :payment_method_details - sig { returns(T.nilable(SetupError)) } # The error encountered during this attempt to confirm the SetupIntent, if any. + sig { returns(T.nilable(SetupError)) } attr_reader :setup_error - sig { returns(T.any(String, Stripe::SetupIntent)) } # ID of the SetupIntent that this attempt belongs to. + sig { returns(T.any(String, Stripe::SetupIntent)) } attr_reader :setup_intent - sig { returns(String) } # Status of this SetupAttempt, one of `requires_confirmation`, `requires_action`, `processing`, `succeeded`, `failed`, or `abandoned`. - attr_reader :status sig { returns(String) } + attr_reader :status # The value of [usage](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-usage) on the SetupIntent at the time of this confirmation, one of `off_session` or `on_session`. + sig { returns(String) } attr_reader :usage + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A filter on the list, based on the object `created` field. The value + # can be a string with an integer Unix timestamp or a + # dictionary with a number of different query options. + sig { returns(T.any(::Stripe::SetupAttempt::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return SetupAttempts created by the SetupIntent specified by + # this ID. + sig { returns(String) } + attr_accessor :setup_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::SetupAttempt::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, setup_intent: String, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + setup_intent: nil, + starting_after: nil + ); end + end + # Returns a list of SetupAttempts that associate with a provided SetupIntent. + sig { + params(params: T.any(::Stripe::SetupAttempt::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/setup_intent.rbi b/rbi/stripe/resources/setup_intent.rbi index 30c69a94c..31ae5d799 100644 --- a/rbi/stripe/resources/setup_intent.rbi +++ b/rbi/stripe/resources/setup_intent.rbi @@ -26,331 +26,4013 @@ module Stripe # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) class SetupIntent < APIResource class AutomaticPaymentMethods < Stripe::StripeObject + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. sig { returns(String) } attr_reader :allow_redirects + # Automatically calculates compatible payment methods sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end class LastSetupError < Stripe::StripeObject + # For card errors, the ID of the failed charge. sig { returns(String) } attr_reader :charge + # For some errors that could be handled programmatically, a short string indicating the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :code + # For card errors resulting from a card issuer decline, a short string indicating the [card issuer's reason for the decline](https://stripe.com/docs/declines#issuer-declines) if they provide one. sig { returns(String) } attr_reader :decline_code + # A URL to more information about the [error code](https://stripe.com/docs/error-codes) reported. sig { returns(String) } attr_reader :doc_url + # A human-readable message providing more details about the error. For card errors, these messages can be shown to your users. sig { returns(String) } attr_reader :message + # For card errors resulting from a card issuer decline, a 2 digit code which indicates the advice given to merchant by the card network on how to proceed with an error. sig { returns(String) } attr_reader :network_advice_code + # For card errors resulting from a card issuer decline, a brand specific 2, 3, or 4 digit code which indicates the reason the authorization failed. sig { returns(String) } attr_reader :network_decline_code + # If the error is parameter-specific, the parameter related to the error. For example, you can use this to display a message near the correct form field. sig { returns(String) } attr_reader :param + # A PaymentIntent guides you through the process of collecting a payment from your customer. + # We recommend that you create exactly one PaymentIntent for each order or + # customer session in your system. You can reference the PaymentIntent later to + # see the history of payment attempts for a particular session. + # + # A PaymentIntent transitions through + # [multiple statuses](https://stripe.com/docs/payments/intents#intent-statuses) + # throughout its lifetime as it interfaces with Stripe.js to perform + # authentication flows and ultimately creates at most one successful charge. + # + # Related guide: [Payment Intents API](https://stripe.com/docs/payments/payment-intents) sig { returns(Stripe::PaymentIntent) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # If the error is specific to the type of payment method, the payment method type that had a problem. This field is only populated for invoice-related errors. sig { returns(String) } attr_reader :payment_method_type + # A URL to the request log entry in your dashboard. sig { returns(String) } attr_reader :request_log_url + # A SetupIntent guides you through the process of setting up and saving a customer's payment credentials for future payments. + # For example, you can use a SetupIntent to set up and save your customer's card without immediately collecting a payment. + # Later, you can use [PaymentIntents](https://stripe.com/docs/api#payment_intents) to drive the payment flow. + # + # Create a SetupIntent when you're ready to collect your customer's payment credentials. + # Don't maintain long-lived, unconfirmed SetupIntents because they might not be valid. + # The SetupIntent transitions through multiple [statuses](https://docs.stripe.com/payments/intents#intent-statuses) as it guides + # you through the setup process. + # + # Successful SetupIntents result in payment credentials that are optimized for future payments. + # For example, cardholders in [certain regions](https://stripe.com/guides/strong-customer-authentication) might need to be run through + # [Strong Customer Authentication](https://docs.stripe.com/strong-customer-authentication) during payment method collection + # to streamline later [off-session payments](https://docs.stripe.com/payments/setup-intents). + # If you use the SetupIntent with a [Customer](https://stripe.com/docs/api#setup_intent_object-customer), + # it automatically attaches the resulting payment method to that Customer after successful setup. + # We recommend using SetupIntents or [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) on + # PaymentIntents to save payment methods to prevent saving invalid or unoptimized payment methods. + # + # By using SetupIntents, you can reduce friction for your customers, even as regulations change over time. + # + # Related guide: [Setup Intents API](https://docs.stripe.com/payments/setup-intents) sig { returns(Stripe::SetupIntent) } attr_reader :setup_intent + # Attribute for field source sig { returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) } attr_reader :source + # The type of error returned. One of `api_error`, `card_error`, `idempotency_error`, or `invalid_request_error` sig { returns(String) } attr_reader :type end class NextAction < Stripe::StripeObject class CashappHandleRedirectOrDisplayQrCode < Stripe::StripeObject class QrCode < Stripe::StripeObject + # The date (unix timestamp) when the QR code expires. sig { returns(Integer) } attr_reader :expires_at + # The image_url_png string used to render QR code sig { returns(String) } attr_reader :image_url_png + # The image_url_svg string used to render QR code sig { returns(String) } attr_reader :image_url_svg end + # The URL to the hosted Cash App Pay instructions page, which allows customers to view the QR code, and supports QR code refreshing on expiration. sig { returns(String) } attr_reader :hosted_instructions_url + # The url for mobile redirect based auth sig { returns(String) } attr_reader :mobile_auth_url + # Attribute for field qr_code sig { returns(QrCode) } attr_reader :qr_code end class RedirectToUrl < Stripe::StripeObject + # If the customer does not exit their browser while authenticating, they will be redirected to this specified URL after completion. sig { returns(T.nilable(String)) } attr_reader :return_url + # The URL you must redirect your customer to in order to authenticate. sig { returns(T.nilable(String)) } attr_reader :url end class VerifyWithMicrodeposits < Stripe::StripeObject + # The timestamp when the microdeposits are expected to land. sig { returns(Integer) } attr_reader :arrival_date + # The URL for the hosted verification page, which allows customers to verify their bank account. sig { returns(String) } attr_reader :hosted_verification_url + # The type of the microdeposit sent to the customer. Used to distinguish between different verification methods. sig { returns(T.nilable(String)) } attr_reader :microdeposit_type end + # Attribute for field cashapp_handle_redirect_or_display_qr_code sig { returns(CashappHandleRedirectOrDisplayQrCode) } attr_reader :cashapp_handle_redirect_or_display_qr_code + # Attribute for field redirect_to_url sig { returns(RedirectToUrl) } attr_reader :redirect_to_url + # Type of the next action to perform, one of `redirect_to_url`, `use_stripe_sdk`, `alipay_handle_redirect`, `oxxo_display_details`, or `verify_with_microdeposits`. sig { returns(String) } attr_reader :type + # When confirming a SetupIntent with Stripe.js, Stripe.js depends on the contents of this dictionary to invoke authentication flows. The shape of the contents is subject to change and is only intended to be used by Stripe.js. sig { returns(T::Hash[String, T.untyped]) } attr_reader :use_stripe_sdk + # Attribute for field verify_with_microdeposits sig { returns(VerifyWithMicrodeposits) } attr_reader :verify_with_microdeposits end class PaymentMethodConfigurationDetails < Stripe::StripeObject + # ID of the payment method configuration used. sig { returns(String) } attr_reader :id + # ID of the parent payment method configuration used. sig { returns(T.nilable(String)) } attr_reader :parent end class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # A URL for custom mandate text sig { returns(String) } attr_reader :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. sig { returns(T::Array[String]) } attr_reader :default_for + # Description of the interval. Only required if the 'payment_schedule' parameter is 'interval' or 'combined'. sig { returns(T.nilable(String)) } attr_reader :interval_description + # Payment schedule for the mandate. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Currency supported by the bank account sig { returns(T.nilable(String)) } attr_reader :currency + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class AmazonPay < Stripe::StripeObject; end class BacsDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount to be charged for future payments. sig { returns(Integer) } attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(String) } attr_reader :amount_type + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. sig { returns(T.nilable(Integer)) } attr_reader :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. sig { returns(String) } attr_reader :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. sig { returns(T.nilable(Integer)) } attr_reader :interval_count + # Unique identifier for the mandate or subscription. sig { returns(String) } attr_reader :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. sig { returns(Integer) } attr_reader :start_date + # Specifies the type of mandates supported. Possible values are `india`. sig { returns(T.nilable(T::Array[String])) } attr_reader :supported_types end + # Configuration options for setting up an eMandate for cards issued in India. sig { returns(T.nilable(MandateOptions)) } attr_reader :mandate_options + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the setup intent. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CardPresent < Stripe::StripeObject; end class Link < Stripe::StripeObject + # [Deprecated] This is a legacy parameter that no longer has any function. sig { returns(T.nilable(String)) } attr_reader :persistent_token end class Paypal < Stripe::StripeObject + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. sig { returns(T.nilable(String)) } attr_reader :billing_agreement_id + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(T.nilable(String)) } attr_reader :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. sig { returns(T::Array[String]) } attr_reader :subsellers end class Payto < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount that will be collected. It is required when `amount_type` is `fixed`. sig { returns(T.nilable(Integer)) } attr_reader :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. sig { returns(T.nilable(String)) } attr_reader :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. sig { returns(T.nilable(String)) } attr_reader :end_date + # The periodicity at which payments will be collected. sig { returns(T.nilable(String)) } attr_reader :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. sig { returns(T.nilable(Integer)) } attr_reader :payments_per_period + # The purpose for which payments are made. Defaults to retail. sig { returns(T.nilable(String)) } attr_reader :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. sig { returns(T.nilable(String)) } attr_reader :start_date end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class SepaDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. sig { returns(String) } attr_reader :reference_prefix end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options end class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end class ManualEntry < Stripe::StripeObject + # Settings for configuring manual entry of account details. sig { returns(String) } attr_reader :mode end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # Attribute for field manual_entry sig { returns(ManualEntry) } attr_reader :manual_entry + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. sig { returns(String) } attr_reader :return_url end class MandateOptions < Stripe::StripeObject + # Mandate collection method sig { returns(String) } attr_reader :collection_method end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # Attribute for field acss_debit sig { returns(AcssDebit) } attr_reader :acss_debit + # Attribute for field amazon_pay sig { returns(AmazonPay) } attr_reader :amazon_pay + # Attribute for field bacs_debit sig { returns(BacsDebit) } attr_reader :bacs_debit + # Attribute for field card sig { returns(Card) } attr_reader :card + # Attribute for field card_present sig { returns(CardPresent) } attr_reader :card_present + # Attribute for field link sig { returns(Link) } attr_reader :link + # Attribute for field paypal sig { returns(Paypal) } attr_reader :paypal + # Attribute for field payto sig { returns(Payto) } attr_reader :payto + # Attribute for field sepa_debit sig { returns(SepaDebit) } attr_reader :sepa_debit + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect application that created the SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T::Boolean) } # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. # # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } attr_reader :attach_to_self - sig { returns(T.nilable(AutomaticPaymentMethods)) } # Settings for dynamic payment methods compatible with this Setup Intent + sig { returns(T.nilable(AutomaticPaymentMethods)) } attr_reader :automatic_payment_methods - sig { returns(T.nilable(String)) } # Reason for cancellation of this SetupIntent, one of `abandoned`, `requested_by_customer`, or `duplicate`. - attr_reader :cancellation_reason sig { returns(T.nilable(String)) } + attr_reader :cancellation_reason # The client secret of this SetupIntent. Used for client-side retrieval using a publishable key. # # The client secret can be used to complete payment setup from your frontend. It should not be stored, logged, or exposed to anyone other than the customer. Make sure that you have TLS enabled on any page that includes the client secret. + sig { returns(T.nilable(String)) } attr_reader :client_secret - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # ID of the Customer this SetupIntent belongs to, if one exists. # # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T::Array[String])) } # Indicates the directions of money movement for which this payment method is intended to be used. # # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T.nilable(T::Array[String])) } attr_reader :flow_directions - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastSetupError)) } # The error encountered in the previous SetupIntent confirmation. + sig { returns(T.nilable(LastSetupError)) } attr_reader :last_setup_error - sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } # The most recent SetupAttempt for this SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::SetupAttempt))) } attr_reader :latest_attempt - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } # ID of the multi use Mandate generated by the SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :mandate - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(T.nilable(NextAction)) } # If present, this property tells you what actions you need to take in order for your customer to continue payment setup. + sig { returns(T.nilable(NextAction)) } attr_reader :next_action - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account (if any) for which the setup is intended. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } # ID of the payment method used with this SetupIntent. If the payment method is `card_present` and isn't a digital wallet, then the [generated_card](https://docs.stripe.com/api/setup_attempts/object#setup_attempt_object-payment_method_details-card_present-generated_card) associated with the `latest_attempt` is attached to the Customer instead. + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :payment_method - sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } # Information about the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) used for this Setup Intent. + sig { returns(T.nilable(PaymentMethodConfigurationDetails)) } attr_reader :payment_method_configuration_details - sig { returns(T.nilable(PaymentMethodOptions)) } # Payment method-specific configuration for this SetupIntent. + sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options - sig { returns(T::Array[String]) } # The list of payment method types (e.g. card) that this SetupIntent is allowed to set up. + sig { returns(T::Array[String]) } attr_reader :payment_method_types - sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } # ID of the single_use Mandate generated by the SetupIntent. + sig { returns(T.nilable(T.any(String, Stripe::Mandate))) } attr_reader :single_use_mandate - sig { returns(String) } # [Status](https://stripe.com/docs/payments/intents#intent-statuses) of this SetupIntent, one of `requires_payment_method`, `requires_confirmation`, `requires_action`, `processing`, `canceled`, or `succeeded`. - attr_reader :status sig { returns(String) } + attr_reader :status # Indicates how the payment method is intended to be used in the future. # # Use `on_session` if you intend to only reuse the payment method when the customer is in your checkout flow. Use `off_session` if your customer may or may not be in your checkout flow. If not provided, this value defaults to `off_session`. + sig { returns(String) } attr_reader :usage + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } + attr_accessor :attach_to_self + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::SetupIntent::ListParams::Created, Integer)) } + attr_accessor :created + # Only return SetupIntents for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return SetupIntents that associate with the specified payment method. + sig { returns(String) } + attr_accessor :payment_method + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(attach_to_self: T::Boolean, created: T.any(::Stripe::SetupIntent::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, payment_method: String, starting_after: String).void + } + def initialize( + attach_to_self: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_method: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + sig { returns(String) } + attr_accessor :allow_redirects + # Whether this feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allow_redirects: String, enabled: T::Boolean).void } + def initialize(allow_redirects: nil, enabled: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { returns(::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance) } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::SetupIntent::CreateParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Rechnung::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Blik, boleto: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Eps, fpx: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Fpx, giropay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Giropay, gopay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Klarna, konbini: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::KrCard, link: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Link, mb_way: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Oxxo, p24: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::P24, payco: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payco, paynow: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paynow, paypal: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Paypal, payto: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Payto, pix: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Pix, promptpay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Promptpay, qris: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Qris, radar_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Sofort, swish: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Swish, twint: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::WechatPay, zip: ::Stripe::SetupIntent::CreateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(currency: nil, mandate_options: nil, verification_method: nil); end + end + class AmazonPay < Stripe::RequestParams + + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, currency: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, network_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(mandate_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_three_d_secure: String, three_d_secure: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + sig { params(persistent_token: String).void } + def initialize(persistent_token: nil); end + end + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + sig { returns(String) } + attr_accessor :billing_agreement_id + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(billing_agreement_id: String, currency: String, subsellers: T::Array[String]).void + } + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation. + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Payto::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ); end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit) } + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AmazonPay) } + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit) } + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card) } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent) } + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link) } + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit) } + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount) } + attr_accessor :us_bank_account + sig { + params(acss_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AcssDebit, amazon_pay: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::AmazonPay, bacs_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::BacsDebit, card: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Card, card_present: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::CardPresent, link: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Link, paypal: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Paypal, payto: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::Payto, sepa_debit: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::SepaDebit, us_bank_account: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions::UsBankAccount).void + } + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + class SingleUse < Stripe::RequestParams + # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } + attr_accessor :attach_to_self + # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. + sig { returns(::Stripe::SetupIntent::CreateParams::AutomaticPaymentMethods) } + attr_accessor :automatic_payment_methods + # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. + sig { returns(T::Boolean) } + attr_accessor :confirm + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T::Array[String]) } + attr_accessor :flow_directions + # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + sig { returns(T.nilable(::Stripe::SetupIntent::CreateParams::MandateData)) } + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Stripe account ID created for this SetupIntent. + sig { returns(String) } + attr_accessor :on_behalf_of + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + sig { returns(::Stripe::SetupIntent::CreateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + sig { returns(String) } + attr_accessor :return_url + # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + sig { returns(::Stripe::SetupIntent::CreateParams::SingleUse) } + attr_accessor :single_use + # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + sig { returns(String) } + attr_accessor :usage + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(attach_to_self: T::Boolean, automatic_payment_methods: ::Stripe::SetupIntent::CreateParams::AutomaticPaymentMethods, confirm: T::Boolean, confirmation_token: String, customer: String, description: String, expand: T::Array[String], flow_directions: T::Array[String], mandate_data: T.nilable(::Stripe::SetupIntent::CreateParams::MandateData), metadata: T::Hash[String, String], on_behalf_of: String, payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::SetupIntent::CreateParams::PaymentMethodData, payment_method_options: ::Stripe::SetupIntent::CreateParams::PaymentMethodOptions, payment_method_types: T::Array[String], return_url: String, single_use: ::Stripe::SetupIntent::CreateParams::SingleUse, usage: String, use_stripe_sdk: T::Boolean).void + } + def initialize( + attach_to_self: nil, + automatic_payment_methods: nil, + confirm: nil, + confirmation_token: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + mandate_data: nil, + metadata: nil, + on_behalf_of: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + single_use: nil, + usage: nil, + use_stripe_sdk: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + sig { returns(String) } + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(client_secret: String, expand: T::Array[String]).void } + def initialize(client_secret: nil, expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Rechnung::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Blik, boleto: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Eps, fpx: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Fpx, giropay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Giropay, gopay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Klarna, konbini: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::KrCard, link: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Link, mb_way: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Oxxo, p24: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::P24, payco: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payco, paynow: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paynow, paypal: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Paypal, payto: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Payto, pix: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Pix, promptpay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Promptpay, qris: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Qris, radar_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Sofort, swish: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Swish, twint: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::WechatPay, zip: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(currency: nil, mandate_options: nil, verification_method: nil); end + end + class AmazonPay < Stripe::RequestParams + + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, currency: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, network_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(mandate_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_three_d_secure: String, three_d_secure: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + sig { params(persistent_token: String).void } + def initialize(persistent_token: nil); end + end + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + sig { returns(String) } + attr_accessor :billing_agreement_id + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(billing_agreement_id: String, currency: String, subsellers: T::Array[String]).void + } + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation. + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Payto::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ); end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit) } + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AmazonPay) } + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit) } + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card) } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent) } + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link) } + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit) } + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount) } + attr_accessor :us_bank_account + sig { + params(acss_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AcssDebit, amazon_pay: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::AmazonPay, bacs_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::BacsDebit, card: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Card, card_present: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::CardPresent, link: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Link, paypal: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Paypal, payto: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::Payto, sepa_debit: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::SepaDebit, us_bank_account: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions::UsBankAccount).void + } + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } + attr_accessor :attach_to_self + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T::Array[String]) } + attr_accessor :flow_directions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + sig { returns(::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + sig { + params(attach_to_self: T::Boolean, customer: String, description: String, expand: T::Array[String], flow_directions: T::Array[String], metadata: T.nilable(T::Hash[String, String]), payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::SetupIntent::UpdateParams::PaymentMethodData, payment_method_options: ::Stripe::SetupIntent::UpdateParams::PaymentMethodOptions, payment_method_types: T::Array[String]).void + } + def initialize( + attach_to_self: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + metadata: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + sig { returns(String) } + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(cancellation_reason: String, expand: T::Array[String]).void } + def initialize(cancellation_reason: nil, expand: nil); end + end + class ConfirmParams < Stripe::RequestParams + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { returns(::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance) } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::SetupIntent::ConfirmParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Rechnung::Dob) } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::BillingDetails, blik: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Blik, boleto: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Boleto, cashapp: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Eps, fpx: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Fpx, giropay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Giropay, gopay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Gopay, grabpay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Ideal, interac_present: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Klarna, konbini: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Konbini, kr_card: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::KrCard, link: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Link, mb_way: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Oxxo, p24: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::P24, payco: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payco, paynow: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paynow, paypal: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Paypal, payto: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Payto, pix: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Pix, promptpay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Promptpay, qris: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Qris, radar_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Sofort, swish: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Swish, twint: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::WechatPay, zip: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(currency: nil, mandate_options: nil, verification_method: nil); end + end + class AmazonPay < Stripe::RequestParams + + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, currency: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, network_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(mandate_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_three_d_secure: String, three_d_secure: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + sig { params(persistent_token: String).void } + def initialize(persistent_token: nil); end + end + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + sig { returns(String) } + attr_accessor :billing_agreement_id + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(billing_agreement_id: String, currency: String, subsellers: T::Array[String]).void + } + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation. + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ); end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit) } + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AmazonPay) } + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit) } + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card) } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent) } + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link) } + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit) } + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount) } + attr_accessor :us_bank_account + sig { + params(acss_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AcssDebit, amazon_pay: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::AmazonPay, bacs_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::BacsDebit, card: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Card, card_present: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::CardPresent, link: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Link, paypal: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Paypal, payto: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::Payto, sepa_debit: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::SepaDebit, us_bank_account: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions::UsBankAccount).void + } + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field mandate_data + sig { returns(T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData)) } + attr_accessor :mandate_data + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + sig { returns(::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The URL to redirect your customer back to after they authenticate on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + sig { returns(String) } + attr_accessor :return_url + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(confirmation_token: String, expand: T::Array[String], mandate_data: T.nilable(::Stripe::SetupIntent::ConfirmParams::MandateData), payment_method: String, payment_method_data: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodData, payment_method_options: ::Stripe::SetupIntent::ConfirmParams::PaymentMethodOptions, return_url: String, use_stripe_sdk: T::Boolean).void + } + def initialize( + confirmation_token: nil, + expand: nil, + mandate_data: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + return_url: nil, + use_stripe_sdk: nil + ); end + end + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + sig { returns(T::Array[Integer]) } + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + sig { returns(String) } + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(amounts: T::Array[Integer], descriptor_code: String, expand: T::Array[String]).void + } + def initialize(amounts: nil, descriptor_code: nil, expand: nil); end + end + # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. + # + # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { + params(params: T.any(::Stripe::SetupIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def cancel(params = {}, opts = {}); end + + # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. + # + # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntent::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def self.cancel(intent, params = {}, opts = {}); end + + # Confirm that your customer intends to set up the current or + # provided payment method. For example, you would confirm a SetupIntent + # when a customer hits the “Save” button on a payment method management + # page on your website. + # + # If the selected payment method does not require any additional + # steps from the customer, the SetupIntent will transition to the + # succeeded status. + # + # Otherwise, it will transition to the requires_action status and + # suggest additional actions via next_action. If setup fails, + # the SetupIntent will transition to the + # requires_payment_method status or the canceled status if the + # confirmation limit is reached. + sig { + params(params: T.any(::Stripe::SetupIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def confirm(params = {}, opts = {}); end + + # Confirm that your customer intends to set up the current or + # provided payment method. For example, you would confirm a SetupIntent + # when a customer hits the “Save” button on a payment method management + # page on your website. + # + # If the selected payment method does not require any additional + # steps from the customer, the SetupIntent will transition to the + # succeeded status. + # + # Otherwise, it will transition to the requires_action status and + # suggest additional actions via next_action. If setup fails, + # the SetupIntent will transition to the + # requires_payment_method status or the canceled status if the + # confirmation limit is reached. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntent::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def self.confirm(intent, params = {}, opts = {}); end + + # Creates a SetupIntent object. + # + # After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) + # it to collect any required permissions to charge the payment method later. + sig { + params(params: T.any(::Stripe::SetupIntent::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of SetupIntents. + sig { + params(params: T.any(::Stripe::SetupIntent::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a SetupIntent object. + sig { + params(id: String, params: T.any(::Stripe::SetupIntent::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def self.update(id, params = {}, opts = {}); end + + # Verifies microdeposits on a SetupIntent object. + sig { + params(params: T.any(::Stripe::SetupIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def verify_microdeposits(params = {}, opts = {}); end + + # Verifies microdeposits on a SetupIntent object. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntent::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def self.verify_microdeposits(intent, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/shipping_rate.rbi b/rbi/stripe/resources/shipping_rate.rbi index 1b9b2c058..6dd53cf95 100644 --- a/rbi/stripe/resources/shipping_rate.rbi +++ b/rbi/stripe/resources/shipping_rate.rbi @@ -8,71 +8,303 @@ module Stripe class ShippingRate < APIResource class DeliveryEstimate < Stripe::StripeObject class Maximum < Stripe::StripeObject + # A unit of time. sig { returns(String) } attr_reader :unit + # Must be greater than 0. sig { returns(Integer) } attr_reader :value end class Minimum < Stripe::StripeObject + # A unit of time. sig { returns(String) } attr_reader :unit + # Must be greater than 0. sig { returns(Integer) } attr_reader :value end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. sig { returns(T.nilable(Maximum)) } attr_reader :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. sig { returns(T.nilable(Minimum)) } attr_reader :minimum end class FixedAmount < Stripe::StripeObject class CurrencyOptions < Stripe::StripeObject + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. sig { returns(String) } attr_reader :tax_behavior end + # A non-negative integer in cents representing how much to charge. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). sig { returns(T::Hash[String, CurrencyOptions]) } attr_reader :currency_options end - sig { returns(T::Boolean) } # Whether the shipping rate can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(DeliveryEstimate)) } # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(T.nilable(DeliveryEstimate)) } attr_reader :delivery_estimate - sig { returns(T.nilable(String)) } # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(T.nilable(String)) } attr_reader :display_name - sig { returns(FixedAmount) } # Attribute for field fixed_amount + sig { returns(FixedAmount) } attr_reader :fixed_amount - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(T.nilable(String)) } attr_reader :tax_behavior - sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(T.nilable(T.any(String, Stripe::TaxCode))) } attr_reader :tax_code - sig { returns(String) } # The type of calculation to use on the shipping rate. + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return shipping rates that are active or inactive. + sig { returns(T::Boolean) } + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::ShippingRate::ListParams::Created, Integer)) } + attr_accessor :created + # Only return shipping rates for the given currency. + sig { returns(String) } + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, created: T.any(::Stripe::ShippingRate::ListParams::Created, Integer), currency: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { returns(::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Maximum) } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { returns(::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Minimum) } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Maximum, minimum: ::Stripe::ShippingRate::CreateParams::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::ShippingRate::CreateParams::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::ShippingRate::CreateParams::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(::Stripe::ShippingRate::CreateParams::DeliveryEstimate) } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { returns(::Stripe::ShippingRate::CreateParams::FixedAmount) } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::ShippingRate::CreateParams::DeliveryEstimate, display_name: String, expand: T::Array[String], fixed_amount: ::Stripe::ShippingRate::CreateParams::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + expand: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::ShippingRate::UpdateParams::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(currency_options: T::Hash[String, ::Stripe::ShippingRate::UpdateParams::FixedAmount::CurrencyOptions]).void + } + def initialize(currency_options: nil); end + end + # Whether the shipping rate can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { returns(::Stripe::ShippingRate::UpdateParams::FixedAmount) } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { + params(active: T::Boolean, expand: T::Array[String], fixed_amount: ::Stripe::ShippingRate::UpdateParams::FixedAmount, metadata: T.nilable(T::Hash[String, String]), tax_behavior: String).void + } + def initialize( + active: nil, + expand: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil + ); end + end + # Creates a new shipping rate object. + sig { + params(params: T.any(::Stripe::ShippingRate::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of your shipping rates. + sig { + params(params: T.any(::Stripe::ShippingRate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates an existing shipping rate object. + sig { + params(id: String, params: T.any(::Stripe::ShippingRate::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/sigma/scheduled_query_run.rbi b/rbi/stripe/resources/sigma/scheduled_query_run.rbi index 18025847d..bafac6d74 100644 --- a/rbi/stripe/resources/sigma/scheduled_query_run.rbi +++ b/rbi/stripe/resources/sigma/scheduled_query_run.rbi @@ -10,42 +10,73 @@ module Stripe # retrieve the query results. class ScheduledQueryRun < APIResource class Error < Stripe::StripeObject + # Information about the run failure. sig { returns(String) } attr_reader :message end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created # When the query was run, Sigma contained a snapshot of your Stripe data at this time. + sig { returns(Integer) } attr_reader :data_load_time - sig { returns(Error) } # Attribute for field error + sig { returns(Error) } attr_reader :error - sig { returns(T.nilable(Stripe::File)) } # The file object representing the results of the query. + sig { returns(T.nilable(Stripe::File)) } attr_reader :file - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # Time at which the result expires and is no longer available for download. + sig { returns(Integer) } attr_reader :result_available_until - sig { returns(String) } # SQL for the query. - attr_reader :sql sig { returns(String) } + attr_reader :sql # The query's execution status, which will be `completed` for successful runs, and `canceled`, `failed`, or `timed_out` otherwise. - attr_reader :status sig { returns(String) } + attr_reader :status # Title of the query. + sig { returns(String) } attr_reader :title + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of scheduled query runs. + sig { + params(params: T.any(::Stripe::Sigma::ScheduledQueryRun::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/source.rbi b/rbi/stripe/resources/source.rbi index 23d1da172..bdda4dfca 100644 --- a/rbi/stripe/resources/source.rbi +++ b/rbi/stripe/resources/source.rbi @@ -15,658 +15,1520 @@ module Stripe # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). class Source < APIResource class AchCreditTransfer < Stripe::StripeObject + # Attribute for field account_number sig { returns(T.nilable(String)) } attr_reader :account_number + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name + # Attribute for field refund_account_holder_type sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_type + # Attribute for field refund_routing_number sig { returns(T.nilable(String)) } attr_reader :refund_routing_number + # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number + # Attribute for field swift_code sig { returns(T.nilable(String)) } attr_reader :swift_code end class AchDebit < Stripe::StripeObject + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number + # Attribute for field type sig { returns(T.nilable(String)) } attr_reader :type end class AcssDebit < Stripe::StripeObject + # Attribute for field bank_address_city sig { returns(T.nilable(String)) } attr_reader :bank_address_city + # Attribute for field bank_address_line_1 sig { returns(T.nilable(String)) } attr_reader :bank_address_line_1 + # Attribute for field bank_address_line_2 sig { returns(T.nilable(String)) } attr_reader :bank_address_line_2 + # Attribute for field bank_address_postal_code sig { returns(T.nilable(String)) } attr_reader :bank_address_postal_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field category sig { returns(T.nilable(String)) } attr_reader :category + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field routing_number sig { returns(T.nilable(String)) } attr_reader :routing_number end class Alipay < Stripe::StripeObject + # Attribute for field data_string sig { returns(T.nilable(String)) } attr_reader :data_string + # Attribute for field native_url sig { returns(T.nilable(String)) } attr_reader :native_url + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class AuBecsDebit < Stripe::StripeObject + # Attribute for field bsb_number sig { returns(T.nilable(String)) } attr_reader :bsb_number + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 end class Bancontact < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Attribute for field preferred_language sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Card < Stripe::StripeObject + # Attribute for field address_line1_check sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # Attribute for field address_zip_check sig { returns(T.nilable(String)) } attr_reader :address_zip_check + # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field cvc_check sig { returns(T.nilable(String)) } attr_reader :cvc_check + # Attribute for field description sig { returns(String) } attr_reader :description + # Attribute for field dynamic_last4 sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint + # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding + # Attribute for field iin sig { returns(String) } attr_reader :iin + # Attribute for field issuer sig { returns(String) } attr_reader :issuer + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field name sig { returns(T.nilable(String)) } attr_reader :name + # Attribute for field three_d_secure sig { returns(String) } attr_reader :three_d_secure + # Attribute for field tokenization_method sig { returns(T.nilable(String)) } attr_reader :tokenization_method end class CardPresent < Stripe::StripeObject + # Attribute for field application_cryptogram sig { returns(String) } attr_reader :application_cryptogram + # Attribute for field application_preferred_name sig { returns(String) } attr_reader :application_preferred_name + # Attribute for field authorization_code sig { returns(T.nilable(String)) } attr_reader :authorization_code + # Attribute for field authorization_response_code sig { returns(String) } attr_reader :authorization_response_code + # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field cvm_type sig { returns(String) } attr_reader :cvm_type + # Attribute for field data_type sig { returns(T.nilable(String)) } attr_reader :data_type + # Attribute for field dedicated_file_name sig { returns(String) } attr_reader :dedicated_file_name + # Attribute for field description sig { returns(String) } attr_reader :description + # Attribute for field emv_auth_data sig { returns(String) } attr_reader :emv_auth_data + # Attribute for field evidence_customer_signature sig { returns(T.nilable(String)) } attr_reader :evidence_customer_signature + # Attribute for field evidence_transaction_certificate sig { returns(T.nilable(String)) } attr_reader :evidence_transaction_certificate + # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint + # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding + # Attribute for field iin sig { returns(String) } attr_reader :iin + # Attribute for field issuer sig { returns(String) } attr_reader :issuer + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field pos_device_id sig { returns(T.nilable(String)) } attr_reader :pos_device_id + # Attribute for field pos_entry_mode sig { returns(String) } attr_reader :pos_entry_mode + # Attribute for field read_method sig { returns(T.nilable(String)) } attr_reader :read_method + # Attribute for field reader sig { returns(T.nilable(String)) } attr_reader :reader + # Attribute for field terminal_verification_results sig { returns(String) } attr_reader :terminal_verification_results + # Attribute for field transaction_status_information sig { returns(String) } attr_reader :transaction_status_information end class CodeVerification < Stripe::StripeObject + # The number of attempts remaining to authenticate the source object with a verification code. sig { returns(Integer) } attr_reader :attempts_remaining + # The status of the code verification, either `pending` (awaiting verification, `attempts_remaining` should be greater than 0), `succeeded` (successful verification) or `failed` (failed verification, cannot be verified anymore as `attempts_remaining` should be 0). sig { returns(String) } attr_reader :status end class Eps < Stripe::StripeObject + # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Giropay < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Ideal < Stripe::StripeObject + # Attribute for field bank sig { returns(T.nilable(String)) } attr_reader :bank + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class Klarna < Stripe::StripeObject + # Attribute for field background_image_url sig { returns(String) } attr_reader :background_image_url + # Attribute for field client_token sig { returns(T.nilable(String)) } attr_reader :client_token + # Attribute for field first_name sig { returns(String) } attr_reader :first_name + # Attribute for field last_name sig { returns(String) } attr_reader :last_name + # Attribute for field locale sig { returns(String) } attr_reader :locale + # Attribute for field logo_url sig { returns(String) } attr_reader :logo_url + # Attribute for field page_title sig { returns(String) } attr_reader :page_title + # Attribute for field pay_later_asset_urls_descriptive sig { returns(String) } attr_reader :pay_later_asset_urls_descriptive + # Attribute for field pay_later_asset_urls_standard sig { returns(String) } attr_reader :pay_later_asset_urls_standard + # Attribute for field pay_later_name sig { returns(String) } attr_reader :pay_later_name + # Attribute for field pay_later_redirect_url sig { returns(String) } attr_reader :pay_later_redirect_url + # Attribute for field pay_now_asset_urls_descriptive sig { returns(String) } attr_reader :pay_now_asset_urls_descriptive + # Attribute for field pay_now_asset_urls_standard sig { returns(String) } attr_reader :pay_now_asset_urls_standard + # Attribute for field pay_now_name sig { returns(String) } attr_reader :pay_now_name + # Attribute for field pay_now_redirect_url sig { returns(String) } attr_reader :pay_now_redirect_url + # Attribute for field pay_over_time_asset_urls_descriptive sig { returns(String) } attr_reader :pay_over_time_asset_urls_descriptive + # Attribute for field pay_over_time_asset_urls_standard sig { returns(String) } attr_reader :pay_over_time_asset_urls_standard + # Attribute for field pay_over_time_name sig { returns(String) } attr_reader :pay_over_time_name + # Attribute for field pay_over_time_redirect_url sig { returns(String) } attr_reader :pay_over_time_redirect_url + # Attribute for field payment_method_categories sig { returns(String) } attr_reader :payment_method_categories + # Attribute for field purchase_country sig { returns(String) } attr_reader :purchase_country + # Attribute for field purchase_type sig { returns(String) } attr_reader :purchase_type + # Attribute for field redirect_url sig { returns(String) } attr_reader :redirect_url + # Attribute for field shipping_delay sig { returns(Integer) } attr_reader :shipping_delay + # Attribute for field shipping_first_name sig { returns(String) } attr_reader :shipping_first_name + # Attribute for field shipping_last_name sig { returns(String) } attr_reader :shipping_last_name end class Multibanco < Stripe::StripeObject + # Attribute for field entity sig { returns(T.nilable(String)) } attr_reader :entity + # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference + # Attribute for field refund_account_holder_address_city sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name + # Attribute for field refund_iban sig { returns(T.nilable(String)) } attr_reader :refund_iban end class Owner < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end class VerifiedAddress < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Owner's address. sig { returns(T.nilable(Address)) } attr_reader :address + # Owner's email address. sig { returns(T.nilable(String)) } attr_reader :email + # Owner's full name. sig { returns(T.nilable(String)) } attr_reader :name + # Owner's phone number (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # Verified owner's address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(VerifiedAddress)) } attr_reader :verified_address + # Verified owner's email address. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_email + # Verified owner's full name. Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_name + # Verified owner's phone number (including extension). Verified values are verified or provided by the payment method directly (and if supported) at the time of authorization or settlement. They cannot be set or mutated. sig { returns(T.nilable(String)) } attr_reader :verified_phone end class P24 < Stripe::StripeObject + # Attribute for field reference sig { returns(T.nilable(String)) } attr_reader :reference end class Paypal < Stripe::StripeObject + # Attribute for field billing_agreement sig { returns(T.nilable(String)) } attr_reader :billing_agreement + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field payer_id sig { returns(T.nilable(String)) } attr_reader :payer_id + # Attribute for field reference_id sig { returns(String) } attr_reader :reference_id + # Attribute for field reference_transaction_amount sig { returns(String) } attr_reader :reference_transaction_amount + # Attribute for field reference_transaction_charged sig { returns(T::Boolean) } attr_reader :reference_transaction_charged + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor + # Attribute for field transaction_id sig { returns(String) } attr_reader :transaction_id + # Attribute for field verified_email sig { returns(T.nilable(String)) } attr_reader :verified_email end class Receiver < Stripe::StripeObject + # The address of the receiver source. This is the value that should be communicated to the customer to send their funds to. sig { returns(T.nilable(String)) } attr_reader :address + # The total amount that was moved to your balance. This is almost always equal to the amount charged. In rare cases when customers deposit excess funds and we are unable to refund those, those funds get moved to your balance and show up in amount_charged as well. The amount charged is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_charged + # The total amount received by the receiver source. `amount_received = amount_returned + amount_charged` should be true for consumed sources unless customers deposit excess funds. The amount received is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_received + # The total amount that was returned to the customer. The amount returned is expressed in the source's currency. sig { returns(Integer) } attr_reader :amount_returned + # Type of refund attribute method, one of `email`, `manual`, or `none`. sig { returns(String) } attr_reader :refund_attributes_method + # Type of refund attribute status, one of `missing`, `requested`, or `available`. sig { returns(String) } attr_reader :refund_attributes_status end class Redirect < Stripe::StripeObject + # The failure reason for the redirect, either `user_abort` (the customer aborted or dropped out of the redirect flow), `declined` (the authentication failed or the transaction was declined), or `processing_error` (the redirect failed due to a technical error). Present only if the redirect status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_reason + # The URL you provide to redirect the customer to after they authenticated their payment. sig { returns(String) } attr_reader :return_url + # The status of the redirect, either `pending` (ready to be used by your customer to authenticate the transaction), `succeeded` (succesful authentication, cannot be reused) or `not_required` (redirect should not be used) or `failed` (failed authentication, cannot be reused). sig { returns(String) } attr_reader :status + # The URL provided to you to redirect a customer to as part of a `redirect` authentication flow. sig { returns(String) } attr_reader :url end class SepaCreditTransfer < Stripe::StripeObject + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field iban sig { returns(T.nilable(String)) } attr_reader :iban + # Attribute for field refund_account_holder_address_city sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_city + # Attribute for field refund_account_holder_address_country sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_country + # Attribute for field refund_account_holder_address_line1 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line1 + # Attribute for field refund_account_holder_address_line2 sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_line2 + # Attribute for field refund_account_holder_address_postal_code sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_postal_code + # Attribute for field refund_account_holder_address_state sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_address_state + # Attribute for field refund_account_holder_name sig { returns(T.nilable(String)) } attr_reader :refund_account_holder_name + # Attribute for field refund_iban sig { returns(T.nilable(String)) } attr_reader :refund_iban end class SepaDebit < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field branch_code sig { returns(T.nilable(String)) } attr_reader :branch_code + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field fingerprint sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field mandate_reference sig { returns(T.nilable(String)) } attr_reader :mandate_reference + # Attribute for field mandate_url sig { returns(T.nilable(String)) } attr_reader :mandate_url end class Sofort < Stripe::StripeObject + # Attribute for field bank_code sig { returns(T.nilable(String)) } attr_reader :bank_code + # Attribute for field bank_name sig { returns(T.nilable(String)) } attr_reader :bank_name + # Attribute for field bic sig { returns(T.nilable(String)) } attr_reader :bic + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field iban_last4 sig { returns(T.nilable(String)) } attr_reader :iban_last4 + # Attribute for field preferred_language sig { returns(T.nilable(String)) } attr_reader :preferred_language + # Attribute for field statement_descriptor sig { returns(T.nilable(String)) } attr_reader :statement_descriptor end class SourceOrder < Stripe::StripeObject class Item < Stripe::StripeObject + # The amount (price) for this order item. sig { returns(T.nilable(Integer)) } attr_reader :amount + # This currency of this order item. Required when `amount` is present. sig { returns(T.nilable(String)) } attr_reader :currency + # Human-readable description for this order item. sig { returns(T.nilable(String)) } attr_reader :description + # The ID of the associated object for this line item. Expandable if not null (e.g., expandable to a SKU). sig { returns(T.nilable(String)) } attr_reader :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. sig { returns(Integer) } attr_reader :quantity + # The type of this order item. Must be `sku`, `tax`, or `shipping`. sig { returns(T.nilable(String)) } attr_reader :type end class Shipping < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. sig { returns(T.nilable(String)) } attr_reader :carrier + # Recipient name. sig { returns(String) } attr_reader :name + # Recipient phone (including extension). sig { returns(T.nilable(String)) } attr_reader :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. sig { returns(T.nilable(String)) } attr_reader :tracking_number end + # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount for the order. sig { returns(Integer) } attr_reader :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # The email address of the customer placing the order. sig { returns(String) } attr_reader :email + # List of items constituting the order. sig { returns(T.nilable(T::Array[Item])) } attr_reader :items + # Attribute for field shipping sig { returns(Shipping) } attr_reader :shipping end class ThreeDSecure < Stripe::StripeObject + # Attribute for field address_line1_check sig { returns(T.nilable(String)) } attr_reader :address_line1_check + # Attribute for field address_zip_check sig { returns(T.nilable(String)) } attr_reader :address_zip_check + # Attribute for field authenticated sig { returns(T.nilable(T::Boolean)) } attr_reader :authenticated + # Attribute for field brand sig { returns(T.nilable(String)) } attr_reader :brand + # Attribute for field card sig { returns(T.nilable(String)) } attr_reader :card + # Attribute for field country sig { returns(T.nilable(String)) } attr_reader :country + # Attribute for field customer sig { returns(T.nilable(String)) } attr_reader :customer + # Attribute for field cvc_check sig { returns(T.nilable(String)) } attr_reader :cvc_check + # Attribute for field description sig { returns(String) } attr_reader :description + # Attribute for field dynamic_last4 sig { returns(T.nilable(String)) } attr_reader :dynamic_last4 + # Attribute for field exp_month sig { returns(T.nilable(Integer)) } attr_reader :exp_month + # Attribute for field exp_year sig { returns(T.nilable(Integer)) } attr_reader :exp_year + # Attribute for field fingerprint sig { returns(String) } attr_reader :fingerprint + # Attribute for field funding sig { returns(T.nilable(String)) } attr_reader :funding + # Attribute for field iin sig { returns(String) } attr_reader :iin + # Attribute for field issuer sig { returns(String) } attr_reader :issuer + # Attribute for field last4 sig { returns(T.nilable(String)) } attr_reader :last4 + # Attribute for field name sig { returns(T.nilable(String)) } attr_reader :name + # Attribute for field three_d_secure sig { returns(String) } attr_reader :three_d_secure + # Attribute for field tokenization_method sig { returns(T.nilable(String)) } attr_reader :tokenization_method end class Wechat < Stripe::StripeObject + # Attribute for field prepay_id sig { returns(String) } attr_reader :prepay_id + # Attribute for field qr_code_url sig { returns(T.nilable(String)) } attr_reader :qr_code_url + # Attribute for field statement_descriptor sig { returns(String) } attr_reader :statement_descriptor end - sig { returns(AchCreditTransfer) } # Attribute for field ach_credit_transfer + sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer - sig { returns(AchDebit) } # Attribute for field ach_debit + sig { returns(AchDebit) } attr_reader :ach_debit - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(Alipay) } # Attribute for field alipay + sig { returns(Alipay) } attr_reader :alipay - sig { returns(T.nilable(String)) } # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”. + sig { returns(T.nilable(String)) } attr_reader :allow_redisplay - sig { returns(T.nilable(Integer)) } # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the total amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. + sig { returns(T.nilable(Integer)) } attr_reader :amount - sig { returns(AuBecsDebit) } # Attribute for field au_becs_debit + sig { returns(AuBecsDebit) } attr_reader :au_becs_debit - sig { returns(Bancontact) } # Attribute for field bancontact + sig { returns(Bancontact) } attr_reader :bancontact - sig { returns(Card) } # Attribute for field card + sig { returns(Card) } attr_reader :card - sig { returns(CardPresent) } # Attribute for field card_present + sig { returns(CardPresent) } attr_reader :card_present - sig { returns(String) } # The client secret of the source. Used for client-side retrieval using a publishable key. + sig { returns(String) } attr_reader :client_secret - sig { returns(CodeVerification) } # Attribute for field code_verification + sig { returns(CodeVerification) } attr_reader :code_verification - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. Required for `single_use` sources. + sig { returns(T.nilable(String)) } attr_reader :currency - sig { returns(String) } # The ID of the customer to which this source is attached. This will not be present when the source has not been attached to a customer. + sig { returns(String) } attr_reader :customer - sig { returns(Eps) } # Attribute for field eps + sig { returns(Eps) } attr_reader :eps - sig { returns(String) } # The authentication `flow` of the source. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. + sig { returns(String) } attr_reader :flow - sig { returns(Giropay) } # Attribute for field giropay + sig { returns(Giropay) } attr_reader :giropay - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(Ideal) } # Attribute for field ideal + sig { returns(Ideal) } attr_reader :ideal - sig { returns(Klarna) } # Attribute for field klarna + sig { returns(Klarna) } attr_reader :klarna - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(Multibanco) } # Attribute for field multibanco + sig { returns(Multibanco) } attr_reader :multibanco - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Owner)) } # Information about the owner of the payment instrument that may be used or required by particular source types. + sig { returns(T.nilable(Owner)) } attr_reader :owner - sig { returns(P24) } # Attribute for field p24 + sig { returns(P24) } attr_reader :p24 - sig { returns(Paypal) } # Attribute for field paypal + sig { returns(Paypal) } attr_reader :paypal - sig { returns(Receiver) } # Attribute for field receiver + sig { returns(Receiver) } attr_reader :receiver - sig { returns(Redirect) } # Attribute for field redirect + sig { returns(Redirect) } attr_reader :redirect - sig { returns(SepaCreditTransfer) } # Attribute for field sepa_credit_transfer + sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer - sig { returns(SepaDebit) } # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Sofort) } # Attribute for field sofort + sig { returns(Sofort) } attr_reader :sofort - sig { returns(SourceOrder) } # Attribute for field source_order + sig { returns(SourceOrder) } attr_reader :source_order - sig { returns(T.nilable(String)) } # Extra information about a source. This will appear on your customer's statement every time you charge the source. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(String) } # The status of the source, one of `canceled`, `chargeable`, `consumed`, `failed`, or `pending`. Only `chargeable` sources can be used to create a charge. + sig { returns(String) } attr_reader :status - sig { returns(ThreeDSecure) } # Attribute for field three_d_secure + sig { returns(ThreeDSecure) } attr_reader :three_d_secure - sig { returns(String) } # The `type` of the source. The `type` is a payment method, one of `ach_credit_transfer`, `ach_debit`, `alipay`, `bancontact`, `card`, `card_present`, `eps`, `giropay`, `ideal`, `multibanco`, `klarna`, `p24`, `sepa_debit`, `sofort`, `three_d_secure`, or `wechat`. An additional hash is included on the source with a name matching this value. It contains additional information specific to the [payment method](https://stripe.com/docs/sources) used. + sig { returns(String) } attr_reader :type - sig { returns(T.nilable(String)) } # Either `reusable` or `single_use`. Whether this source should be reusable or not. Some source types may or may not be reusable by construction, while others may leave the option at creation. If an incompatible value is passed, an error will be returned. + sig { returns(T.nilable(String)) } attr_reader :usage - sig { returns(Wechat) } # Attribute for field wechat + sig { returns(Wechat) } attr_reader :wechat + class RetrieveParams < Stripe::RequestParams + # The client secret of the source. Required if a publishable key is used to retrieve the source. + sig { returns(String) } + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(client_secret: String, expand: T::Array[String]).void } + def initialize(client_secret: nil, expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + sig { returns(String) } + attr_accessor :contact_email + sig { params(contact_email: String).void } + def initialize(contact_email: nil); end + end + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + sig { returns(::Stripe::Source::UpdateParams::Mandate::Acceptance::Offline) } + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + sig { returns(::Stripe::Source::UpdateParams::Mandate::Acceptance::Online) } + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + sig { returns(String) } + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + sig { returns(String) } + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, offline: ::Stripe::Source::UpdateParams::Mandate::Acceptance::Offline, online: ::Stripe::Source::UpdateParams::Mandate::Acceptance::Online, status: String, type: String, user_agent: String).void + } + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ); end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + sig { returns(::Stripe::Source::UpdateParams::Mandate::Acceptance) } + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + sig { returns(String) } + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + sig { returns(String) } + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + sig { returns(String) } + attr_accessor :notification_method + sig { + params(acceptance: ::Stripe::Source::UpdateParams::Mandate::Acceptance, amount: T.nilable(Integer), currency: String, interval: String, notification_method: String).void + } + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ); end + end + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Owner's address. + sig { returns(::Stripe::Source::UpdateParams::Owner::Address) } + attr_accessor :address + # Owner's email address. + sig { returns(String) } + attr_accessor :email + # Owner's full name. + sig { returns(String) } + attr_accessor :name + # Owner's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Source::UpdateParams::Owner::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # The ID of the SKU being ordered. + sig { returns(String) } + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + sig { returns(Integer) } + attr_accessor :quantity + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { + params(amount: Integer, currency: String, description: String, parent: String, quantity: Integer, type: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::Source::UpdateParams::SourceOrder::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::Source::UpdateParams::SourceOrder::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize( + address: nil, + carrier: nil, + name: nil, + phone: nil, + tracking_number: nil + ); end + end + # List of items constituting the order. + sig { returns(T::Array[::Stripe::Source::UpdateParams::SourceOrder::Item]) } + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + sig { returns(::Stripe::Source::UpdateParams::SourceOrder::Shipping) } + attr_accessor :shipping + sig { + params(items: T::Array[::Stripe::Source::UpdateParams::SourceOrder::Item], shipping: ::Stripe::Source::UpdateParams::SourceOrder::Shipping).void + } + def initialize(items: nil, shipping: nil); end + end + # Amount associated with the source. + sig { returns(Integer) } + attr_accessor :amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + sig { returns(::Stripe::Source::UpdateParams::Mandate) } + attr_accessor :mandate + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Information about the owner of the payment instrument that may be used or required by particular source types. + sig { returns(::Stripe::Source::UpdateParams::Owner) } + attr_accessor :owner + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + sig { returns(::Stripe::Source::UpdateParams::SourceOrder) } + attr_accessor :source_order + sig { + params(amount: Integer, expand: T::Array[String], mandate: ::Stripe::Source::UpdateParams::Mandate, metadata: T.nilable(T::Hash[String, String]), owner: ::Stripe::Source::UpdateParams::Owner, source_order: ::Stripe::Source::UpdateParams::SourceOrder).void + } + def initialize( + amount: nil, + expand: nil, + mandate: nil, + metadata: nil, + owner: nil, + source_order: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + sig { returns(String) } + attr_accessor :contact_email + sig { params(contact_email: String).void } + def initialize(contact_email: nil); end + end + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + sig { returns(::Stripe::Source::CreateParams::Mandate::Acceptance::Offline) } + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + sig { returns(::Stripe::Source::CreateParams::Mandate::Acceptance::Online) } + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + sig { returns(String) } + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + sig { returns(String) } + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, offline: ::Stripe::Source::CreateParams::Mandate::Acceptance::Offline, online: ::Stripe::Source::CreateParams::Mandate::Acceptance::Online, status: String, type: String, user_agent: String).void + } + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ); end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + sig { returns(::Stripe::Source::CreateParams::Mandate::Acceptance) } + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + sig { returns(String) } + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + sig { returns(String) } + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + sig { returns(String) } + attr_accessor :notification_method + sig { + params(acceptance: ::Stripe::Source::CreateParams::Mandate::Acceptance, amount: T.nilable(Integer), currency: String, interval: String, notification_method: String).void + } + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ); end + end + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Owner's address. + sig { returns(::Stripe::Source::CreateParams::Owner::Address) } + attr_accessor :address + # Owner's email address. + sig { returns(String) } + attr_accessor :email + # Owner's full name. + sig { returns(String) } + attr_accessor :name + # Owner's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::Source::CreateParams::Owner::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Receiver < Stripe::RequestParams + # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. + sig { returns(String) } + attr_accessor :refund_attributes_method + sig { params(refund_attributes_method: String).void } + def initialize(refund_attributes_method: nil); end + end + class Redirect < Stripe::RequestParams + # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. + sig { returns(String) } + attr_accessor :return_url + sig { params(return_url: String).void } + def initialize(return_url: nil); end + end + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # The ID of the SKU being ordered. + sig { returns(String) } + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + sig { returns(Integer) } + attr_accessor :quantity + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { + params(amount: Integer, currency: String, description: String, parent: String, quantity: Integer, type: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::Source::CreateParams::SourceOrder::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::Source::CreateParams::SourceOrder::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize( + address: nil, + carrier: nil, + name: nil, + phone: nil, + tracking_number: nil + ); end + end + # List of items constituting the order. + sig { returns(T::Array[::Stripe::Source::CreateParams::SourceOrder::Item]) } + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + sig { returns(::Stripe::Source::CreateParams::SourceOrder::Shipping) } + attr_accessor :shipping + sig { + params(items: T::Array[::Stripe::Source::CreateParams::SourceOrder::Item], shipping: ::Stripe::Source::CreateParams::SourceOrder::Shipping).void + } + def initialize(items: nil, shipping: nil); end + end + # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. + sig { returns(String) } + attr_accessor :currency + # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + sig { returns(String) } + attr_accessor :flow + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + sig { returns(::Stripe::Source::CreateParams::Mandate) } + attr_accessor :mandate + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The source to share. + sig { returns(String) } + attr_accessor :original_source + # Information about the owner of the payment instrument that may be used or required by particular source types. + sig { returns(::Stripe::Source::CreateParams::Owner) } + attr_accessor :owner + # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + sig { returns(::Stripe::Source::CreateParams::Receiver) } + attr_accessor :receiver + # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + sig { returns(::Stripe::Source::CreateParams::Redirect) } + attr_accessor :redirect + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + sig { returns(::Stripe::Source::CreateParams::SourceOrder) } + attr_accessor :source_order + # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. + sig { returns(String) } + attr_accessor :statement_descriptor + # An optional token used to create the source. When passed, token properties will override source parameters. + sig { returns(String) } + attr_accessor :token + # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) + sig { returns(String) } + attr_accessor :type + # Attribute for param field usage + sig { returns(String) } + attr_accessor :usage + sig { + params(amount: Integer, currency: String, customer: String, expand: T::Array[String], flow: String, mandate: ::Stripe::Source::CreateParams::Mandate, metadata: T::Hash[String, String], original_source: String, owner: ::Stripe::Source::CreateParams::Owner, receiver: ::Stripe::Source::CreateParams::Receiver, redirect: ::Stripe::Source::CreateParams::Redirect, source_order: ::Stripe::Source::CreateParams::SourceOrder, statement_descriptor: String, token: String, type: String, usage: String).void + } + def initialize( + amount: nil, + currency: nil, + customer: nil, + expand: nil, + flow: nil, + mandate: nil, + metadata: nil, + original_source: nil, + owner: nil, + receiver: nil, + redirect: nil, + source_order: nil, + statement_descriptor: nil, + token: nil, + type: nil, + usage: nil + ); end + end + class VerifyParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The values needed to verify the source. + sig { returns(T::Array[String]) } + attr_accessor :values + sig { params(expand: T::Array[String], values: T::Array[String]).void } + def initialize(expand: nil, values: nil); end + end + # Creates a new source object. + sig { + params(params: T.any(::Stripe::Source::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def self.create(params = {}, opts = {}); end + + # Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + # + # This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail. + sig { + params(id: String, params: T.any(::Stripe::Source::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def self.update(id, params = {}, opts = {}); end + + # Verify a given source. + sig { + params(params: T.any(::Stripe::Source::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def verify(params = {}, opts = {}); end + + # Verify a given source. + sig { + params(source: String, params: T.any(::Stripe::Source::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def self.verify(source, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/source_mandate_notification.rbi b/rbi/stripe/resources/source_mandate_notification.rbi index 75df160c6..e731b0f22 100644 --- a/rbi/stripe/resources/source_mandate_notification.rbi +++ b/rbi/stripe/resources/source_mandate_notification.rbi @@ -8,49 +8,53 @@ module Stripe # deliver an email to the customer. class SourceMandateNotification < APIResource class AcssDebit < Stripe::StripeObject + # The statement descriptor associate with the debit. sig { returns(String) } attr_reader :statement_descriptor end class BacsDebit < Stripe::StripeObject + # Last 4 digits of the account number associated with the debit. sig { returns(String) } attr_reader :last4 end class SepaDebit < Stripe::StripeObject + # SEPA creditor ID. sig { returns(String) } attr_reader :creditor_identifier + # Last 4 digits of the account number associated with the debit. sig { returns(String) } attr_reader :last4 + # Mandate reference associated with the debit. sig { returns(String) } attr_reader :mandate_reference end - sig { returns(AcssDebit) } # Attribute for field acss_debit + sig { returns(AcssDebit) } attr_reader :acss_debit - sig { returns(T.nilable(Integer)) } # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount associated with the mandate notification. The amount is expressed in the currency of the underlying source. Required if the notification type is `debit_initiated`. + sig { returns(T.nilable(Integer)) } attr_reader :amount - sig { returns(BacsDebit) } # Attribute for field bacs_debit + sig { returns(BacsDebit) } attr_reader :bacs_debit - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The reason of the mandate notification. Valid reasons are `mandate_confirmed` or `debit_initiated`. + sig { returns(String) } attr_reader :reason - sig { returns(SepaDebit) } # Attribute for field sepa_debit + sig { returns(SepaDebit) } attr_reader :sepa_debit - sig { returns(Stripe::Source) } # `Source` objects allow you to accept a variety of payment methods. They # represent a customer's payment instrument, and can be used with the Stripe API # just like a `Card` object: once chargeable, they can be charged, or can be @@ -61,12 +65,13 @@ module Stripe # This newer API provides access to our latest features and payment method types. # # Related guides: [Sources API](https://stripe.com/docs/sources) and [Sources & Customers](https://stripe.com/docs/sources/customers). + sig { returns(Stripe::Source) } attr_reader :source - sig { returns(String) } # The status of the mandate notification. Valid statuses are `pending` or `submitted`. - attr_reader :status sig { returns(String) } + attr_reader :status # The type of source this mandate notification is attached to. Should be the source type identifier code for the payment method, such as `three_d_secure`. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/source_transaction.rbi b/rbi/stripe/resources/source_transaction.rbi index 7345a49f6..7c4ca0127 100644 --- a/rbi/stripe/resources/source_transaction.rbi +++ b/rbi/stripe/resources/source_transaction.rbi @@ -9,98 +9,119 @@ module Stripe # transactions. class SourceTransaction < StripeObject class AchCreditTransfer < Stripe::StripeObject + # Customer data associated with the transfer. sig { returns(String) } attr_reader :customer_data + # Bank account fingerprint associated with the transfer. sig { returns(String) } attr_reader :fingerprint + # Last 4 digits of the account number associated with the transfer. sig { returns(String) } attr_reader :last4 + # Routing number associated with the transfer. sig { returns(String) } attr_reader :routing_number end class ChfCreditTransfer < Stripe::StripeObject + # Reference associated with the transfer. sig { returns(String) } attr_reader :reference + # Sender's country address. sig { returns(String) } attr_reader :sender_address_country + # Sender's line 1 address. sig { returns(String) } attr_reader :sender_address_line1 + # Sender's bank account IBAN. sig { returns(String) } attr_reader :sender_iban + # Sender's name. sig { returns(String) } attr_reader :sender_name end class GbpCreditTransfer < Stripe::StripeObject + # Bank account fingerprint associated with the Stripe owned bank account receiving the transfer. sig { returns(String) } attr_reader :fingerprint + # The credit transfer rails the sender used to push this transfer. The possible rails are: Faster Payments, BACS, CHAPS, and wire transfers. Currently only Faster Payments is supported. sig { returns(String) } attr_reader :funding_method + # Last 4 digits of sender account number associated with the transfer. sig { returns(String) } attr_reader :last4 + # Sender entered arbitrary information about the transfer. sig { returns(String) } attr_reader :reference + # Sender account number associated with the transfer. sig { returns(String) } attr_reader :sender_account_number + # Sender name associated with the transfer. sig { returns(String) } attr_reader :sender_name + # Sender sort code associated with the transfer. sig { returns(String) } attr_reader :sender_sort_code end class PaperCheck < Stripe::StripeObject + # Time at which the deposited funds will be available for use. Measured in seconds since the Unix epoch. sig { returns(String) } attr_reader :available_at + # Comma-separated list of invoice IDs associated with the paper check. sig { returns(String) } attr_reader :invoices end class SepaCreditTransfer < Stripe::StripeObject + # Reference associated with the transfer. sig { returns(String) } attr_reader :reference + # Sender's bank account IBAN. sig { returns(String) } attr_reader :sender_iban + # Sender's name. sig { returns(String) } attr_reader :sender_name end - sig { returns(AchCreditTransfer) } # Attribute for field ach_credit_transfer + sig { returns(AchCreditTransfer) } attr_reader :ach_credit_transfer - sig { returns(Integer) } # A positive integer in the smallest currency unit (that is, 100 cents for $1.00, or 1 for ¥1, Japanese Yen being a zero-decimal currency) representing the amount your customer has pushed to the receiver. + sig { returns(Integer) } attr_reader :amount - sig { returns(ChfCreditTransfer) } # Attribute for field chf_credit_transfer + sig { returns(ChfCreditTransfer) } attr_reader :chf_credit_transfer - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(GbpCreditTransfer) } # Attribute for field gbp_credit_transfer + sig { returns(GbpCreditTransfer) } attr_reader :gbp_credit_transfer - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(PaperCheck) } # Attribute for field paper_check + sig { returns(PaperCheck) } attr_reader :paper_check - sig { returns(SepaCreditTransfer) } # Attribute for field sepa_credit_transfer + sig { returns(SepaCreditTransfer) } attr_reader :sepa_credit_transfer - sig { returns(String) } # The ID of the source this transaction is attached to. - attr_reader :source sig { returns(String) } + attr_reader :source # The status of the transaction, one of `succeeded`, `pending`, or `failed`. - attr_reader :status sig { returns(String) } + attr_reader :status # The type of source this transaction is attached to. + sig { returns(String) } attr_reader :type end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription.rbi b/rbi/stripe/resources/subscription.rbi index 8ffa4cce4..8e92c350e 100644 --- a/rbi/stripe/resources/subscription.rbi +++ b/rbi/stripe/resources/subscription.rbi @@ -9,73 +9,99 @@ module Stripe class Subscription < APIResource class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on this subscription. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingCycleAnchorConfig < Stripe::StripeObject + # The day of the month of the billing_cycle_anchor. sig { returns(Integer) } attr_reader :day_of_month + # The hour of the day of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :hour + # The minute of the hour of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :minute + # The month to start full cycle billing periods. sig { returns(T.nilable(Integer)) } attr_reader :month + # The second of the minute of the billing_cycle_anchor. sig { returns(T.nilable(Integer)) } attr_reader :second end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class CancellationDetails < Stripe::StripeObject + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. sig { returns(T.nilable(String)) } attr_reader :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. sig { returns(T.nilable(String)) } attr_reader :feedback + # Why this subscription was canceled. sig { returns(T.nilable(String)) } attr_reader :reason end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject + # The original price to be migrated. sig { returns(String) } attr_reader :source_price + # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end + # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at + # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions + # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior + # The time after which the subscription will resume collecting payments. sig { returns(T.nilable(Integer)) } attr_reader :resumes_at end @@ -83,47 +109,62 @@ module Stripe class PaymentMethodOptions < Stripe::StripeObject class AcssDebit < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Transaction type of the mandate. sig { returns(T.nilable(String)) } attr_reader :transaction_type end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end class Bancontact < Stripe::StripeObject + # Preferred language of the Bancontact authorization page that the customer is redirected to. sig { returns(String) } attr_reader :preferred_language end class Card < Stripe::StripeObject class MandateOptions < Stripe::StripeObject + # Amount to be charged for future payments. sig { returns(T.nilable(Integer)) } attr_reader :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. sig { returns(T.nilable(String)) } attr_reader :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. sig { returns(T.nilable(String)) } attr_reader :description end + # Attribute for field mandate_options sig { returns(MandateOptions) } attr_reader :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. sig { returns(T.nilable(String)) } attr_reader :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. sig { returns(T.nilable(String)) } attr_reader :request_three_d_secure end class CustomerBalance < Stripe::StripeObject class BankTransfer < Stripe::StripeObject class EuBankTransfer < Stripe::StripeObject + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. sig { returns(String) } attr_reader :country end + # Attribute for field eu_bank_transfer sig { returns(EuBankTransfer) } attr_reader :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :type end + # Attribute for field bank_transfer sig { returns(BankTransfer) } attr_reader :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. sig { returns(T.nilable(String)) } attr_reader :funding_type end @@ -133,220 +174,253 @@ module Stripe class UsBankAccount < Stripe::StripeObject class FinancialConnections < Stripe::StripeObject class Filters < Stripe::StripeObject + # The account subcategories to use to filter for possible accounts to link. Valid subcategories are `checking` and `savings`. sig { returns(T::Array[String]) } attr_reader :account_subcategories + # The institution to use to filter for possible accounts to link. sig { returns(String) } attr_reader :institution end + # Attribute for field filters sig { returns(Filters) } attr_reader :filters + # The list of permissions to request. The `payment_method` permission must be included. sig { returns(T::Array[String]) } attr_reader :permissions + # Data features requested to be retrieved upon account creation. sig { returns(T.nilable(T::Array[String])) } attr_reader :prefetch end + # Attribute for field financial_connections sig { returns(FinancialConnections) } attr_reader :financial_connections + # Bank account verification method. sig { returns(String) } attr_reader :verification_method end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(AcssDebit)) } attr_reader :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Bancontact)) } attr_reader :bancontact + # This sub-hash contains details about the Card payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Card)) } attr_reader :card + # This sub-hash contains details about the Bank transfer payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(CustomerBalance)) } attr_reader :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(IdBankTransfer)) } attr_reader :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(Konbini)) } attr_reader :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(SepaDebit)) } attr_reader :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to invoices created by the subscription. sig { returns(T.nilable(UsBankAccount)) } attr_reader :us_bank_account end + # Payment-method-specific configuration to provide to invoices created by the subscription. sig { returns(T.nilable(PaymentMethodOptions)) } attr_reader :payment_method_options + # The list of payment method types to provide to every invoice created by the subscription. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). sig { returns(T.nilable(T::Array[String])) } attr_reader :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off`. sig { returns(T.nilable(String)) } attr_reader :save_default_payment_method end class PendingInvoiceItemInterval < Stripe::StripeObject + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. sig { returns(String) } attr_reader :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). sig { returns(Integer) } attr_reader :interval_count end class PendingUpdate < Stripe::StripeObject + # If the update is applied, determines the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. The timestamp is in UTC format. sig { returns(T.nilable(Integer)) } attr_reader :billing_cycle_anchor + # The point after which the changes reflected by this update will be discarded and no longer applied. sig { returns(Integer) } attr_reader :expires_at + # The number of iterations of prebilling to apply. sig { returns(T.nilable(Integer)) } attr_reader :prebilling_iterations + # List of subscription items, each with an attached plan, that will be set if the update is applied. sig { returns(T.nilable(T::Array[Stripe::SubscriptionItem])) } attr_reader :subscription_items + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time, if the update is applied. sig { returns(T.nilable(Integer)) } attr_reader :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. sig { returns(T.nilable(T::Boolean)) } attr_reader :trial_from_plan end class Prebilling < Stripe::StripeObject + # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end + # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. sig { returns(String) } attr_reader :missing_payment_method end + # Defines how a subscription behaves when a free trial ends. sig { returns(EndBehavior) } attr_reader :end_behavior end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the subscription. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(T.nilable(Float)) } # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. + sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent - sig { returns(AutomaticTax) } # Attribute for field automatic_tax + sig { returns(AutomaticTax) } attr_reader :automatic_tax - sig { returns(Integer) } # The reference point that aligns future [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle) dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. The timestamp is in UTC format. + sig { returns(Integer) } attr_reader :billing_cycle_anchor - sig { returns(T.nilable(BillingCycleAnchorConfig)) } # The fixed values used to calculate the `billing_cycle_anchor`. + sig { returns(T.nilable(BillingCycleAnchorConfig)) } attr_reader :billing_cycle_anchor_config - sig { returns(T.nilable(BillingThresholds)) } # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period + sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - sig { returns(T.nilable(Integer)) } # A date in the future at which the subscription will automatically get canceled + sig { returns(T.nilable(Integer)) } attr_reader :cancel_at - sig { returns(T::Boolean) } # Whether this subscription will (if `status=active`) or did (if `status=canceled`) cancel at the end of the current billing period. + sig { returns(T::Boolean) } attr_reader :cancel_at_period_end - sig { returns(T.nilable(Integer)) } # If the subscription has been canceled, the date of that cancellation. If the subscription was canceled with `cancel_at_period_end`, `canceled_at` will reflect the time of the most recent update request, not the end of the subscription period when the subscription is automatically moved to a canceled state. + sig { returns(T.nilable(Integer)) } attr_reader :canceled_at - sig { returns(T.nilable(CancellationDetails)) } # Details about why this subscription was cancelled + sig { returns(T.nilable(CancellationDetails)) } attr_reader :cancellation_details - sig { returns(String) } # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. + sig { returns(String) } attr_reader :collection_method - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(Integer) } # End of the current period that the subscription has been invoiced for. At the end of this period, a new invoice will be created. - attr_reader :current_period_end sig { returns(Integer) } + attr_reader :current_period_end # Start of the current period that the subscription has been invoiced for. + sig { returns(Integer) } attr_reader :current_period_start - sig { returns(T.any(String, Stripe::Customer)) } # ID of the customer who owns the subscription. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(T.nilable(Integer)) } # Number of days a customer has to pay invoices generated by this subscription. This value will be `null` for subscriptions where `collection_method=charge_automatically`. + sig { returns(T.nilable(Integer)) } attr_reader :days_until_due - sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). sig { returns(T.nilable(T.any(String, T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)))) } - # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). attr_reader :default_source - sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates - sig { returns(T.nilable(String)) } # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Stripe::Discount)) } # Describes the current discount applied to this subscription, if there is one. When billing, a discount applied to a subscription overrides a discount applied on a customer-wide basis. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(T.nilable(Stripe::Discount)) } attr_reader :discount - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } # The discounts applied to the subscription. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(T.nilable(Integer)) } # If the subscription has ended, the date the subscription ended. + sig { returns(T.nilable(Integer)) } attr_reader :ended_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(InvoiceSettings) } # Attribute for field invoice_settings + sig { returns(InvoiceSettings) } attr_reader :invoice_settings - sig { returns(Stripe::ListObject) } # List of subscription items, each with an attached price. + sig { returns(Stripe::ListObject) } attr_reader :items - sig { returns(T.nilable(LastPriceMigrationError)) } # Details of the most recent price migration that failed for the subscription. + sig { returns(T.nilable(LastPriceMigrationError)) } attr_reader :last_price_migration_error - sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } # The most recent invoice this subscription has generated. + sig { returns(T.nilable(T.any(String, Stripe::Invoice))) } attr_reader :latest_invoice - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(Integer)) } # Specifies the approximate timestamp on which any pending invoice items will be billed according to the schedule provided at `pending_invoice_item_interval`. + sig { returns(T.nilable(Integer)) } attr_reader :next_pending_invoice_item_invoice - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # The account (if any) the charge was made on behalf of for charges associated with this subscription. See the Connect documentation for details. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of - sig { returns(T.nilable(PauseCollection)) } # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection - sig { returns(T.nilable(PaymentSettings)) } # Payment settings passed on to invoices created by the subscription. + sig { returns(T.nilable(PaymentSettings)) } attr_reader :payment_settings - sig { returns(T.nilable(PendingInvoiceItemInterval)) } # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + sig { returns(T.nilable(PendingInvoiceItemInterval)) } attr_reader :pending_invoice_item_interval - sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } # You can use this [SetupIntent](https://stripe.com/docs/api/setup_intents) to collect user authentication when creating a subscription without immediate payment or updating a subscription's payment method, allowing you to optimize for off-session payments. Learn more in the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication#scenario-2). + sig { returns(T.nilable(T.any(String, Stripe::SetupIntent))) } attr_reader :pending_setup_intent - sig { returns(T.nilable(PendingUpdate)) } # If specified, [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates) that will be applied to the subscription once the `latest_invoice` has been paid. + sig { returns(T.nilable(PendingUpdate)) } attr_reader :pending_update - sig { returns(T.nilable(Prebilling)) } # Time period and invoice for a Subscription billed in advance. + sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } # The schedule attached to the subscription + sig { returns(T.nilable(T.any(String, Stripe::SubscriptionSchedule))) } attr_reader :schedule - sig { returns(Integer) } # Date when the subscription was first created. The date might differ from the `created` date due to backdating. + sig { returns(Integer) } attr_reader :start_date - sig { returns(String) } # Possible values are `incomplete`, `incomplete_expired`, `trialing`, `active`, `past_due`, `canceled`, `unpaid`, or `paused`. # # For `collection_method=charge_automatically` a subscription moves into `incomplete` if the initial payment attempt fails. A subscription in this status can only have metadata and default_source updated. Once the first invoice is paid, the subscription moves into an `active` status. If the first invoice is not paid within 23 hours, the subscription transitions to `incomplete_expired`. This is a terminal status, the open invoice will be voided and no further invoices will be generated. @@ -358,21 +432,1875 @@ module Stripe # If subscription `collection_method=charge_automatically`, it becomes `past_due` when payment is required but cannot be paid (due to failed payment or awaiting additional user actions). Once Stripe has exhausted all payment retry attempts, the subscription will become `canceled` or `unpaid` (depending on your subscriptions settings). # # If subscription `collection_method=send_invoice` it becomes `past_due` when its invoice is not paid by the due date, and `canceled` or `unpaid` if it is still not paid by an additional deadline after that. Note that when a subscription has a status of `unpaid`, no subsequent invoices will be attempted (invoices will be created, but then immediately automatically closed). After receiving updated payment information from a customer, you may choose to reopen and pay their closed invoices. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this subscription belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock - sig { returns(T.nilable(TransferData)) } # The account (if any) the subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. + sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data - sig { returns(T.nilable(Integer)) } # If the subscription has a trial, the end of that trial. + sig { returns(T.nilable(Integer)) } attr_reader :trial_end - sig { returns(T.nilable(TrialSettings)) } # Settings related to subscription trials. + sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings - sig { returns(T.nilable(Integer)) } # If the subscription has a trial, the beginning of that trial. + sig { returns(T.nilable(Integer)) } attr_reader :trial_start + class CancelParams < Stripe::RequestParams + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :feedback + sig { params(comment: T.nilable(String), feedback: T.nilable(String)).void } + def initialize(comment: nil, feedback: nil); end + end + # Details about why this subscription was cancelled + sig { returns(::Stripe::Subscription::CancelParams::CancellationDetails) } + attr_accessor :cancellation_details + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { + params(cancellation_details: ::Stripe::Subscription::CancelParams::CancellationDetails, expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void + } + def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { returns(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount]) } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Subscription::UpdateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Subscription::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Subscription::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :feedback + sig { params(comment: T.nilable(String), feedback: T.nilable(String)).void } + def initialize(comment: nil, feedback: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Subscription::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Subscription::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Subscription::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::Subscription::UpdateParams::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::UpdateParams::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Subscription::UpdateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::Item::BillingThresholds)) } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item::Discount])) } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Subscription::UpdateParams::Item::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::Subscription::UpdateParams::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::Subscription::UpdateParams::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + # The time after which the subscription will resume collecting payments. + sig { returns(Integer) } + attr_accessor :resumes_at + sig { params(behavior: String, resumes_at: Integer).void } + def initialize(behavior: nil, resumes_at: nil); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + sig { params(amount: Integer, amount_type: String, description: String).void } + def initialize(amount: nil, amount_type: nil, description: nil); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(mandate_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void + } + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + sig { returns(::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + sig { returns(String) } + attr_accessor :save_default_payment_method + sig { + params(payment_method_options: ::Stripe::Subscription::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void + } + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ); end + end + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Subscription::UpdateParams::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + sig { returns(T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem]) } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + sig { returns(::Stripe::Subscription::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # Details about why this subscription was cancelled + sig { returns(::Stripe::Subscription::UpdateParams::CancellationDetails) } + attr_accessor :cancellation_details + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + sig { returns(Integer) } + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(T.nilable(String)) } + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + sig { returns(T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::Subscription::UpdateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + sig { returns(T::Array[::Stripe::Subscription::UpdateParams::Item]) } + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PauseCollection)) } + attr_accessor :pause_collection + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + sig { returns(String) } + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + sig { returns(::Stripe::Subscription::UpdateParams::PaymentSettings) } + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval)) } + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::Subscription::UpdateParams::Prebilling) } + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + sig { returns(Integer) } + attr_accessor :proration_date + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + sig { returns(T.nilable(::Stripe::Subscription::UpdateParams::TransferData)) } + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :trial_from_plan + # Settings related to subscription trials. + sig { returns(::Stripe::Subscription::UpdateParams::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::Subscription::UpdateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Subscription::UpdateParams::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::Subscription::UpdateParams::BillingThresholds), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancellation_details: ::Stripe::Subscription::UpdateParams::CancellationDetails, collection_method: String, coupon: String, days_until_due: Integer, default_payment_method: String, default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::Subscription::UpdateParams::Discount]), expand: T::Array[String], invoice_settings: ::Stripe::Subscription::UpdateParams::InvoiceSettings, items: T::Array[::Stripe::Subscription::UpdateParams::Item], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, on_behalf_of: T.nilable(String), pause_collection: T.nilable(::Stripe::Subscription::UpdateParams::PauseCollection), payment_behavior: String, payment_settings: ::Stripe::Subscription::UpdateParams::PaymentSettings, pending_invoice_item_interval: T.nilable(::Stripe::Subscription::UpdateParams::PendingInvoiceItemInterval), prebilling: ::Stripe::Subscription::UpdateParams::Prebilling, promotion_code: String, proration_behavior: String, proration_date: Integer, transfer_data: T.nilable(::Stripe::Subscription::UpdateParams::TransferData), trial_end: T.any(String, Integer), trial_from_plan: T::Boolean, trial_settings: ::Stripe::Subscription::UpdateParams::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancellation_details: nil, + collection_method: nil, + coupon: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + pause_collection: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + proration_date: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_settings: nil + ); end + end + class DeleteDiscountParams < Stripe::RequestParams + + end + class ListParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CurrentPeriodEnd < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CurrentPeriodStart < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Filter subscriptions by their automatic tax settings. + sig { returns(::Stripe::Subscription::ListParams::AutomaticTax) } + attr_accessor :automatic_tax + # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + sig { returns(String) } + attr_accessor :collection_method + # Only return subscriptions that were created during the given date interval. + sig { returns(T.any(::Stripe::Subscription::ListParams::Created, Integer)) } + attr_accessor :created + # Only return subscriptions whose current_period_end falls within the given date interval. + sig { returns(T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer)) } + attr_accessor :current_period_end + # Only return subscriptions whose current_period_start falls within the given date interval. + sig { returns(T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer)) } + attr_accessor :current_period_start + # The ID of the customer whose subscriptions will be retrieved. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The ID of the plan whose subscriptions will be retrieved. + sig { returns(String) } + attr_accessor :plan + # Filter for subscriptions that contain this recurring price ID. + sig { returns(String) } + attr_accessor :price + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. + sig { returns(String) } + attr_accessor :status + # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. + sig { returns(String) } + attr_accessor :test_clock + sig { + params(automatic_tax: ::Stripe::Subscription::ListParams::AutomaticTax, collection_method: String, created: T.any(::Stripe::Subscription::ListParams::Created, Integer), current_period_end: T.any(::Stripe::Subscription::ListParams::CurrentPeriodEnd, Integer), current_period_start: T.any(::Stripe::Subscription::ListParams::CurrentPeriodStart, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, plan: String, price: String, starting_after: String, status: String, test_clock: String).void + } + def initialize( + automatic_tax: nil, + collection_method: nil, + created: nil, + current_period_end: nil, + current_period_start: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + plan: nil, + price: nil, + starting_after: nil, + status: nil, + test_clock: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { returns(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount]) } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::Subscription::CreateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Subscription::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Subscription::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingCycleAnchorConfig < Stripe::RequestParams + # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31. + sig { returns(Integer) } + attr_accessor :day_of_month + # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23. + sig { returns(Integer) } + attr_accessor :hour + # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59. + sig { returns(Integer) } + attr_accessor :minute + # The month to start full cycle billing periods. Ranges from 1 to 12. + sig { returns(Integer) } + attr_accessor :month + # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. + sig { returns(Integer) } + attr_accessor :second + sig { + params(day_of_month: Integer, hour: Integer, minute: Integer, month: Integer, second: Integer).void + } + def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::Subscription::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Subscription::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Subscription::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::Subscription::CreateParams::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::Subscription::CreateParams::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::Subscription::CreateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::Subscription::CreateParams::Item::BillingThresholds)) } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item::Discount])) } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { returns(::Stripe::Subscription::CreateParams::Item::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Define options to configure the trial on the subscription item. + sig { returns(::Stripe::Subscription::CreateParams::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::Subscription::CreateParams::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::Subscription::CreateParams::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::Subscription::CreateParams::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + sig { params(amount: Integer, amount_type: String, description: String).void } + def initialize(amount: nil, amount_type: nil, description: nil); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(mandate_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void + } + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + sig { returns(::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + sig { returns(String) } + attr_accessor :save_default_payment_method + sig { + params(payment_method_options: ::Stripe::Subscription::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void + } + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ); end + end + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { returns(::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Subscription::CreateParams::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + sig { returns(T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem]) } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + sig { returns(::Stripe::Subscription::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + sig { returns(Integer) } + attr_accessor :backdate_start_date + # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. + sig { returns(Integer) } + attr_accessor :billing_cycle_anchor + # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. + sig { returns(::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig) } + attr_accessor :billing_cycle_anchor_config + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::Subscription::CreateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(Integer) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer to subscribe. + sig { returns(String) } + attr_accessor :customer + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + sig { returns(Integer) } + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(String) } + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + sig { returns(T.nilable(T::Array[::Stripe::Subscription::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::Subscription::CreateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + sig { returns(T::Array[::Stripe::Subscription::CreateParams::Item]) } + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Only applies to subscriptions with `collection_method=charge_automatically`. + # + # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + # + # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. + # + # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. + sig { returns(String) } + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + sig { returns(::Stripe::Subscription::CreateParams::PaymentSettings) } + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + sig { returns(T.nilable(::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval)) } + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::Subscription::CreateParams::Prebilling) } + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + sig { returns(::Stripe::Subscription::CreateParams::TransferData) } + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :trial_from_plan + # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(Integer) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { returns(::Stripe::Subscription::CreateParams::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::Subscription::CreateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::Subscription::CreateParams::AutomaticTax, backdate_start_date: Integer, billing_cycle_anchor: Integer, billing_cycle_anchor_config: ::Stripe::Subscription::CreateParams::BillingCycleAnchorConfig, billing_thresholds: T.nilable(::Stripe::Subscription::CreateParams::BillingThresholds), cancel_at: Integer, cancel_at_period_end: T::Boolean, collection_method: String, coupon: String, currency: String, customer: String, days_until_due: Integer, default_payment_method: String, default_source: String, default_tax_rates: T.nilable(T::Array[String]), description: String, discounts: T.nilable(T::Array[::Stripe::Subscription::CreateParams::Discount]), expand: T::Array[String], invoice_settings: ::Stripe::Subscription::CreateParams::InvoiceSettings, items: T::Array[::Stripe::Subscription::CreateParams::Item], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, on_behalf_of: T.nilable(String), payment_behavior: String, payment_settings: ::Stripe::Subscription::CreateParams::PaymentSettings, pending_invoice_item_interval: T.nilable(::Stripe::Subscription::CreateParams::PendingInvoiceItemInterval), prebilling: ::Stripe::Subscription::CreateParams::Prebilling, promotion_code: String, proration_behavior: String, transfer_data: ::Stripe::Subscription::CreateParams::TransferData, trial_end: T.any(String, Integer), trial_from_plan: T::Boolean, trial_period_days: Integer, trial_settings: ::Stripe::Subscription::CreateParams::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + backdate_start_date: nil, + billing_cycle_anchor: nil, + billing_cycle_anchor_config: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + collection_method: nil, + coupon: nil, + currency: nil, + customer: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class ResumeParams < Stripe::RequestParams + # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + sig { + params(billing_cycle_anchor: String, expand: T::Array[String], proration_behavior: String, proration_date: Integer).void + } + def initialize( + billing_cycle_anchor: nil, + expand: nil, + proration_behavior: nil, + proration_date: nil + ); end + end + # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). + # + # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. + # + # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + sig { + params(params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def cancel(params = {}, opts = {}); end + + # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). + # + # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. + # + # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + sig { + params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def self.cancel(subscription_exposed_id, params = {}, opts = {}); end + + # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. + # + # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + # The payment_behavior parameter determines the exact behavior of the initial payment. + # + # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead. + # Schedules provide the flexibility to model more complex billing configurations that change over time. + sig { + params(params: T.any(::Stripe::Subscription::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def self.create(params = {}, opts = {}); end + + # Removes the currently applied discount on a subscription. + sig { + params(params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount) + } + def delete_discount(params = {}, opts = {}); end + + # Removes the currently applied discount on a subscription. + sig { + params(subscription_exposed_id: String, params: T.any(::Stripe::Subscription::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount) + } + def self.delete_discount(subscription_exposed_id, params = {}, opts = {}); end + + # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. + sig { + params(params: T.any(::Stripe::Subscription::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. + sig { + params(params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def resume(params = {}, opts = {}); end + + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. + sig { + params(subscription: String, params: T.any(::Stripe::Subscription::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def self.resume(subscription, params = {}, opts = {}); end + + sig { params(params: T.untyped, opts: T.untyped).returns(Stripe::SearchResultObject) } + def self.search(params = {}, opts = {}); end + + sig { + params(params: T.untyped, opts: T.untyped, blk: T.untyped).returns(Stripe::SearchResultObject) + } + def self.search_auto_paging_each(params = {}, opts = {}, &blk); end + + # Updates an existing subscription to match the specified parameters. + # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. + # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. + # + # By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. + # + # Switching prices does not normally change the billing date or generate an immediate charge unless: + # + # + # The billing interval is changed (for example, from monthly to yearly). + # The subscription moves from free to paid. + # A trial starts or ends. + # + # + # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). + # + # If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). + # + # If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription. + # + # Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating
usage-based billing](https://stripe.com/docs/rate-limits) instead. + sig { + params(id: String, params: T.any(::Stripe::Subscription::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_item.rbi b/rbi/stripe/resources/subscription_item.rbi index ac87a5823..0381eeba2 100644 --- a/rbi/stripe/resources/subscription_item.rbi +++ b/rbi/stripe/resources/subscription_item.rbi @@ -7,34 +7,36 @@ module Stripe # one plan, making it easy to represent complex billing relationships. class SubscriptionItem < APIResource class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(BillingThresholds)) } # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period + sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T::Array[T.any(String, Stripe::Discount)]) } # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. + sig { returns(T::Array[T.any(String, Stripe::Discount)]) } attr_reader :discounts - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::Plan) } # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. # # Plans define the base price, currency, and billing cycle for recurring purchases of products. @@ -43,29 +45,434 @@ module Stripe # For example, you might have a single "gold" product that has plans for $10/month, $100/year, €9/month, and €90/year. # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription) and more about [products and prices](https://stripe.com/docs/products-prices/overview). + sig { returns(Stripe::Plan) } attr_reader :plan - sig { returns(Stripe::Price) } # Prices define the unit cost, currency, and (optional) billing cycle for both recurring and one-time purchases of products. # [Products](https://stripe.com/docs/api#products) help you track inventory or provisioning, and prices help you track payment terms. Different physical goods or levels of service should be represented by products, and pricing options should be represented by prices. This approach lets you change prices without having to change your provisioning scheme. # # For example, you might have a single "gold" product that has prices for $10/month, $100/year, and €9 once. # # Related guides: [Set up a subscription](https://stripe.com/docs/billing/subscriptions/set-up-subscription), [create an invoice](https://stripe.com/docs/billing/invoices/create), and more about [products and prices](https://stripe.com/docs/products-prices/overview). + sig { returns(Stripe::Price) } attr_reader :price - sig { returns(Integer) } # The [quantity](https://stripe.com/docs/subscriptions/quantities) of the plan to which the customer should be subscribed. + sig { returns(Integer) } attr_reader :quantity - sig { returns(String) } # The `subscription` this `subscription_item` belongs to. + sig { returns(String) } attr_reader :subscription - sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } # The tax rates which apply to this `subscription_item`. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates - sig { returns(T.nilable(Trial)) } # Options that configure the trial on the subscription item. + sig { returns(T.nilable(Trial)) } attr_reader :trial - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + sig { + params(clear_usage: T::Boolean, proration_behavior: String, proration_date: Integer).void + } + def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::SubscriptionItem::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionItem::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionItem::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionItem::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::SubscriptionItem::UpdateParams::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItem::UpdateParams::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::SubscriptionItem::UpdateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { returns(T.nilable(T::Array[::Stripe::SubscriptionItem::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + sig { returns(String) } + attr_accessor :payment_behavior + # The identifier of the new plan for this subscription item. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::SubscriptionItem::UpdateParams::PriceData) } + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionItem::UpdateParams::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionItem::UpdateParams::Discount]), expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, payment_behavior: String, plan: String, price: String, price_data: ::Stripe::SubscriptionItem::UpdateParams::PriceData, proration_behavior: String, proration_date: Integer, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + off_session: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + tax_rates: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The ID of the subscription whose items will be retrieved. + sig { returns(String) } + attr_accessor :subscription + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, subscription: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + subscription: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::SubscriptionItem::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionItem::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionItem::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionItem::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::SubscriptionItem::CreateParams::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItem::CreateParams::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::SubscriptionItem::CreateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { returns(T.nilable(T::Array[::Stripe::SubscriptionItem::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + sig { returns(String) } + attr_accessor :payment_behavior + # The identifier of the plan to add to the subscription. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { returns(::Stripe::SubscriptionItem::CreateParams::PriceData) } + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + sig { returns(Integer) } + attr_accessor :quantity + # The identifier of the subscription to modify. + sig { returns(String) } + attr_accessor :subscription + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionItem::CreateParams::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionItem::CreateParams::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionItem::CreateParams::Discount]), expand: T::Array[String], metadata: T::Hash[String, String], payment_behavior: String, plan: String, price: String, price_data: ::Stripe::SubscriptionItem::CreateParams::PriceData, proration_behavior: String, proration_date: Integer, quantity: Integer, subscription: String, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionItem::CreateParams::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + subscription: nil, + tax_rates: nil, + trial: nil + ); end + end + # Adds a new item to an existing subscription. No existing items will be changed or replaced. + sig { + params(params: T.any(::Stripe::SubscriptionItem::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def self.create(params = {}, opts = {}); end + + # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. + sig { + params(id: String, params: T.any(::Stripe::SubscriptionItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. + sig { + params(params: T.any(::Stripe::SubscriptionItem::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your subscription items for a given subscription. + sig { + params(params: T.any(::Stripe::SubscriptionItem::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the plan or quantity of an item on a current subscription. + sig { + params(id: String, params: T.any(::Stripe::SubscriptionItem::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/subscription_schedule.rbi b/rbi/stripe/resources/subscription_schedule.rbi index 33c38d7e6..7459616c3 100644 --- a/rbi/stripe/resources/subscription_schedule.rbi +++ b/rbi/stripe/resources/subscription_schedule.rbi @@ -8,84 +8,115 @@ module Stripe # Related guide: [Subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules) class SubscriptionSchedule < APIResource class CurrentPhase < Stripe::StripeObject + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date end class DefaultSettings < Stripe::StripeObject class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # Attribute for field issuer sig { returns(Issuer) } attr_reader :issuer end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(String) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the default payment method for the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # Attribute for field invoice_settings sig { returns(InvoiceSettings) } attr_reader :invoice_settings + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data end class LastPriceMigrationError < Stripe::StripeObject class FailedTransition < Stripe::StripeObject + # The original price to be migrated. sig { returns(String) } attr_reader :source_price + # The intended resulting price of the migration. sig { returns(String) } attr_reader :target_price end + # The time at which the price migration encountered an error. sig { returns(Integer) } attr_reader :errored_at + # The involved price pairs in each failed transition. sig { returns(T::Array[FailedTransition]) } attr_reader :failed_transitions + # The type of error encountered by the price migration. sig { returns(String) } attr_reader :type end @@ -93,262 +124,2530 @@ module Stripe class AddInvoiceItem < Stripe::StripeObject class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end + # The stackable discounts that will be applied to the item. sig { returns(T::Array[Discount]) } attr_reader :discounts + # ID of the price used to generate the invoice item. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # The quantity of the invoice item. sig { returns(T.nilable(Integer)) } attr_reader :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates end class AutomaticTax < Stripe::StripeObject class Liability < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # If Stripe disabled automatic tax, this enum describes why. sig { returns(T.nilable(String)) } attr_reader :disabled_reason + # Whether Stripe automatically computes tax on invoices created during this phase. sig { returns(T::Boolean) } attr_reader :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. sig { returns(T.nilable(Liability)) } attr_reader :liability end class BillingThresholds < Stripe::StripeObject + # Monetary threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. This value may not be `true` if the subscription contains items with plans that have `aggregate_usage=last_ever`. sig { returns(T.nilable(T::Boolean)) } attr_reader :reset_billing_cycle_anchor end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class InvoiceSettings < Stripe::StripeObject class Issuer < Stripe::StripeObject + # The connected account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # Type of the account referenced. sig { returns(String) } attr_reader :type end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. sig { returns(T.nilable(T::Array[T.any(String, Stripe::TaxId)])) } attr_reader :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. sig { returns(T.nilable(Integer)) } attr_reader :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. sig { returns(T.nilable(Issuer)) } attr_reader :issuer end class Item < Stripe::StripeObject class BillingThresholds < Stripe::StripeObject + # Usage threshold that triggers the subscription to create an invoice sig { returns(T.nilable(Integer)) } attr_reader :usage_gte end class Discount < Stripe::StripeObject class DiscountEnd < Stripe::StripeObject + # The discount end timestamp. sig { returns(T.nilable(Integer)) } attr_reader :timestamp + # The discount end type. sig { returns(String) } attr_reader :type end + # ID of the coupon to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. sig { returns(T.nilable(T.any(String, Stripe::Discount))) } attr_reader :discount + # Details to determine how long the discount should be applied for. sig { returns(T.nilable(DiscountEnd)) } attr_reader :discount_end + # ID of the promotion code to create a new discount for. sig { returns(T.nilable(T.any(String, Stripe::PromotionCode))) } attr_reader :promotion_code end class Trial < Stripe::StripeObject + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. sig { returns(T.nilable(T::Array[String])) } attr_reader :converts_to + # Determines the type of trial for this item. sig { returns(String) } attr_reader :type end + # Define thresholds at which an invoice will be sent, and the related subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # The discounts applied to the subscription item. Subscription item discounts are applied before subscription discounts. Use `expand[]=discounts` to expand each discount. sig { returns(T::Array[Discount]) } attr_reader :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an item. Metadata on this item will update the underlying subscription item's `metadata` when the phase is entered. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # ID of the plan to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Plan)) } attr_reader :plan + # ID of the price to which the customer should be subscribed. sig { returns(T.any(String, Stripe::Price)) } attr_reader :price + # Quantity of the plan to which the customer should be subscribed. sig { returns(Integer) } attr_reader :quantity + # The tax rates which apply to this `phase_item`. When set, the `default_tax_rates` on the phase do not apply to this `phase_item`. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :tax_rates + # Options that configure the trial on the subscription item. sig { returns(T.nilable(Trial)) } attr_reader :trial end class PauseCollection < Stripe::StripeObject + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. sig { returns(String) } attr_reader :behavior end class TransferData < Stripe::StripeObject + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. sig { returns(T.nilable(Float)) } attr_reader :amount_percent + # The account where funds from the payment will be transferred to upon payment success. sig { returns(T.any(String, Stripe::Account)) } attr_reader :destination end class TrialSettings < Stripe::StripeObject class EndBehavior < Stripe::StripeObject + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. sig { returns(T.nilable(String)) } attr_reader :prorate_up_front end + # Defines how the subscription should behave when a trial ends. sig { returns(T.nilable(EndBehavior)) } attr_reader :end_behavior end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. sig { returns(T::Array[AddInvoiceItem]) } attr_reader :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account during this phase of the schedule. sig { returns(T.nilable(Float)) } attr_reader :application_fee_percent + # Attribute for field automatic_tax sig { returns(AutomaticTax) } attr_reader :automatic_tax + # Possible values are `phase_start` or `automatic`. If `phase_start` then billing cycle anchor of the subscription is set to the start of the phase when entering the phase. If `automatic` then the billing cycle anchor is automatically modified as needed when entering the phase. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). sig { returns(T.nilable(String)) } attr_reader :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period sig { returns(T.nilable(BillingThresholds)) } attr_reader :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. sig { returns(T.nilable(String)) } attr_reader :collection_method + # ID of the coupon to use during this phase of the subscription schedule. sig { returns(T.nilable(T.any(String, Stripe::Coupon))) } attr_reader :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. sig { returns(T.nilable(T.any(String, Stripe::PaymentMethod))) } attr_reader :default_payment_method + # The default tax rates to apply to the subscription during this phase of the subscription schedule. sig { returns(T.nilable(T::Array[Stripe::TaxRate])) } attr_reader :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. sig { returns(T.nilable(String)) } attr_reader :description + # The stackable discounts that will be applied to the subscription on this phase. Subscription item discounts are applied before subscription discounts. sig { returns(T::Array[Discount]) } attr_reader :discounts + # The end of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :end_date + # The invoice settings applicable during this phase. sig { returns(T.nilable(InvoiceSettings)) } attr_reader :invoice_settings + # Subscription items to configure the subscription to during this phase of the subscription schedule. sig { returns(T::Array[Item]) } attr_reader :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered. Updating the underlying subscription's `metadata` directly will not affect the current phase's `metadata`. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata + # The account (if any) the charge was made on behalf of for charges associated with the schedule's subscription. See the Connect documentation for details. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). sig { returns(T.nilable(PauseCollection)) } attr_reader :pause_collection + # If the subscription schedule will prorate when transitioning to this phase. Possible values are `create_prorations` and `none`. sig { returns(String) } attr_reader :proration_behavior + # The start of this phase of the subscription schedule. sig { returns(Integer) } attr_reader :start_date + # The account (if any) the associated subscription's payments will be attributed to for tax reporting, and where funds from each payment will be transferred to for each of the subscription's invoices. sig { returns(T.nilable(TransferData)) } attr_reader :transfer_data + # Specify behavior of the trial when crossing schedule phase boundaries sig { returns(T.nilable(String)) } attr_reader :trial_continuation + # When the trial ends within the phase. sig { returns(T.nilable(Integer)) } attr_reader :trial_end + # Settings related to any trials on the subscription during this phase. sig { returns(T.nilable(TrialSettings)) } attr_reader :trial_settings end class Prebilling < Stripe::StripeObject + # ID of the prebilling invoice. sig { returns(T.any(String, Stripe::Invoice)) } attr_reader :invoice + # The end of the last period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_end + # The start of the first period for which the invoice pre-bills. sig { returns(Integer) } attr_reader :period_start + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. sig { returns(String) } attr_reader :update_behavior end - sig { returns(T.nilable(T.any(String, Stripe::Application))) } # ID of the Connect Application that created the schedule. + sig { returns(T.nilable(T.any(String, Stripe::Application))) } attr_reader :application - sig { returns(String) } # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } attr_reader :billing_behavior - sig { returns(T.nilable(Integer)) } # Time at which the subscription schedule was canceled. Measured in seconds since the Unix epoch. - attr_reader :canceled_at sig { returns(T.nilable(Integer)) } + attr_reader :canceled_at # Time at which the subscription schedule was completed. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :completed_at - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(CurrentPhase)) } # Object representing the start and end dates for the current phase of the subscription schedule, if it is `active`. + sig { returns(T.nilable(CurrentPhase)) } attr_reader :current_phase - sig { returns(T.any(String, Stripe::Customer)) } # ID of the customer who owns the subscription schedule. + sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer - sig { returns(DefaultSettings) } # Attribute for field default_settings + sig { returns(DefaultSettings) } attr_reader :default_settings - sig { returns(String) } # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. - attr_reader :end_behavior sig { returns(String) } + attr_reader :end_behavior # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LastPriceMigrationError)) } # Details of the most recent price migration that failed for the subscription schedule. + sig { returns(T.nilable(LastPriceMigrationError)) } attr_reader :last_price_migration_error - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[Phase]) } # Configuration for the subscription schedule's phases. + sig { returns(T::Array[Phase]) } attr_reader :phases - sig { returns(T.nilable(Prebilling)) } # Time period and invoice for a Subscription billed in advance. + sig { returns(T.nilable(Prebilling)) } attr_reader :prebilling - sig { returns(T.nilable(Integer)) } # Time at which the subscription schedule was released. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :released_at - sig { returns(T.nilable(String)) } # ID of the subscription once managed by the subscription schedule (if it is released). + sig { returns(T.nilable(String)) } attr_reader :released_subscription - sig { returns(String) } # The present status of the subscription schedule. Possible values are `not_started`, `active`, `completed`, `released`, and `canceled`. You can read more about the different states in our [behavior guide](https://stripe.com/docs/billing/subscriptions/subscription-schedules). + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } # ID of the subscription managed by the subscription schedule. + sig { returns(T.nilable(T.any(String, Stripe::Subscription))) } attr_reader :subscription - sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } # ID of the test clock this subscription schedule belongs to. + sig { returns(T.nilable(T.any(String, Stripe::TestHelpers::TestClock))) } attr_reader :test_clock + class ListParams < Stripe::RequestParams + class CanceledAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CompletedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class ReleasedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return subscription schedules that were created canceled the given date interval. + sig { returns(T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer)) } + attr_accessor :canceled_at + # Only return subscription schedules that completed during the given date interval. + sig { returns(T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer)) } + attr_accessor :completed_at + # Only return subscription schedules that were created during the given date interval. + sig { returns(T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer)) } + attr_accessor :created + # Only return subscription schedules for the given customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return subscription schedules that were released during the given date interval. + sig { returns(T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer)) } + attr_accessor :released_at + # Only return subscription schedules that have not started yet. + sig { returns(T::Boolean) } + attr_accessor :scheduled + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(canceled_at: T.any(::Stripe::SubscriptionSchedule::ListParams::CanceledAt, Integer), completed_at: T.any(::Stripe::SubscriptionSchedule::ListParams::CompletedAt, Integer), created: T.any(::Stripe::SubscriptionSchedule::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, released_at: T.any(::Stripe::SubscriptionSchedule::ListParams::ReleasedAt, Integer), scheduled: T::Boolean, starting_after: String).void + } + def initialize( + canceled_at: nil, + completed_at: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + released_at: nil, + scheduled: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings) + } + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)) + } + attr_accessor :transfer_data + sig { + params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings::TransferData)).void + } + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData) } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionSchedule::CreateParams::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionSchedule::CreateParams::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(Integer) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings) } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item]) } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::PauseCollection) } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData) } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(Integer) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Phase::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionSchedule::CreateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionSchedule::CreateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Discount]), end_date: Integer, invoice_settings: ::Stripe::SubscriptionSchedule::CreateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionSchedule::CreateParams::Phase::PauseCollection, proration_behavior: String, transfer_data: ::Stripe::SubscriptionSchedule::CreateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: Integer, trial_settings: ::Stripe::SubscriptionSchedule::CreateParams::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # The identifier of the customer to create the subscription schedule for. + sig { returns(String) } + attr_accessor :customer + # Object representing the subscription schedule's default settings. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings) } + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. + sig { returns(String) } + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { returns(T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase]) } + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::SubscriptionSchedule::CreateParams::Prebilling) } + attr_accessor :prebilling + # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + sig { + params(billing_behavior: String, customer: String, default_settings: ::Stripe::SubscriptionSchedule::CreateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], from_subscription: String, metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionSchedule::CreateParams::Phase], prebilling: ::Stripe::SubscriptionSchedule::CreateParams::Prebilling, start_date: T.any(Integer, String)).void + } + def initialize( + billing_behavior: nil, + customer: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + from_subscription: nil, + metadata: nil, + phases: nil, + prebilling: nil, + start_date: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings) + } + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)) + } + attr_accessor :transfer_data + sig { + params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings::TransferData)).void + } + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData) } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings) } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item]) } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::PauseCollection) } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData) } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Phase::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionSchedule::UpdateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::SubscriptionSchedule::UpdateParams::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Object representing the subscription schedule's default settings. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings) } + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + sig { returns(T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase]) } + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::SubscriptionSchedule::UpdateParams::Prebilling) } + attr_accessor :prebilling + # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(billing_behavior: String, default_settings: ::Stripe::SubscriptionSchedule::UpdateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionSchedule::UpdateParams::Phase], prebilling: ::Stripe::SubscriptionSchedule::UpdateParams::Prebilling, proration_behavior: String).void + } + def initialize( + billing_behavior: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + metadata: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class AmendParams < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Add, remove: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Remove, set: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add) } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set) } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Add, remove: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Remove, set: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentEnd) } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentStart) } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::SetPauseCollection) } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Amendment::TrialSettings) } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentEnd, amendment_start: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::DiscountAction], item_actions: T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::SubscriptionSchedule::AmendParams::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class AmendmentStart < Stripe::RequestParams + # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + # Start the prebilled period when a specified amendment begins. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillFrom::AmendmentStart) + } + attr_accessor :amendment_start + # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_from` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_start: ::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillFrom::AmendmentStart, timestamp: Integer, type: String).void + } + def initialize(amendment_start: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The beginning of the prebilled time period. The default value is `now`. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillFrom) } + attr_accessor :bill_from + # The end of the prebilled time period. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillUntil) } + attr_accessor :bill_until + # When the prebilling invoice should be created. The default value is `now`. + sig { returns(String) } + attr_accessor :invoice_at + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { + params(bill_from: ::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillFrom, bill_until: ::Stripe::SubscriptionSchedule::AmendParams::Prebilling::BillUntil, invoice_at: String, update_behavior: String).void + } + def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil); end + end + class ScheduleSettings < Stripe::RequestParams + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + sig { params(end_behavior: String).void } + def initialize(end_behavior: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { returns(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment]) } + attr_accessor :amendments + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Provide any time periods to bill in advance. + sig { returns(T.nilable(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Prebilling])) } + attr_accessor :prebilling + # In cases where the amendment changes the currently active phase, + # specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + # Changes to apply to the subscription schedule. + sig { returns(::Stripe::SubscriptionSchedule::AmendParams::ScheduleSettings) } + attr_accessor :schedule_settings + sig { + params(amendments: T::Array[::Stripe::SubscriptionSchedule::AmendParams::Amendment], expand: T::Array[String], prebilling: T.nilable(T::Array[::Stripe::SubscriptionSchedule::AmendParams::Prebilling]), proration_behavior: String, schedule_settings: ::Stripe::SubscriptionSchedule::AmendParams::ScheduleSettings).void + } + def initialize( + amendments: nil, + expand: nil, + prebilling: nil, + proration_behavior: nil, + schedule_settings: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { params(expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void } + def initialize(expand: nil, invoice_now: nil, prorate: nil); end + end + class ReleaseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Keep any cancellation on the subscription that the schedule has set + sig { returns(T::Boolean) } + attr_accessor :preserve_cancel_date + sig { params(expand: T::Array[String], preserve_cancel_date: T::Boolean).void } + def initialize(expand: nil, preserve_cancel_date: nil); end + end + # Amends an existing subscription schedule. + sig { + params(params: T.any(::Stripe::SubscriptionSchedule::AmendParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def amend(params = {}, opts = {}); end + + # Amends an existing subscription schedule. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::AmendParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def self.amend(schedule, params = {}, opts = {}); end + + # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. + sig { + params(params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def cancel(params = {}, opts = {}); end + + # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def self.cancel(schedule, params = {}, opts = {}); end + + # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. + sig { + params(params: T.any(::Stripe::SubscriptionSchedule::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def self.create(params = {}, opts = {}); end + + # Retrieves the list of your subscription schedules. + sig { + params(params: T.any(::Stripe::SubscriptionSchedule::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. + sig { + params(params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def release(params = {}, opts = {}); end + + # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionSchedule::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def self.release(schedule, params = {}, opts = {}); end + + # Updates an existing subscription schedule. + sig { + params(id: String, params: T.any(::Stripe::SubscriptionSchedule::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/association.rbi b/rbi/stripe/resources/tax/association.rbi index eed008d08..e2638bdd9 100644 --- a/rbi/stripe/resources/tax/association.rbi +++ b/rbi/stripe/resources/tax/association.rbi @@ -11,57 +11,84 @@ module Stripe class Reversal < Stripe::StripeObject class StatusDetails < Stripe::StripeObject class Committed < Stripe::StripeObject + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) sig { returns(String) } attr_reader :transaction end class Errored < Stripe::StripeObject + # Details on why we could not commit the reversal Tax Transaction sig { returns(String) } attr_reader :reason + # The [Refund](https://stripe.com/docs/api/refunds/object) ID that should have created a tax reversal. sig { returns(String) } attr_reader :refund_id end + # Attribute for field committed sig { returns(Committed) } attr_reader :committed + # Attribute for field errored sig { returns(Errored) } attr_reader :errored end + # Status of the attempted Tax Transaction reversal. sig { returns(String) } attr_reader :status + # Attribute for field status_details sig { returns(StatusDetails) } attr_reader :status_details end + # Attempts to create Tax Transaction reversals sig { returns(T::Array[Reversal]) } attr_reader :reversals + # The [Tax Transaction](https://stripe.com/docs/api/tax/transaction/object) sig { returns(String) } attr_reader :transaction end class Errored < Stripe::StripeObject + # Details on why we could not commit the Tax Transaction sig { returns(String) } attr_reader :reason end + # Attribute for field committed sig { returns(Committed) } attr_reader :committed + # Attribute for field errored sig { returns(Errored) } attr_reader :errored end - sig { returns(String) } # The [Tax Calculation](https://stripe.com/docs/api/tax/calculations/object) that was included in PaymentIntent. - attr_reader :calculation sig { returns(String) } + attr_reader :calculation # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) that this Tax Association is tracking. - attr_reader :payment_intent sig { returns(String) } + attr_reader :payment_intent # Status of the Tax Association. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details + class FindParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id + sig { returns(String) } + attr_accessor :payment_intent + sig { params(expand: T::Array[String], payment_intent: String).void } + def initialize(expand: nil, payment_intent: nil); end + end + # Finds a tax association object by PaymentIntent id. + sig { + params(params: T.any(::Stripe::Tax::Association::FindParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Association) + } + def self.find(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/calculation.rbi b/rbi/stripe/resources/tax/calculation.rbi index 04b5f4d2c..b914da81a 100644 --- a/rbi/stripe/resources/tax/calculation.rbi +++ b/rbi/stripe/resources/tax/calculation.rbi @@ -10,177 +10,470 @@ module Stripe class Calculation < APIResource class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(String) } attr_reader :value end + # The customer's postal address (for example, home or business location). sig { returns(T.nilable(Address)) } attr_reader :address + # The type of customer address provided. sig { returns(T.nilable(String)) } attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). sig { returns(T::Array[TaxId]) } attr_reader :tax_ids + # The taxability override used for taxation. sig { returns(String) } attr_reader :taxability_override end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). sig { returns(String) } attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. sig { returns(String) } attr_reader :tax_code end class TaxBreakdown < Stripe::StripeObject class TaxRateDetails < Stripe::StripeObject class FlatAmount < Stripe::StripeObject + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount + # Three-letter ISO currency code, in lowercase. sig { returns(String) } attr_reader :currency end + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. sig { returns(T.nilable(FlatAmount)) } attr_reader :flat_amount + # The tax rate percentage as a string. For example, 8.5% is represented as `"8.5"`. sig { returns(String) } attr_reader :percentage_decimal + # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. sig { returns(T.nilable(String)) } attr_reader :rate_type + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state + # The tax type, such as `vat` or `sales_tax`. sig { returns(T.nilable(String)) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Specifies whether the tax amount is included in the line item amount. sig { returns(T::Boolean) } attr_reader :inclusive + # Attribute for field tax_rate_details sig { returns(TaxRateDetails) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. We might extend the possible values for this field to support new tax rules. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - sig { returns(Integer) } # Total amount after taxes in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount_total - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + sig { returns(T.nilable(String)) } attr_reader :customer - sig { returns(CustomerDetails) } # Attribute for field customer_details + sig { returns(CustomerDetails) } attr_reader :customer_details - sig { returns(T.nilable(Integer)) } # Timestamp of date at which the tax calculation will expire. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(T.nilable(String)) } # Unique identifier for the calculation. + sig { returns(T.nilable(String)) } attr_reader :id - sig { returns(T.nilable(Stripe::ListObject)) } # The list of items the customer is purchasing. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :line_items - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ShipFromDetails)) } # The details of the ship from location, such as the address. + sig { returns(T.nilable(ShipFromDetails)) } attr_reader :ship_from_details - sig { returns(T.nilable(ShippingCost)) } # The shipping cost details for the calculation. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(Integer) } # The amount of tax to be collected on top of the line item prices. - attr_reader :tax_amount_exclusive sig { returns(Integer) } + attr_reader :tax_amount_exclusive # The amount of tax already included in the line item prices. + sig { returns(Integer) } attr_reader :tax_amount_inclusive - sig { returns(T::Array[TaxBreakdown]) } # Breakdown of individual tax amounts that add up to the total. + sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown - sig { returns(Integer) } # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + sig { returns(Integer) } attr_reader :tax_date + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: String, line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's postal address (for example, home or business location). + sig { returns(::Stripe::Tax::Calculation::CreateParams::CustomerDetails::Address) } + attr_accessor :address + # The type of customer address provided. + sig { returns(String) } + attr_accessor :address_source + # The customer's IP address (IPv4 or IPv6). + sig { returns(String) } + attr_accessor :ip_address + # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. + sig { + returns(T::Array[::Stripe::Tax::Calculation::CreateParams::CustomerDetails::TaxId]) + } + attr_accessor :tax_ids + # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. + sig { returns(String) } + attr_accessor :taxability_override + sig { + params(address: ::Stripe::Tax::Calculation::CreateParams::CustomerDetails::Address, address_source: String, ip_address: String, tax_ids: T::Array[::Stripe::Tax::Calculation::CreateParams::CustomerDetails::TaxId], taxability_override: String).void + } + def initialize( + address: nil, + address_source: nil, + ip_address: nil, + tax_ids: nil, + taxability_override: nil + ); end + end + class LineItem < Stripe::RequestParams + # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + sig { returns(Integer) } + attr_accessor :amount + # If provided, the product's `tax_code` will be used as the line item's `tax_code`. + sig { returns(String) } + attr_accessor :product + # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. + sig { returns(Integer) } + attr_accessor :quantity + # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). + sig { returns(String) } + attr_accessor :reference + # Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(amount: Integer, product: String, quantity: Integer, reference: String, tax_behavior: String, tax_code: String).void + } + def initialize( + amount: nil, + product: nil, + quantity: nil, + reference: nil, + tax_behavior: nil, + tax_code: nil + ); end + end + class ShipFromDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: String, line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The address from which the goods are being shipped from. + sig { returns(::Stripe::Tax::Calculation::CreateParams::ShipFromDetails::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Tax::Calculation::CreateParams::ShipFromDetails::Address).void + } + def initialize(address: nil); end + end + class ShippingCost < Stripe::RequestParams + # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + sig { returns(Integer) } + attr_accessor :amount + # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. + sig { returns(String) } + attr_accessor :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + sig { returns(String) } + attr_accessor :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(amount: Integer, shipping_rate: String, tax_behavior: String, tax_code: String).void + } + def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. + sig { returns(String) } + attr_accessor :customer + # Details about the customer, including address and tax IDs. + sig { returns(::Stripe::Tax::Calculation::CreateParams::CustomerDetails) } + attr_accessor :customer_details + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A list of items the customer is purchasing. + sig { returns(T::Array[::Stripe::Tax::Calculation::CreateParams::LineItem]) } + attr_accessor :line_items + # Details about the address from which the goods are being shipped. + sig { returns(::Stripe::Tax::Calculation::CreateParams::ShipFromDetails) } + attr_accessor :ship_from_details + # Shipping cost details to be used for the calculation. + sig { returns(::Stripe::Tax::Calculation::CreateParams::ShippingCost) } + attr_accessor :shipping_cost + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + sig { returns(Integer) } + attr_accessor :tax_date + sig { + params(currency: String, customer: String, customer_details: ::Stripe::Tax::Calculation::CreateParams::CustomerDetails, expand: T::Array[String], line_items: T::Array[::Stripe::Tax::Calculation::CreateParams::LineItem], ship_from_details: ::Stripe::Tax::Calculation::CreateParams::ShipFromDetails, shipping_cost: ::Stripe::Tax::Calculation::CreateParams::ShippingCost, tax_date: Integer).void + } + def initialize( + currency: nil, + customer: nil, + customer_details: nil, + expand: nil, + line_items: nil, + ship_from_details: nil, + shipping_cost: nil, + tax_date: nil + ); end + end + # Calculates tax based on the input and returns a Tax Calculation object. + sig { + params(params: T.any(::Stripe::Tax::Calculation::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Calculation) + } + def self.create(params = {}, opts = {}); end + + # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. + sig { + params(params: T.any(::Stripe::Tax::Calculation::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_line_items(params = {}, opts = {}); end + + # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. + sig { + params(calculation: String, params: T.any(::Stripe::Tax::Calculation::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_line_items(calculation, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/calculation_line_item.rbi b/rbi/stripe/resources/tax/calculation_line_item.rbi index 7503a62bd..a73b968fa 100644 --- a/rbi/stripe/resources/tax/calculation_line_item.rbi +++ b/rbi/stripe/resources/tax/calculation_line_item.rbi @@ -7,68 +7,81 @@ module Stripe class CalculationLineItem < APIResource class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end - sig { returns(Integer) } # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount_tax - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + sig { returns(T.nilable(String)) } attr_reader :product - sig { returns(Integer) } # The number of units of the item being purchased. For reversals, this is the quantity reversed. + sig { returns(Integer) } attr_reader :quantity - sig { returns(T.nilable(String)) } # A custom identifier for this line item. + sig { returns(T.nilable(String)) } attr_reader :reference - sig { returns(String) } # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. + sig { returns(String) } attr_reader :tax_behavior - sig { returns(T.nilable(T::Array[TaxBreakdown])) } # Detailed account of taxes relevant to this line item. + sig { returns(T.nilable(T::Array[TaxBreakdown])) } attr_reader :tax_breakdown - sig { returns(String) } # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. + sig { returns(String) } attr_reader :tax_code end end diff --git a/rbi/stripe/resources/tax/form.rbi b/rbi/stripe/resources/tax/form.rbi index 50eb235f4..2ca08f886 100644 --- a/rbi/stripe/resources/tax/form.rbi +++ b/rbi/stripe/resources/tax/form.rbi @@ -9,119 +9,216 @@ module Stripe # Related guide: [US tax reporting for Connect platforms](https://stripe.com/docs/connect/tax-reporting) class Form < APIResource class AuSerr < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class CaMrdp < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class EuDac7 < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class FilingStatus < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). Always `US`. sig { returns(String) } attr_reader :country + # Indicates the level of the jurisdiction where the form was filed. sig { returns(String) } attr_reader :level + # [ISO 3166-2 U.S. state code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix, if any. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end + # Time when the filing status was updated. sig { returns(Integer) } attr_reader :effective_at + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # The current status of the filed form. sig { returns(String) } attr_reader :value end class GbMrdp < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class NzMrdp < Stripe::StripeObject + # End date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_end_date + # Start date of the period represented by the information reported on the tax form. sig { returns(String) } attr_reader :reporting_period_start_date end class Payee < Stripe::StripeObject + # The ID of the payee's Stripe account. sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :account + # The external reference to this payee. sig { returns(T.nilable(String)) } attr_reader :external_reference + # Either `account` or `external_reference`. sig { returns(String) } attr_reader :type end class Us1099K < Stripe::StripeObject + # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end class Us1099Misc < Stripe::StripeObject + # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end class Us1099Nec < Stripe::StripeObject + # Year represented by the information reported on the tax form. sig { returns(Integer) } attr_reader :reporting_year end - sig { returns(AuSerr) } # Attribute for field au_serr + sig { returns(AuSerr) } attr_reader :au_serr - sig { returns(CaMrdp) } # Attribute for field ca_mrdp + sig { returns(CaMrdp) } attr_reader :ca_mrdp - sig { returns(T.nilable(T.any(String, Stripe::Tax::Form))) } # The form that corrects this form, if any. + sig { returns(T.nilable(T.any(String, Stripe::Tax::Form))) } attr_reader :corrected_by - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(EuDac7) } # Attribute for field eu_dac7 + sig { returns(EuDac7) } attr_reader :eu_dac7 - sig { returns(T::Array[FilingStatus]) } # A list of tax filing statuses. Note that a filing status will only be included if the form has been filed directly with the jurisdiction’s tax authority. + sig { returns(T::Array[FilingStatus]) } attr_reader :filing_statuses - sig { returns(GbMrdp) } # Attribute for field gb_mrdp + sig { returns(GbMrdp) } attr_reader :gb_mrdp - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(NzMrdp) } # Attribute for field nz_mrdp + sig { returns(NzMrdp) } attr_reader :nz_mrdp - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Payee) } # Attribute for field payee + sig { returns(Payee) } attr_reader :payee - sig { returns(String) } # The type of the tax form. An additional hash is included on the tax form with a name matching this value. It contains additional information specific to the tax form type. + sig { returns(String) } attr_reader :type - sig { returns(Us1099K) } # Attribute for field us_1099_k + sig { returns(Us1099K) } attr_reader :us_1099_k - sig { returns(Us1099Misc) } # Attribute for field us_1099_misc + sig { returns(Us1099Misc) } attr_reader :us_1099_misc - sig { returns(Us1099Nec) } # Attribute for field us_1099_nec + sig { returns(Us1099Nec) } attr_reader :us_1099_nec + class ListParams < Stripe::RequestParams + class Payee < Stripe::RequestParams + # The ID of the Stripe account whose forms will be retrieved. + sig { returns(String) } + attr_accessor :account + # The external reference to the payee whose forms will be retrieved. + sig { returns(String) } + attr_accessor :external_reference + # Specifies the payee type. Either `account` or `external_reference`. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, external_reference: String, type: String).void } + def initialize(account: nil, external_reference: nil, type: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The payee whose volume is represented on the tax form. + sig { returns(::Stripe::Tax::Form::ListParams::Payee) } + attr_accessor :payee + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. + sig { returns(String) } + attr_accessor :type + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, payee: ::Stripe::Tax::Form::ListParams::Payee, starting_after: String, type: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + payee: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. + sig { + params(params: T.any(::Stripe::Tax::Form::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Download the PDF for a tax form. + sig { + params(params: T.any(::Stripe::Tax::Form::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped) + } + def pdf(params = {}, opts = {}, &read_body_chunk_block); end + + # Download the PDF for a tax form. + sig { + params(id: String, params: T.any(::Stripe::Tax::Form::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped) + } + def self.pdf(id, params = {}, opts = {}, &read_body_chunk_block); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/registration.rbi b/rbi/stripe/resources/tax/registration.rbi index 71290cf95..54fc51c6f 100644 --- a/rbi/stripe/resources/tax/registration.rbi +++ b/rbi/stripe/resources/tax/registration.rbi @@ -12,617 +12,2028 @@ module Stripe class Registration < APIResource class CountryOptions < Stripe::StripeObject class Ae < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class At < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Au < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Be < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Bg < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Bh < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class By < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ca < Stripe::StripeObject class ProvinceStandard < Stripe::StripeObject + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). sig { returns(String) } attr_reader :province end + # Attribute for field province_standard sig { returns(ProvinceStandard) } attr_reader :province_standard + # Type of registration in Canada. sig { returns(String) } attr_reader :type end class Ch < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cl < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Co < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cr < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Cy < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Cz < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class De < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Dk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ec < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ee < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Eg < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Es < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Fi < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Fr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Gb < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ge < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Gr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Hr < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Hu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Id < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ie < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Is < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class It < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Jp < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ke < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Kr < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Kz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Lt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Lu < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Lv < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ma < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Md < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Mt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Mx < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class My < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ng < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Nl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class No < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Nz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Om < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Pl < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Pt < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Ro < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Rs < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Ru < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Sa < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Se < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Sg < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Si < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Sk < Stripe::StripeObject class Standard < Stripe::StripeObject + # Place of supply scheme used in an EU standard registration. sig { returns(String) } attr_reader :place_of_supply_scheme end + # Attribute for field standard sig { returns(Standard) } attr_reader :standard + # Type of registration in an EU country. sig { returns(String) } attr_reader :type end class Th < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Tr < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Tz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Us < Stripe::StripeObject class LocalAmusementTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction end class LocalLeaseTax < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction end class StateSalesTax < Stripe::StripeObject class Election < Stripe::StripeObject + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. sig { returns(String) } attr_reader :jurisdiction + # The type of the election for the state sales tax registration. sig { returns(String) } attr_reader :type end + # Elections for the state sales tax registration. sig { returns(T::Array[Election]) } attr_reader :elections end + # Attribute for field local_amusement_tax sig { returns(LocalAmusementTax) } attr_reader :local_amusement_tax + # Attribute for field local_lease_tax sig { returns(LocalLeaseTax) } attr_reader :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). sig { returns(String) } attr_reader :state + # Attribute for field state_sales_tax sig { returns(StateSalesTax) } attr_reader :state_sales_tax + # Type of registration in the US. sig { returns(String) } attr_reader :type end class Uz < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Vn < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end class Za < Stripe::StripeObject + # Type of registration in `country`. sig { returns(String) } attr_reader :type end + # Attribute for field ae sig { returns(Ae) } attr_reader :ae + # Attribute for field at sig { returns(At) } attr_reader :at + # Attribute for field au sig { returns(Au) } attr_reader :au + # Attribute for field be sig { returns(Be) } attr_reader :be + # Attribute for field bg sig { returns(Bg) } attr_reader :bg + # Attribute for field bh sig { returns(Bh) } attr_reader :bh + # Attribute for field by sig { returns(By) } attr_reader :by + # Attribute for field ca sig { returns(Ca) } attr_reader :ca + # Attribute for field ch sig { returns(Ch) } attr_reader :ch + # Attribute for field cl sig { returns(Cl) } attr_reader :cl + # Attribute for field co sig { returns(Co) } attr_reader :co + # Attribute for field cr sig { returns(Cr) } attr_reader :cr + # Attribute for field cy sig { returns(Cy) } attr_reader :cy + # Attribute for field cz sig { returns(Cz) } attr_reader :cz + # Attribute for field de sig { returns(De) } attr_reader :de + # Attribute for field dk sig { returns(Dk) } attr_reader :dk + # Attribute for field ec sig { returns(Ec) } attr_reader :ec + # Attribute for field ee sig { returns(Ee) } attr_reader :ee + # Attribute for field eg sig { returns(Eg) } attr_reader :eg + # Attribute for field es sig { returns(Es) } attr_reader :es + # Attribute for field fi sig { returns(Fi) } attr_reader :fi + # Attribute for field fr sig { returns(Fr) } attr_reader :fr + # Attribute for field gb sig { returns(Gb) } attr_reader :gb + # Attribute for field ge sig { returns(Ge) } attr_reader :ge + # Attribute for field gr sig { returns(Gr) } attr_reader :gr + # Attribute for field hr sig { returns(Hr) } attr_reader :hr + # Attribute for field hu sig { returns(Hu) } attr_reader :hu + # Attribute for field id sig { returns(Id) } attr_reader :id + # Attribute for field ie sig { returns(Ie) } attr_reader :ie + # Attribute for field is sig { returns(Is) } attr_reader :is + # Attribute for field it sig { returns(It) } attr_reader :it + # Attribute for field jp sig { returns(Jp) } attr_reader :jp + # Attribute for field ke sig { returns(Ke) } attr_reader :ke + # Attribute for field kr sig { returns(Kr) } attr_reader :kr + # Attribute for field kz sig { returns(Kz) } attr_reader :kz + # Attribute for field lt sig { returns(Lt) } attr_reader :lt + # Attribute for field lu sig { returns(Lu) } attr_reader :lu + # Attribute for field lv sig { returns(Lv) } attr_reader :lv + # Attribute for field ma sig { returns(Ma) } attr_reader :ma + # Attribute for field md sig { returns(Md) } attr_reader :md + # Attribute for field mt sig { returns(Mt) } attr_reader :mt + # Attribute for field mx sig { returns(Mx) } attr_reader :mx + # Attribute for field my sig { returns(My) } attr_reader :my + # Attribute for field ng sig { returns(Ng) } attr_reader :ng + # Attribute for field nl sig { returns(Nl) } attr_reader :nl + # Attribute for field no sig { returns(No) } attr_reader :no + # Attribute for field nz sig { returns(Nz) } attr_reader :nz + # Attribute for field om sig { returns(Om) } attr_reader :om + # Attribute for field pl sig { returns(Pl) } attr_reader :pl + # Attribute for field pt sig { returns(Pt) } attr_reader :pt + # Attribute for field ro sig { returns(Ro) } attr_reader :ro + # Attribute for field rs sig { returns(Rs) } attr_reader :rs + # Attribute for field ru sig { returns(Ru) } attr_reader :ru + # Attribute for field sa sig { returns(Sa) } attr_reader :sa + # Attribute for field se sig { returns(Se) } attr_reader :se + # Attribute for field sg sig { returns(Sg) } attr_reader :sg + # Attribute for field si sig { returns(Si) } attr_reader :si + # Attribute for field sk sig { returns(Sk) } attr_reader :sk + # Attribute for field th sig { returns(Th) } attr_reader :th + # Attribute for field tr sig { returns(Tr) } attr_reader :tr + # Attribute for field tz sig { returns(Tz) } attr_reader :tz + # Attribute for field us sig { returns(Us) } attr_reader :us + # Attribute for field uz sig { returns(Uz) } attr_reader :uz + # Attribute for field vn sig { returns(Vn) } attr_reader :vn + # Attribute for field za sig { returns(Za) } attr_reader :za end - sig { returns(Integer) } # Time at which the registration becomes active. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :active_from - sig { returns(String) } # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } attr_reader :country - sig { returns(CountryOptions) } # Attribute for field country_options + sig { returns(CountryOptions) } attr_reader :country_options - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(Integer)) } # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. Measured in seconds since the Unix epoch. + sig { returns(T.nilable(Integer)) } attr_reader :expires_at - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The status of the registration. This field is present for convenience and can be deduced from `active_from` and `expires_at`. + sig { returns(String) } attr_reader :status + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the Tax Registration. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CountryOptions < Stripe::RequestParams + class Ae < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class At < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::At::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::At::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Au < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Be < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Be::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Bg < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Bh < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class By < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ca < Stripe::RequestParams + class ProvinceStandard < Stripe::RequestParams + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + sig { returns(String) } + attr_accessor :province + sig { params(province: String).void } + def initialize(province: nil); end + end + # Options for the provincial tax registration. + sig { + returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca::ProvinceStandard) + } + attr_accessor :province_standard + # Type of registration to be created in Canada. + sig { returns(String) } + attr_accessor :type + sig { + params(province_standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca::ProvinceStandard, type: String).void + } + def initialize(province_standard: nil, type: nil); end + end + class Ch < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Cl < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Co < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Cr < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Cy < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Cz < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class De < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::De::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::De::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Dk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Ec < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ee < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Eg < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Es < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Es::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Fi < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Fr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Gb < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ge < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Gr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Hr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Hu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Id < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ie < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Is < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class It < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::It::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::It::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Jp < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ke < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Kr < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Kz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Lt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Lu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Lv < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Ma < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Md < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Mt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Mx < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class My < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ng < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Nl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class No < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Nz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Om < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Pl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Pt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Ro < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Rs < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ru < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Sa < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Se < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Se::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Sg < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Si < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Si::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Sk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk::Standard) } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Th < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Tr < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Tz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Us < Stripe::RequestParams + class LocalAmusementTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). + sig { returns(String) } + attr_accessor :jurisdiction + sig { params(jurisdiction: String).void } + def initialize(jurisdiction: nil); end + end + class LocalLeaseTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). + sig { returns(String) } + attr_accessor :jurisdiction + sig { params(jurisdiction: String).void } + def initialize(jurisdiction: nil); end + end + class StateSalesTax < Stripe::RequestParams + class Election < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + sig { returns(String) } + attr_accessor :jurisdiction + # The type of the election for the state sales tax registration. + sig { returns(String) } + attr_accessor :type + sig { params(jurisdiction: String, type: String).void } + def initialize(jurisdiction: nil, type: nil); end + end + # Elections for the state sales tax registration. + sig { + returns(T::Array[::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax::Election]) + } + attr_accessor :elections + sig { + params(elections: T::Array[::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax::Election]).void + } + def initialize(elections: nil); end + end + # Options for the local amusement tax registration. + sig { + returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalAmusementTax) + } + attr_accessor :local_amusement_tax + # Options for the local lease tax registration. + sig { + returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalLeaseTax) + } + attr_accessor :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + sig { returns(String) } + attr_accessor :state + # Options for the state sales tax registration. + sig { + returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax) + } + attr_accessor :state_sales_tax + # Type of registration to be created in the US. + sig { returns(String) } + attr_accessor :type + sig { + params(local_amusement_tax: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalAmusementTax, local_lease_tax: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::LocalLeaseTax, state: String, state_sales_tax: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Us::StateSalesTax, type: String).void + } + def initialize( + local_amusement_tax: nil, + local_lease_tax: nil, + state: nil, + state_sales_tax: nil, + type: nil + ); end + end + class Uz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Vn < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Za < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # Options for the registration in AE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae) } + attr_accessor :ae + # Options for the registration in AT. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::At) } + attr_accessor :at + # Options for the registration in AU. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Au) } + attr_accessor :au + # Options for the registration in BE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Be) } + attr_accessor :be + # Options for the registration in BG. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg) } + attr_accessor :bg + # Options for the registration in BH. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh) } + attr_accessor :bh + # Options for the registration in BY. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::By) } + attr_accessor :by + # Options for the registration in CA. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca) } + attr_accessor :ca + # Options for the registration in CH. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch) } + attr_accessor :ch + # Options for the registration in CL. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl) } + attr_accessor :cl + # Options for the registration in CO. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Co) } + attr_accessor :co + # Options for the registration in CR. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr) } + attr_accessor :cr + # Options for the registration in CY. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy) } + attr_accessor :cy + # Options for the registration in CZ. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz) } + attr_accessor :cz + # Options for the registration in DE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::De) } + attr_accessor :de + # Options for the registration in DK. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk) } + attr_accessor :dk + # Options for the registration in EC. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec) } + attr_accessor :ec + # Options for the registration in EE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee) } + attr_accessor :ee + # Options for the registration in EG. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg) } + attr_accessor :eg + # Options for the registration in ES. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Es) } + attr_accessor :es + # Options for the registration in FI. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi) } + attr_accessor :fi + # Options for the registration in FR. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr) } + attr_accessor :fr + # Options for the registration in GB. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb) } + attr_accessor :gb + # Options for the registration in GE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge) } + attr_accessor :ge + # Options for the registration in GR. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr) } + attr_accessor :gr + # Options for the registration in HR. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr) } + attr_accessor :hr + # Options for the registration in HU. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu) } + attr_accessor :hu + # Options for the registration in ID. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Id) } + attr_accessor :id + # Options for the registration in IE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie) } + attr_accessor :ie + # Options for the registration in IS. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Is) } + attr_accessor :is + # Options for the registration in IT. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::It) } + attr_accessor :it + # Options for the registration in JP. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp) } + attr_accessor :jp + # Options for the registration in KE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke) } + attr_accessor :ke + # Options for the registration in KR. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr) } + attr_accessor :kr + # Options for the registration in KZ. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz) } + attr_accessor :kz + # Options for the registration in LT. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt) } + attr_accessor :lt + # Options for the registration in LU. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu) } + attr_accessor :lu + # Options for the registration in LV. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv) } + attr_accessor :lv + # Options for the registration in MA. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma) } + attr_accessor :ma + # Options for the registration in MD. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Md) } + attr_accessor :md + # Options for the registration in MT. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt) } + attr_accessor :mt + # Options for the registration in MX. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx) } + attr_accessor :mx + # Options for the registration in MY. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::My) } + attr_accessor :my + # Options for the registration in NG. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng) } + attr_accessor :ng + # Options for the registration in NL. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl) } + attr_accessor :nl + # Options for the registration in NO. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::No) } + attr_accessor :no + # Options for the registration in NZ. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz) } + attr_accessor :nz + # Options for the registration in OM. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Om) } + attr_accessor :om + # Options for the registration in PL. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl) } + attr_accessor :pl + # Options for the registration in PT. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt) } + attr_accessor :pt + # Options for the registration in RO. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro) } + attr_accessor :ro + # Options for the registration in RS. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs) } + attr_accessor :rs + # Options for the registration in RU. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru) } + attr_accessor :ru + # Options for the registration in SA. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa) } + attr_accessor :sa + # Options for the registration in SE. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Se) } + attr_accessor :se + # Options for the registration in SG. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg) } + attr_accessor :sg + # Options for the registration in SI. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Si) } + attr_accessor :si + # Options for the registration in SK. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk) } + attr_accessor :sk + # Options for the registration in TH. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Th) } + attr_accessor :th + # Options for the registration in TR. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr) } + attr_accessor :tr + # Options for the registration in TZ. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz) } + attr_accessor :tz + # Options for the registration in US. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Us) } + attr_accessor :us + # Options for the registration in UZ. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz) } + attr_accessor :uz + # Options for the registration in VN. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn) } + attr_accessor :vn + # Options for the registration in ZA. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions::Za) } + attr_accessor :za + sig { + params(ae: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ae, at: ::Stripe::Tax::Registration::CreateParams::CountryOptions::At, au: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Au, be: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Be, bg: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Bg, bh: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Bh, by: ::Stripe::Tax::Registration::CreateParams::CountryOptions::By, ca: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ca, ch: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ch, cl: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Cl, co: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Co, cr: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Cr, cy: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Cy, cz: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Cz, de: ::Stripe::Tax::Registration::CreateParams::CountryOptions::De, dk: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Dk, ec: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ec, ee: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ee, eg: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Eg, es: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Es, fi: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Fi, fr: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Fr, gb: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Gb, ge: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ge, gr: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Gr, hr: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Hr, hu: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Hu, id: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Id, ie: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ie, is: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Is, it: ::Stripe::Tax::Registration::CreateParams::CountryOptions::It, jp: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Jp, ke: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ke, kr: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Kr, kz: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Kz, lt: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Lt, lu: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Lu, lv: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Lv, ma: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ma, md: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Md, mt: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Mt, mx: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Mx, my: ::Stripe::Tax::Registration::CreateParams::CountryOptions::My, ng: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ng, nl: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Nl, no: ::Stripe::Tax::Registration::CreateParams::CountryOptions::No, nz: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Nz, om: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Om, pl: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Pl, pt: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Pt, ro: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ro, rs: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Rs, ru: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Ru, sa: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Sa, se: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Se, sg: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Sg, si: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Si, sk: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Sk, th: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Th, tr: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Tr, tz: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Tz, us: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Us, uz: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Uz, vn: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Vn, za: ::Stripe::Tax::Registration::CreateParams::CountryOptions::Za).void + } + def initialize( + ae: nil, + at: nil, + au: nil, + be: nil, + bg: nil, + bh: nil, + by: nil, + ca: nil, + ch: nil, + cl: nil, + co: nil, + cr: nil, + cy: nil, + cz: nil, + de: nil, + dk: nil, + ec: nil, + ee: nil, + eg: nil, + es: nil, + fi: nil, + fr: nil, + gb: nil, + ge: nil, + gr: nil, + hr: nil, + hu: nil, + id: nil, + ie: nil, + is: nil, + it: nil, + jp: nil, + ke: nil, + kr: nil, + kz: nil, + lt: nil, + lu: nil, + lv: nil, + ma: nil, + md: nil, + mt: nil, + mx: nil, + my: nil, + ng: nil, + nl: nil, + no: nil, + nz: nil, + om: nil, + pl: nil, + pt: nil, + ro: nil, + rs: nil, + ru: nil, + sa: nil, + se: nil, + sg: nil, + si: nil, + sk: nil, + th: nil, + tr: nil, + tz: nil, + us: nil, + uz: nil, + vn: nil, + za: nil + ); end + end + # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. + sig { returns(T.any(String, Integer)) } + attr_accessor :active_from + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Specific options for a registration in the specified `country`. + sig { returns(::Stripe::Tax::Registration::CreateParams::CountryOptions) } + attr_accessor :country_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :expires_at + sig { + params(active_from: T.any(String, Integer), country: String, country_options: ::Stripe::Tax::Registration::CreateParams::CountryOptions, expand: T::Array[String], expires_at: Integer).void + } + def initialize( + active_from: nil, + country: nil, + country_options: nil, + expand: nil, + expires_at: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + sig { returns(T.any(String, Integer)) } + attr_accessor :active_from + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :expires_at + sig { + params(active_from: T.any(String, Integer), expand: T::Array[String], expires_at: T.nilable(T.any(String, Integer))).void + } + def initialize(active_from: nil, expand: nil, expires_at: nil); end + end + # Creates a new Tax Registration object. + sig { + params(params: T.any(::Stripe::Tax::Registration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of Tax Registration objects. + sig { + params(params: T.any(::Stripe::Tax::Registration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates an existing Tax Registration object. + # + # A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at. + sig { + params(id: String, params: T.any(::Stripe::Tax::Registration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/settings.rbi b/rbi/stripe/resources/tax/settings.rbi index 33751bfb4..6e803aec5 100644 --- a/rbi/stripe/resources/tax/settings.rbi +++ b/rbi/stripe/resources/tax/settings.rbi @@ -9,58 +9,140 @@ module Stripe # Related guide: [Using the Settings API](https://stripe.com/docs/tax/settings-api) class Settings < SingletonAPIResource class Defaults < Stripe::StripeObject + # Default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) used to specify whether the price is considered inclusive of taxes or exclusive of taxes. If the item's price has a tax behavior set, it will take precedence over the default tax behavior. sig { returns(T.nilable(String)) } attr_reader :tax_behavior + # Default [tax code](https://stripe.com/docs/tax/tax-categories) used to classify your products and prices. sig { returns(T.nilable(String)) } attr_reader :tax_code end class HeadOffice < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class StatusDetails < Stripe::StripeObject class Active < Stripe::StripeObject; end class Pending < Stripe::StripeObject + # The list of missing fields that are required to perform calculations. It includes the entry `head_office` when the status is `pending`. It is recommended to set the optional values even if they aren't listed as required for calculating taxes. Calculations can fail if missing fields aren't explicitly provided on every call. sig { returns(T.nilable(T::Array[String])) } attr_reader :missing_fields end + # Attribute for field active sig { returns(Active) } attr_reader :active + # Attribute for field pending sig { returns(Pending) } attr_reader :pending end - sig { returns(Defaults) } # Attribute for field defaults + sig { returns(Defaults) } attr_reader :defaults - sig { returns(T.nilable(HeadOffice)) } # The place where your business is located. + sig { returns(T.nilable(HeadOffice)) } attr_reader :head_office - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The status of the Tax `Settings`. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Defaults < Stripe::RequestParams + # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { params(tax_behavior: String, tax_code: String).void } + def initialize(tax_behavior: nil, tax_code: nil); end + end + class HeadOffice < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The location of the business for tax purposes. + sig { returns(::Stripe::Tax::Settings::UpdateParams::HeadOffice::Address) } + attr_accessor :address + sig { params(address: ::Stripe::Tax::Settings::UpdateParams::HeadOffice::Address).void } + def initialize(address: nil); end + end + # Default configuration to be used on Stripe Tax calculations. + sig { returns(::Stripe::Tax::Settings::UpdateParams::Defaults) } + attr_accessor :defaults + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The place where your business is located. + sig { returns(::Stripe::Tax::Settings::UpdateParams::HeadOffice) } + attr_accessor :head_office + sig { + params(defaults: ::Stripe::Tax::Settings::UpdateParams::Defaults, expand: T::Array[String], head_office: ::Stripe::Tax::Settings::UpdateParams::HeadOffice).void + } + def initialize(defaults: nil, expand: nil, head_office: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/transaction.rbi b/rbi/stripe/resources/tax/transaction.rbi index 1000305d7..7770b8dfd 100644 --- a/rbi/stripe/resources/tax/transaction.rbi +++ b/rbi/stripe/resources/tax/transaction.rbi @@ -10,152 +10,347 @@ module Stripe class Transaction < APIResource class CustomerDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end class TaxId < Stripe::StripeObject + # The type of the tax ID, one of `ad_nrt`, `ar_cuit`, `eu_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `cn_tin`, `co_nit`, `cr_tin`, `do_rcn`, `ec_ruc`, `eu_oss_vat`, `hr_oib`, `pe_ruc`, `ro_tin`, `rs_pib`, `sv_nit`, `uy_ruc`, `ve_rif`, `vn_tin`, `gb_vat`, `nz_gst`, `au_abn`, `au_arn`, `in_gst`, `no_vat`, `no_voec`, `za_vat`, `ch_vat`, `mx_rfc`, `sg_uen`, `ru_inn`, `ru_kpp`, `ca_bn`, `hk_br`, `es_cif`, `tw_vat`, `th_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `li_uid`, `li_vat`, `my_itn`, `us_ein`, `kr_brn`, `ca_qst`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `my_sst`, `sg_gst`, `ae_trn`, `cl_tin`, `sa_vat`, `id_npwp`, `my_frp`, `il_vat`, `ge_vat`, `ua_vat`, `is_vat`, `bg_uic`, `hu_tin`, `si_tin`, `ke_pin`, `tr_tin`, `eg_tin`, `ph_tin`, `bh_vat`, `kz_bin`, `ng_tin`, `om_vat`, `de_stn`, `ch_uid`, `tz_vat`, `uz_vat`, `uz_tin`, `md_vat`, `ma_vat`, `by_tin`, `ao_tin`, `bs_tin`, `bb_tin`, `cd_nif`, `mr_nif`, `me_pib`, `zw_tin`, `ba_tin`, `gn_nif`, `mk_vat`, `sr_fin`, `sn_ninea`, `am_tin`, `np_pan`, `tj_tin`, `ug_tin`, `zm_tin`, `kh_tin`, or `unknown` sig { returns(String) } attr_reader :type + # The value of the tax ID. sig { returns(String) } attr_reader :value end + # The customer's postal address (for example, home or business location). sig { returns(T.nilable(Address)) } attr_reader :address + # The type of customer address provided. sig { returns(T.nilable(String)) } attr_reader :address_source + # The customer's IP address (IPv4 or IPv6). sig { returns(T.nilable(String)) } attr_reader :ip_address + # The customer's tax IDs (for example, EU VAT numbers). sig { returns(T::Array[TaxId]) } attr_reader :tax_ids + # The taxability override used for taxation. sig { returns(String) } attr_reader :taxability_override end class Reversal < Stripe::StripeObject + # The `id` of the reversed `Transaction` object. sig { returns(T.nilable(String)) } attr_reader :original_transaction end class ShipFromDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address end class ShippingCost < Stripe::StripeObject class TaxBreakdown < Stripe::StripeObject class Jurisdiction < Stripe::StripeObject + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(String) } attr_reader :country + # A human-readable name for the jurisdiction imposing the tax. sig { returns(String) } attr_reader :display_name + # Indicates the level of the jurisdiction imposing the tax. sig { returns(String) } attr_reader :level + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. sig { returns(T.nilable(String)) } attr_reader :state end class TaxRateDetails < Stripe::StripeObject + # A localized display name for tax type, intended to be human-readable. For example, "Local Sales and Use Tax", "Value-added tax (VAT)", or "Umsatzsteuer (USt.)". sig { returns(String) } attr_reader :display_name + # The tax rate percentage as a string. For example, 8.5% is represented as "8.5". sig { returns(String) } attr_reader :percentage_decimal + # The tax type, such as `vat` or `sales_tax`. sig { returns(String) } attr_reader :tax_type end + # The amount of tax, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Attribute for field jurisdiction sig { returns(Jurisdiction) } attr_reader :jurisdiction + # Indicates whether the jurisdiction was determined by the origin (merchant's address) or destination (customer's address). sig { returns(String) } attr_reader :sourcing + # Details regarding the rate for this tax. This field will be `null` when the tax is not imposed, for example if the product is exempt from tax. sig { returns(T.nilable(TaxRateDetails)) } attr_reader :tax_rate_details + # The reasoning behind this tax, for example, if the product is tax exempt. The possible values for this field may be extended as new tax rules are supported. sig { returns(String) } attr_reader :taxability_reason + # The amount on which tax is calculated, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :taxable_amount end + # The shipping amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. sig { returns(Integer) } attr_reader :amount + # The amount of tax calculated for shipping, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount_tax + # The ID of an existing [ShippingRate](https://stripe.com/docs/api/shipping_rates/object). sig { returns(String) } attr_reader :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. sig { returns(String) } attr_reader :tax_behavior + # Detailed account of taxes relevant to shipping cost. (It is not populated for the transaction resource object and will be removed in the next API version.) sig { returns(T::Array[TaxBreakdown]) } attr_reader :tax_breakdown + # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for shipping. sig { returns(String) } attr_reader :tax_code end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # The ID of an existing [Customer](https://stripe.com/docs/api/customers/object) used for the resource. + sig { returns(T.nilable(String)) } attr_reader :customer - sig { returns(CustomerDetails) } # Attribute for field customer_details + sig { returns(CustomerDetails) } attr_reader :customer_details - sig { returns(String) } # Unique identifier for the transaction. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(Stripe::ListObject)) } # The tax collected or refunded, by line item. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :line_items - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # The Unix timestamp representing when the tax liability is assumed or reduced. + sig { returns(Integer) } attr_reader :posted_at - sig { returns(String) } # A custom unique identifier, such as 'myOrder_123'. + sig { returns(String) } attr_reader :reference - sig { returns(T.nilable(Reversal)) } # If `type=reversal`, contains information about what was reversed. + sig { returns(T.nilable(Reversal)) } attr_reader :reversal - sig { returns(T.nilable(ShipFromDetails)) } # The details of the ship from location, such as the address. + sig { returns(T.nilable(ShipFromDetails)) } attr_reader :ship_from_details - sig { returns(T.nilable(ShippingCost)) } # The shipping cost details for the transaction. + sig { returns(T.nilable(ShippingCost)) } attr_reader :shipping_cost - sig { returns(Integer) } # Timestamp of date at which the tax rules and rates in effect applies for the calculation. + sig { returns(Integer) } attr_reader :tax_date - sig { returns(String) } # If `reversal`, this transaction reverses an earlier transaction. + sig { returns(String) } attr_reader :type + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListLineItemsParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateFromCalculationParams < Stripe::RequestParams + # Tax Calculation ID to be used as input when creating the transaction. + sig { returns(String) } + attr_accessor :calculation + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. + sig { returns(Integer) } + attr_accessor :posted_at + # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. + sig { returns(String) } + attr_accessor :reference + sig { + params(calculation: String, expand: T::Array[String], metadata: T::Hash[String, String], posted_at: Integer, reference: String).void + } + def initialize( + calculation: nil, + expand: nil, + metadata: nil, + posted_at: nil, + reference: nil + ); end + end + class CreateReversalParams < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount_tax + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The `id` of the line item to reverse in the original transaction. + sig { returns(String) } + attr_accessor :original_line_item + # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. + sig { returns(Integer) } + attr_accessor :quantity + # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. + sig { returns(String) } + attr_accessor :reference + sig { + params(amount: Integer, amount_tax: Integer, metadata: T::Hash[String, String], original_line_item: String, quantity: Integer, reference: String).void + } + def initialize( + amount: nil, + amount_tax: nil, + metadata: nil, + original_line_item: nil, + quantity: nil, + reference: nil + ); end + end + class ShippingCost < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount_tax + sig { params(amount: Integer, amount_tax: Integer).void } + def initialize(amount: nil, amount_tax: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. + sig { returns(Integer) } + attr_accessor :flat_amount + # The line item amounts to reverse. + sig { returns(T::Array[::Stripe::Tax::Transaction::CreateReversalParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. + sig { returns(String) } + attr_accessor :mode + # The ID of the Transaction to partially or fully reverse. + sig { returns(String) } + attr_accessor :original_transaction + # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). + sig { returns(String) } + attr_accessor :reference + # The shipping cost to reverse. + sig { returns(::Stripe::Tax::Transaction::CreateReversalParams::ShippingCost) } + attr_accessor :shipping_cost + sig { + params(expand: T::Array[String], flat_amount: Integer, line_items: T::Array[::Stripe::Tax::Transaction::CreateReversalParams::LineItem], metadata: T::Hash[String, String], mode: String, original_transaction: String, reference: String, shipping_cost: ::Stripe::Tax::Transaction::CreateReversalParams::ShippingCost).void + } + def initialize( + expand: nil, + flat_amount: nil, + line_items: nil, + metadata: nil, + mode: nil, + original_transaction: nil, + reference: nil, + shipping_cost: nil + ); end + end + # Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. + sig { + params(params: T.any(::Stripe::Tax::Transaction::CreateFromCalculationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction) + } + def self.create_from_calculation(params = {}, opts = {}); end + + # Partially or fully reverses a previously created Transaction. + sig { + params(params: T.any(::Stripe::Tax::Transaction::CreateReversalParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction) + } + def self.create_reversal(params = {}, opts = {}); end + + # Retrieves the line items of a committed standalone transaction as a collection. + sig { + params(params: T.any(::Stripe::Tax::Transaction::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_line_items(params = {}, opts = {}); end + + # Retrieves the line items of a committed standalone transaction as a collection. + sig { + params(transaction: String, params: T.any(::Stripe::Tax::Transaction::ListLineItemsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list_line_items(transaction, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax/transaction_line_item.rbi b/rbi/stripe/resources/tax/transaction_line_item.rbi index 0425f2f49..0f35af49e 100644 --- a/rbi/stripe/resources/tax/transaction_line_item.rbi +++ b/rbi/stripe/resources/tax/transaction_line_item.rbi @@ -6,47 +6,48 @@ module Stripe module Tax class TransactionLineItem < APIResource class Reversal < Stripe::StripeObject + # The `id` of the line item to reverse in the original transaction. sig { returns(String) } attr_reader :original_line_item end - sig { returns(Integer) } # The line item amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes were calculated on top of this amount. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # The amount of tax calculated for this line item, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } attr_reader :amount_tax - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The ID of an existing [Product](https://stripe.com/docs/api/products/object). + sig { returns(T.nilable(String)) } attr_reader :product - sig { returns(Integer) } # The number of units of the item being purchased. For reversals, this is the quantity reversed. + sig { returns(Integer) } attr_reader :quantity - sig { returns(String) } # A custom identifier for this line item in the transaction. + sig { returns(String) } attr_reader :reference - sig { returns(T.nilable(Reversal)) } # If `type=reversal`, contains information about what was reversed. + sig { returns(T.nilable(Reversal)) } attr_reader :reversal - sig { returns(String) } # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. - attr_reader :tax_behavior sig { returns(String) } + attr_reader :tax_behavior # The [tax code](https://stripe.com/docs/tax/tax-categories) ID used for this resource. - attr_reader :tax_code sig { returns(String) } + attr_reader :tax_code # If `reversal`, this line item reverses an earlier transaction. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/tax_code.rbi b/rbi/stripe/resources/tax_code.rbi index 61d513279..99ee11495 100644 --- a/rbi/stripe/resources/tax_code.rbi +++ b/rbi/stripe/resources/tax_code.rbi @@ -5,17 +5,47 @@ module Stripe # [Tax codes](https://stripe.com/docs/tax/tax-categories) classify goods and services for tax purposes. class TaxCode < APIResource - sig { returns(String) } # A detailed description of which types of products the tax code represents. - attr_reader :description sig { returns(String) } + attr_reader :description # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # A short name for the tax code. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. + sig { + params(params: T.any(::Stripe::TaxCode::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_deducted_at_source.rbi b/rbi/stripe/resources/tax_deducted_at_source.rbi index 4271140df..798d67b2d 100644 --- a/rbi/stripe/resources/tax_deducted_at_source.rbi +++ b/rbi/stripe/resources/tax_deducted_at_source.rbi @@ -4,20 +4,20 @@ # typed: true module Stripe class TaxDeductedAtSource < APIResource - sig { returns(String) } # Unique identifier for the object. - attr_reader :id sig { returns(String) } + attr_reader :id # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # The end of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. - attr_reader :period_end sig { returns(Integer) } + attr_reader :period_end # The start of the invoicing period. This TDS applies to Stripe fees collected during this invoicing period. + sig { returns(Integer) } attr_reader :period_start - sig { returns(String) } # The TAN that was supplied to Stripe when TDS was assessed + sig { returns(String) } attr_reader :tax_deduction_account_number end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_id.rbi b/rbi/stripe/resources/tax_id.rbi index 3176744be..f3d24ae0d 100644 --- a/rbi/stripe/resources/tax_id.rbi +++ b/rbi/stripe/resources/tax_id.rbi @@ -9,55 +9,166 @@ module Stripe # Related guides: [Customer tax identification numbers](https://stripe.com/docs/billing/taxes/tax-ids), [Account tax IDs](https://stripe.com/docs/invoicing/connect#account-tax-ids) class TaxId < APIResource class Owner < Stripe::StripeObject + # The account being referenced when `type` is `account`. sig { returns(T.any(String, Stripe::Account)) } attr_reader :account + # The Connect Application being referenced when `type` is `application`. sig { returns(T.any(String, Stripe::Application)) } attr_reader :application + # The customer being referenced when `type` is `customer`. sig { returns(T.any(String, Stripe::Customer)) } attr_reader :customer + # Type of owner referenced. sig { returns(String) } attr_reader :type end class Verification < Stripe::StripeObject + # Verification status, one of `pending`, `verified`, `unverified`, or `unavailable`. sig { returns(String) } attr_reader :status + # Verified address. sig { returns(T.nilable(String)) } attr_reader :verified_address + # Verified name. sig { returns(T.nilable(String)) } attr_reader :verified_name end - sig { returns(T.nilable(String)) } # Two-letter ISO code representing the country of the tax ID. + sig { returns(T.nilable(String)) } attr_reader :country - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(T.any(String, Stripe::Customer))) } # ID of the customer. + sig { returns(T.nilable(T.any(String, Stripe::Customer))) } attr_reader :customer - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Owner)) } # The account or customer the tax ID belongs to. + sig { returns(T.nilable(Owner)) } attr_reader :owner - sig { returns(String) } # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin`. Note that some legacy tax IDs have type `unknown` - attr_reader :type sig { returns(String) } + attr_reader :type # Value of the tax ID. + sig { returns(String) } attr_reader :value - sig { returns(T.nilable(Verification)) } # Tax ID verification information. + sig { returns(T.nilable(Verification)) } attr_reader :verification - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + sig { returns(String) } + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + sig { returns(String) } + attr_accessor :customer + # Type of owner referenced. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, customer: String, type: String).void } + def initialize(account: nil, customer: nil, type: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + sig { returns(::Stripe::TaxId::ListParams::Owner) } + attr_accessor :owner + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, owner: ::Stripe::TaxId::ListParams::Owner, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + owner: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + sig { returns(String) } + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + sig { returns(String) } + attr_accessor :customer + # Type of owner referenced. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, customer: String, type: String).void } + def initialize(account: nil, customer: nil, type: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + sig { returns(::Stripe::TaxId::CreateParams::Owner) } + attr_accessor :owner + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { + params(expand: T::Array[String], owner: ::Stripe::TaxId::CreateParams::Owner, type: String, value: String).void + } + def initialize(expand: nil, owner: nil, type: nil, value: nil); end + end + # Creates a new account or customer tax_id object. + sig { + params(params: T.any(::Stripe::TaxId::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def self.create(params = {}, opts = {}); end + + # Deletes an existing account or customer tax_id object. + sig { + params(id: String, params: T.any(::Stripe::TaxId::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes an existing account or customer tax_id object. + sig { + params(params: T.any(::Stripe::TaxId::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def delete(params = {}, opts = {}); end + + # Returns a list of tax IDs. + sig { + params(params: T.any(::Stripe::TaxId::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/tax_rate.rbi b/rbi/stripe/resources/tax_rate.rbi index 952ef7f8d..d153a7b71 100644 --- a/rbi/stripe/resources/tax_rate.rbi +++ b/rbi/stripe/resources/tax_rate.rbi @@ -8,66 +8,237 @@ module Stripe # Related guide: [Tax rates](https://stripe.com/docs/billing/taxes/tax-rates) class TaxRate < APIResource class FlatAmount < Stripe::StripeObject + # Amount of the tax when the `rate_type` is `flat_amount`. This positive integer represents how much to charge in the smallest currency unit (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). sig { returns(Integer) } attr_reader :amount + # Three-letter ISO currency code, in lowercase. sig { returns(String) } attr_reader :currency end - sig { returns(T::Boolean) } # Defaults to `true`. When set to `false`, this tax rate cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + sig { returns(T::Boolean) } attr_reader :active - sig { returns(T.nilable(String)) } # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } attr_reader :country - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(String) } # The display name of the tax rates as it will appear to your customer on their receipt email, PDF, and the hosted invoice page. + sig { returns(String) } attr_reader :display_name - sig { returns(T.nilable(Float)) } # Actual/effective tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, # this percentage reflects the rate actually used to calculate tax based on the product's taxability # and whether the user is registered to collect taxes in the corresponding jurisdiction. + sig { returns(T.nilable(Float)) } attr_reader :effective_percentage - sig { returns(T.nilable(FlatAmount)) } # The amount of the tax rate when the `rate_type` is `flat_amount`. Tax rates with `rate_type` `percentage` can vary based on the transaction, resulting in this field being `null`. This field exposes the amount and currency of the flat tax rate. + sig { returns(T.nilable(FlatAmount)) } attr_reader :flat_amount - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } attr_reader :inclusive - sig { returns(T.nilable(String)) } # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. - attr_reader :jurisdiction sig { returns(T.nilable(String)) } + attr_reader :jurisdiction # The level of the jurisdiction that imposes this tax rate. Will be `null` for manually defined tax rates. + sig { returns(T.nilable(String)) } attr_reader :jurisdiction_level - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Float) } # Tax rate percentage out of 100. For tax calculations with automatic_tax[enabled]=true, this percentage includes the statutory tax rate of non-taxable jurisdictions. + sig { returns(Float) } attr_reader :percentage - sig { returns(T.nilable(String)) } # Indicates the type of tax rate applied to the taxable amount. This value can be `null` when no tax applies to the location. - attr_reader :rate_type sig { returns(T.nilable(String)) } + attr_reader :rate_type # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. - attr_reader :state sig { returns(T.nilable(String)) } + attr_reader :state # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(T.nilable(String)) } attr_reader :tax_type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Optional flag to filter by tax rates that are either active or inactive (archived). + sig { returns(T::Boolean) } + attr_accessor :active + # Optional range for filtering created date. + sig { returns(T.any(::Stripe::TaxRate::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + sig { returns(T::Boolean) } + attr_accessor :inclusive + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, created: T.any(::Stripe::TaxRate::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], inclusive: T::Boolean, limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + inclusive: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + sig { returns(T::Boolean) } + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # This represents the tax rate percent out of 100. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(active: T::Boolean, country: String, description: String, display_name: String, expand: T::Array[String], inclusive: T::Boolean, jurisdiction: String, metadata: T::Hash[String, String], percentage: Float, state: String, tax_type: String).void + } + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + inclusive: nil, + jurisdiction: nil, + metadata: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + sig { returns(T::Boolean) } + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(active: T::Boolean, country: String, description: String, display_name: String, expand: T::Array[String], jurisdiction: String, metadata: T.nilable(T::Hash[String, String]), state: String, tax_type: String).void + } + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + jurisdiction: nil, + metadata: nil, + state: nil, + tax_type: nil + ); end + end + # Creates a new tax rate. + sig { + params(params: T.any(::Stripe::TaxRate::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. + sig { + params(params: T.any(::Stripe::TaxRate::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates an existing tax rate. + sig { + params(id: String, params: T.any(::Stripe::TaxRate::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/configuration.rbi b/rbi/stripe/resources/terminal/configuration.rbi index c1fe96bfc..1a56872ab 100644 --- a/rbi/stripe/resources/terminal/configuration.rbi +++ b/rbi/stripe/resources/terminal/configuration.rbi @@ -7,215 +7,1085 @@ module Stripe # A Configurations object represents how features should be configured for terminal readers. class Configuration < APIResource class BbposWiseposE < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end class Offline < Stripe::StripeObject + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. sig { returns(T.nilable(T::Boolean)) } attr_reader :enabled end class RebootWindow < Stripe::StripeObject + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. sig { returns(Integer) } attr_reader :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. sig { returns(Integer) } attr_reader :start_hour end class StripeS700 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end class Tipping < Stripe::StripeObject class Aud < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Cad < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Chf < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Czk < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Dkk < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Eur < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Gbp < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Hkd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Myr < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Nok < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Nzd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Pln < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Sek < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Sgd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end class Usd < Stripe::StripeObject + # Fixed amounts displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :fixed_amounts + # Percentages displayed when collecting a tip sig { returns(T.nilable(T::Array[Integer])) } attr_reader :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed sig { returns(Integer) } attr_reader :smart_tip_threshold end + # Attribute for field aud sig { returns(Aud) } attr_reader :aud + # Attribute for field cad sig { returns(Cad) } attr_reader :cad + # Attribute for field chf sig { returns(Chf) } attr_reader :chf + # Attribute for field czk sig { returns(Czk) } attr_reader :czk + # Attribute for field dkk sig { returns(Dkk) } attr_reader :dkk + # Attribute for field eur sig { returns(Eur) } attr_reader :eur + # Attribute for field gbp sig { returns(Gbp) } attr_reader :gbp + # Attribute for field hkd sig { returns(Hkd) } attr_reader :hkd + # Attribute for field myr sig { returns(Myr) } attr_reader :myr + # Attribute for field nok sig { returns(Nok) } attr_reader :nok + # Attribute for field nzd sig { returns(Nzd) } attr_reader :nzd + # Attribute for field pln sig { returns(Pln) } attr_reader :pln + # Attribute for field sek sig { returns(Sek) } attr_reader :sek + # Attribute for field sgd sig { returns(Sgd) } attr_reader :sgd + # Attribute for field usd sig { returns(Usd) } attr_reader :usd end class VerifoneP400 < Stripe::StripeObject + # A File ID representing an image you would like displayed on the reader. sig { returns(T.any(String, Stripe::File)) } attr_reader :splashscreen end - sig { returns(BbposWiseposE) } # Attribute for field bbpos_wisepos_e + sig { returns(BbposWiseposE) } attr_reader :bbpos_wisepos_e - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(T::Boolean)) } # Whether this Configuration is the default for your account + sig { returns(T.nilable(T::Boolean)) } attr_reader :is_account_default - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # String indicating the name of the Configuration object, set by the user + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Offline) } # Attribute for field offline + sig { returns(Offline) } attr_reader :offline - sig { returns(RebootWindow) } # Attribute for field reboot_window + sig { returns(RebootWindow) } attr_reader :reboot_window - sig { returns(StripeS700) } # Attribute for field stripe_s700 + sig { returns(StripeS700) } attr_reader :stripe_s700 - sig { returns(Tipping) } # Attribute for field tipping + sig { returns(Tipping) } attr_reader :tipping - sig { returns(VerifoneP400) } # Attribute for field verifone_p400 + sig { returns(VerifoneP400) } attr_reader :verifone_p400 - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + sig { returns(Integer) } + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + sig { returns(Integer) } + attr_accessor :start_hour + sig { params(end_hour: Integer, start_hour: Integer).void } + def initialize(end_hour: nil, start_hour: nil); end + end + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + # Tipping configuration for AUD + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Aud) } + attr_accessor :aud + # Tipping configuration for CAD + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Cad) } + attr_accessor :cad + # Tipping configuration for CHF + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Chf) } + attr_accessor :chf + # Tipping configuration for CZK + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Czk) } + attr_accessor :czk + # Tipping configuration for DKK + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Dkk) } + attr_accessor :dkk + # Tipping configuration for EUR + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Eur) } + attr_accessor :eur + # Tipping configuration for GBP + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Gbp) } + attr_accessor :gbp + # Tipping configuration for HKD + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Hkd) } + attr_accessor :hkd + # Tipping configuration for MYR + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Myr) } + attr_accessor :myr + # Tipping configuration for NOK + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nok) } + attr_accessor :nok + # Tipping configuration for NZD + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nzd) } + attr_accessor :nzd + # Tipping configuration for PLN + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Pln) } + attr_accessor :pln + # Tipping configuration for SEK + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sek) } + attr_accessor :sek + # Tipping configuration for SGD + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sgd) } + attr_accessor :sgd + # Tipping configuration for USD + sig { returns(::Stripe::Terminal::Configuration::UpdateParams::Tipping::Usd) } + attr_accessor :usd + sig { + params(aud: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Aud, cad: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Cad, chf: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Chf, czk: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Czk, dkk: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Dkk, eur: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Eur, gbp: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Gbp, hkd: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Hkd, myr: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Myr, nok: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nok, nzd: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Nzd, pln: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Pln, sek: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sek, sgd: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Sgd, usd: ::Stripe::Terminal::Configuration::UpdateParams::Tipping::Usd).void + } + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ); end + end + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::BbposWiseposE)) } + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Name of the configuration + sig { returns(String) } + attr_accessor :name + # Configurations for collecting transactions offline. + sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Offline)) } + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::RebootWindow)) } + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::StripeS700)) } + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping)) } + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + sig { returns(T.nilable(::Stripe::Terminal::Configuration::UpdateParams::VerifoneP400)) } + attr_accessor :verifone_p400 + sig { + params(bbpos_wisepos_e: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::BbposWiseposE), expand: T::Array[String], name: String, offline: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Offline), reboot_window: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::RebootWindow), stripe_s700: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::StripeS700), tipping: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::Tipping), verifone_p400: T.nilable(::Stripe::Terminal::Configuration::UpdateParams::VerifoneP400)).void + } + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # if present, only return the account default or non-default configurations. + sig { returns(T::Boolean) } + attr_accessor :is_account_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], is_account_default: T::Boolean, limit: Integer, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + is_account_default: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + sig { returns(Integer) } + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + sig { returns(Integer) } + attr_accessor :start_hour + sig { params(end_hour: Integer, start_hour: Integer).void } + def initialize(end_hour: nil, start_hour: nil); end + end + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + # Tipping configuration for AUD + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Aud) } + attr_accessor :aud + # Tipping configuration for CAD + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Cad) } + attr_accessor :cad + # Tipping configuration for CHF + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Chf) } + attr_accessor :chf + # Tipping configuration for CZK + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Czk) } + attr_accessor :czk + # Tipping configuration for DKK + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Dkk) } + attr_accessor :dkk + # Tipping configuration for EUR + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Eur) } + attr_accessor :eur + # Tipping configuration for GBP + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Gbp) } + attr_accessor :gbp + # Tipping configuration for HKD + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Hkd) } + attr_accessor :hkd + # Tipping configuration for MYR + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Myr) } + attr_accessor :myr + # Tipping configuration for NOK + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Nok) } + attr_accessor :nok + # Tipping configuration for NZD + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Nzd) } + attr_accessor :nzd + # Tipping configuration for PLN + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Pln) } + attr_accessor :pln + # Tipping configuration for SEK + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Sek) } + attr_accessor :sek + # Tipping configuration for SGD + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Sgd) } + attr_accessor :sgd + # Tipping configuration for USD + sig { returns(::Stripe::Terminal::Configuration::CreateParams::Tipping::Usd) } + attr_accessor :usd + sig { + params(aud: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Aud, cad: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Cad, chf: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Chf, czk: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Czk, dkk: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Dkk, eur: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Eur, gbp: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Gbp, hkd: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Hkd, myr: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Myr, nok: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Nok, nzd: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Nzd, pln: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Pln, sek: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Sek, sgd: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Sgd, usd: ::Stripe::Terminal::Configuration::CreateParams::Tipping::Usd).void + } + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ); end + end + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + sig { returns(::Stripe::Terminal::Configuration::CreateParams::BbposWiseposE) } + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Name of the configuration + sig { returns(String) } + attr_accessor :name + # Configurations for collecting transactions offline. + sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Offline)) } + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + sig { returns(::Stripe::Terminal::Configuration::CreateParams::RebootWindow) } + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + sig { returns(::Stripe::Terminal::Configuration::CreateParams::StripeS700) } + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + sig { returns(T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping)) } + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + sig { returns(::Stripe::Terminal::Configuration::CreateParams::VerifoneP400) } + attr_accessor :verifone_p400 + sig { + params(bbpos_wisepos_e: ::Stripe::Terminal::Configuration::CreateParams::BbposWiseposE, expand: T::Array[String], name: String, offline: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Offline), reboot_window: ::Stripe::Terminal::Configuration::CreateParams::RebootWindow, stripe_s700: ::Stripe::Terminal::Configuration::CreateParams::StripeS700, tipping: T.nilable(::Stripe::Terminal::Configuration::CreateParams::Tipping), verifone_p400: ::Stripe::Terminal::Configuration::CreateParams::VerifoneP400).void + } + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ); end + end + # Creates a new Configuration object. + sig { + params(params: T.any(::Stripe::Terminal::Configuration::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def self.create(params = {}, opts = {}); end + + # Deletes a Configuration object. + sig { + params(id: String, params: T.any(::Stripe::Terminal::Configuration::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes a Configuration object. + sig { + params(params: T.any(::Stripe::Terminal::Configuration::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def delete(params = {}, opts = {}); end + + # Returns a list of Configuration objects. + sig { + params(params: T.any(::Stripe::Terminal::Configuration::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a new Configuration object. + sig { + params(id: String, params: T.any(::Stripe::Terminal::Configuration::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/connection_token.rbi b/rbi/stripe/resources/terminal/connection_token.rbi index a22e7d28e..7ed5d6f1f 100644 --- a/rbi/stripe/resources/terminal/connection_token.rbi +++ b/rbi/stripe/resources/terminal/connection_token.rbi @@ -8,15 +8,30 @@ module Stripe # # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) class ConnectionToken < APIResource - sig { returns(String) } # The id of the location that this connection token is scoped to. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). - attr_reader :location sig { returns(String) } + attr_reader :location # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Your application should pass this token to the Stripe Terminal SDK. + sig { returns(String) } attr_reader :secret + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + sig { returns(String) } + attr_accessor :location + sig { params(expand: T::Array[String], location: String).void } + def initialize(expand: nil, location: nil); end + end + # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. + sig { + params(params: T.any(::Stripe::Terminal::ConnectionToken::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::ConnectionToken) + } + def self.create(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/location.rbi b/rbi/stripe/resources/terminal/location.rbi index eea6a8ce6..eebaae943 100644 --- a/rbi/stripe/resources/terminal/location.rbi +++ b/rbi/stripe/resources/terminal/location.rbi @@ -9,43 +9,223 @@ module Stripe # Related guide: [Fleet management](https://stripe.com/docs/terminal/fleet/locations) class Location < APIResource class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end - sig { returns(Address) } # Attribute for field address + sig { returns(Address) } attr_reader :address - sig { returns(String) } # The ID of a configuration that will be used to customize all readers in this location. - attr_reader :configuration_overrides sig { returns(String) } + attr_reader :configuration_overrides # The display name of the location. - attr_reader :display_name sig { returns(String) } + attr_reader :display_name # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + sig { returns(::Stripe::Terminal::Location::UpdateParams::Address) } + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + sig { returns(T.nilable(String)) } + attr_accessor :configuration_overrides + # A name for the location. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(address: ::Stripe::Terminal::Location::UpdateParams::Address, configuration_overrides: T.nilable(String), display_name: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The full address of the location. + sig { returns(::Stripe::Terminal::Location::CreateParams::Address) } + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + sig { returns(String) } + attr_accessor :configuration_overrides + # A name for the location. Maximum length is 1000 characters. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(address: ::Stripe::Terminal::Location::CreateParams::Address, configuration_overrides: String, display_name: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ); end + end + # Creates a new Location object. + # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. + sig { + params(params: T.any(::Stripe::Terminal::Location::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def self.create(params = {}, opts = {}); end + + # Deletes a Location object. + sig { + params(id: String, params: T.any(::Stripe::Terminal::Location::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes a Location object. + sig { + params(params: T.any(::Stripe::Terminal::Location::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def delete(params = {}, opts = {}); end + + # Returns a list of Location objects. + sig { + params(params: T.any(::Stripe::Terminal::Location::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Terminal::Location::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/reader.rbi b/rbi/stripe/resources/terminal/reader.rbi index a9159a2fc..8e121b666 100644 --- a/rbi/stripe/resources/terminal/reader.rbi +++ b/rbi/stripe/resources/terminal/reader.rbi @@ -12,265 +12,941 @@ module Stripe class CollectInputs < Stripe::StripeObject class Input < Stripe::StripeObject class CustomText < Stripe::StripeObject + # Customize the default description for this input sig { returns(T.nilable(String)) } attr_reader :description + # Customize the default label for this input's skip button sig { returns(T.nilable(String)) } attr_reader :skip_button + # Customize the default label for this input's submit button sig { returns(T.nilable(String)) } attr_reader :submit_button + # Customize the default title for this input sig { returns(T.nilable(String)) } attr_reader :title end class Email < Stripe::StripeObject + # The collected email address sig { returns(T.nilable(String)) } attr_reader :value end class Numeric < Stripe::StripeObject + # The collected number sig { returns(T.nilable(String)) } attr_reader :value end class Phone < Stripe::StripeObject + # The collected phone number sig { returns(T.nilable(String)) } attr_reader :value end class Selection < Stripe::StripeObject class Choice < Stripe::StripeObject + # The button style for the choice sig { returns(T.nilable(String)) } attr_reader :style + # A value to be selected sig { returns(String) } attr_reader :value end + # List of possible choices to be selected sig { returns(T::Array[Choice]) } attr_reader :choices + # The value of the selected choice sig { returns(T.nilable(String)) } attr_reader :value end class Signature < Stripe::StripeObject + # The File ID of a collected signature image sig { returns(T.nilable(String)) } attr_reader :value end class Text < Stripe::StripeObject + # The collected text value sig { returns(T.nilable(String)) } attr_reader :value end class Toggle < Stripe::StripeObject + # The toggle's default value sig { returns(T.nilable(String)) } attr_reader :default_value + # The toggle's description text sig { returns(T.nilable(String)) } attr_reader :description + # The toggle's title text sig { returns(T.nilable(String)) } attr_reader :title + # The toggle's collected value sig { returns(T.nilable(String)) } attr_reader :value end + # Default text of input being collected. sig { returns(T.nilable(CustomText)) } attr_reader :custom_text + # Information about a email being collected using a reader sig { returns(Email) } attr_reader :email + # Information about a number being collected using a reader sig { returns(Numeric) } attr_reader :numeric + # Information about a phone number being collected using a reader sig { returns(Phone) } attr_reader :phone + # Indicate that this input is required, disabling the skip button. sig { returns(T.nilable(T::Boolean)) } attr_reader :required + # Information about a selection being collected using a reader sig { returns(Selection) } attr_reader :selection + # Information about a signature being collected using a reader sig { returns(Signature) } attr_reader :signature + # Indicate that this input was skipped by the user. sig { returns(T::Boolean) } attr_reader :skipped + # Information about text being collected using a reader sig { returns(Text) } attr_reader :text + # List of toggles being collected. Values are present if collection is complete. sig { returns(T.nilable(T::Array[Toggle])) } attr_reader :toggles + # Type of input being collected. sig { returns(String) } attr_reader :type end + # List of inputs to be collected. sig { returns(T::Array[Input]) } attr_reader :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata end class CollectPaymentMethod < Stripe::StripeObject class CollectConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :amount_eligible end + # Enable customer initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. sig { returns(T::Boolean) } attr_reader :skip_tipping + # Represents a per-transaction tipping configuration sig { returns(Tipping) } attr_reader :tipping end + # Account the payment intent belongs to. sig { returns(String) } attr_reader :account + # Represents a per-transaction override of a reader configuration sig { returns(CollectConfig) } attr_reader :collect_config + # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # PaymentMethod objects represent your customer's payment instruments. + # You can use them with [PaymentIntents](https://stripe.com/docs/payments/payment-intents) to collect payments or save them to + # Customer objects to store instrument details for future payments. + # + # Related guides: [Payment Methods](https://stripe.com/docs/payments/payment-methods) and [More Payment Scenarios](https://stripe.com/docs/payments/more-payment-scenarios). sig { returns(Stripe::PaymentMethod) } attr_reader :payment_method + # This field will be deprecated. Please use `account` instead. sig { returns(String) } attr_reader :stripe_account end class ConfirmPaymentIntent < Stripe::StripeObject + # Account the payment intent belongs to. sig { returns(String) } attr_reader :account + # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # This field will be deprecated. Please use `account` instead. sig { returns(String) } attr_reader :stripe_account end class ProcessPaymentIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject class Tipping < Stripe::StripeObject + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). sig { returns(Integer) } attr_reader :amount_eligible end + # Enable customer initiated cancellation when processing this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. sig { returns(T::Boolean) } attr_reader :skip_tipping + # Represents a per-transaction tipping configuration sig { returns(Tipping) } attr_reader :tipping end + # Account the payment intent belongs to. sig { returns(String) } attr_reader :account + # Most recent PaymentIntent processed by the reader. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # Represents a per-transaction override of a reader configuration sig { returns(ProcessConfig) } attr_reader :process_config + # This field will be deprecated. Please use `account` instead. sig { returns(String) } attr_reader :stripe_account end class ProcessSetupIntent < Stripe::StripeObject class ProcessConfig < Stripe::StripeObject + # Enable customer initiated cancellation when processing this SetupIntent. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end + # ID of a card PaymentMethod generated from the card_present PaymentMethod that may be attached to a Customer for future transactions. Only present if it was possible to generate a card PaymentMethod. sig { returns(String) } attr_reader :generated_card + # Represents a per-setup override of a reader configuration sig { returns(ProcessConfig) } attr_reader :process_config + # Most recent SetupIntent processed by the reader. sig { returns(T.any(String, Stripe::SetupIntent)) } attr_reader :setup_intent end class RefundPayment < Stripe::StripeObject class RefundPaymentConfig < Stripe::StripeObject + # Enable customer initiated cancellation when refunding this payment. sig { returns(T::Boolean) } attr_reader :enable_customer_cancellation end + # Account the payment intent belongs to. sig { returns(String) } attr_reader :account + # The amount being refunded. sig { returns(Integer) } attr_reader :amount + # Charge that is being refunded. sig { returns(T.any(String, Stripe::Charge)) } attr_reader :charge + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. sig { returns(T::Hash[String, String]) } attr_reader :metadata + # Payment intent that is being refunded. sig { returns(T.any(String, Stripe::PaymentIntent)) } attr_reader :payment_intent + # The reason for the refund. sig { returns(String) } attr_reader :reason + # Unique identifier for the refund object. sig { returns(T.any(String, Stripe::Refund)) } attr_reader :refund + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. sig { returns(T::Boolean) } attr_reader :refund_application_fee + # Represents a per-transaction override of a reader configuration sig { returns(RefundPaymentConfig) } attr_reader :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. sig { returns(T::Boolean) } attr_reader :reverse_transfer + # This field will be deprecated. Please use `account` instead. sig { returns(String) } attr_reader :stripe_account end class SetReaderDisplay < Stripe::StripeObject class Cart < Stripe::StripeObject class LineItem < Stripe::StripeObject + # The amount of the line item. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :amount + # Description of the line item. sig { returns(String) } attr_reader :description + # The quantity of the line item. sig { returns(Integer) } attr_reader :quantity end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). sig { returns(String) } attr_reader :currency + # List of line items in the cart. sig { returns(T::Array[LineItem]) } attr_reader :line_items + # Tax amount for the entire cart. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(T.nilable(Integer)) } attr_reader :tax + # Total amount for the entire cart, including tax. A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). sig { returns(Integer) } attr_reader :total end + # Cart object to be displayed by the reader. sig { returns(T.nilable(Cart)) } attr_reader :cart + # Type of information to be displayed by the reader. sig { returns(String) } attr_reader :type end + # Represents a reader action to collect customer inputs sig { returns(CollectInputs) } attr_reader :collect_inputs + # Represents a reader action to collect a payment method sig { returns(CollectPaymentMethod) } attr_reader :collect_payment_method + # Represents a reader action to confirm a payment sig { returns(ConfirmPaymentIntent) } attr_reader :confirm_payment_intent + # Failure code, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_code + # Detailed failure message, only set if status is `failed`. sig { returns(T.nilable(String)) } attr_reader :failure_message + # Represents a reader action to process a payment intent sig { returns(ProcessPaymentIntent) } attr_reader :process_payment_intent + # Represents a reader action to process a setup intent sig { returns(ProcessSetupIntent) } attr_reader :process_setup_intent + # Represents a reader action to refund a payment sig { returns(RefundPayment) } attr_reader :refund_payment + # Represents a reader action to set the reader display sig { returns(SetReaderDisplay) } attr_reader :set_reader_display + # Status of the action performed by the reader. sig { returns(String) } attr_reader :status + # Type of action performed by the reader. sig { returns(String) } attr_reader :type end - sig { returns(T.nilable(Action)) } # The most recent action performed by the reader. + sig { returns(T.nilable(Action)) } attr_reader :action - sig { returns(T.nilable(String)) } # The current software version of the reader. + sig { returns(T.nilable(String)) } attr_reader :device_sw_version - sig { returns(String) } # Type of reader, one of `bbpos_wisepad3`, `stripe_m2`, `stripe_s700`, `bbpos_chipper2x`, `bbpos_wisepos_e`, `verifone_P400`, `simulated_wisepos_e`, or `mobile_phone_reader`. - attr_reader :device_type sig { returns(String) } + attr_reader :device_type # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The local IP address of the reader. + sig { returns(T.nilable(String)) } attr_reader :ip_address - sig { returns(String) } # Custom label given to the reader for easier identification. + sig { returns(String) } attr_reader :label - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) } # The location identifier of the reader. + sig { returns(T.nilable(T.any(String, Stripe::Terminal::Location))) } attr_reader :location - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Serial number of the reader. + sig { returns(String) } attr_reader :serial_number - sig { returns(T.nilable(String)) } # The networking status of the reader. We do not recommend using this field in flows that may block taking payments. + sig { returns(T.nilable(String)) } attr_reader :status - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The new label of the reader. + sig { returns(T.nilable(String)) } + attr_accessor :label + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], label: T.nilable(String), metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(expand: nil, label: nil, metadata: nil); end + end + class ListParams < Stripe::RequestParams + # Filters readers by device type + sig { returns(String) } + attr_accessor :device_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A location ID to filter the response list to only readers at the specific location + sig { returns(String) } + attr_accessor :location + # Filters readers by serial number + sig { returns(String) } + attr_accessor :serial_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A status filter to filter readers to only offline or online readers + sig { returns(String) } + attr_accessor :status + sig { + params(device_type: String, ending_before: String, expand: T::Array[String], limit: Integer, location: String, serial_number: String, starting_after: String, status: String).void + } + def initialize( + device_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + location: nil, + serial_number: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + sig { returns(String) } + attr_accessor :label + # The location to assign the reader to. + sig { returns(String) } + attr_accessor :location + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A code generated by the reader used for registering to an account. + sig { returns(String) } + attr_accessor :registration_code + sig { + params(expand: T::Array[String], label: String, location: String, metadata: T.nilable(T::Hash[String, String]), registration_code: String).void + } + def initialize( + expand: nil, + label: nil, + location: nil, + metadata: nil, + registration_code: nil + ); end + end + class CancelActionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CollectInputsParams < Stripe::RequestParams + class Input < Stripe::RequestParams + class CustomText < Stripe::RequestParams + # The description which will be displayed when collecting this input + sig { returns(String) } + attr_accessor :description + # The skip button text + sig { returns(String) } + attr_accessor :skip_button + # The submit button text + sig { returns(String) } + attr_accessor :submit_button + # The title which will be displayed when collecting this input + sig { returns(String) } + attr_accessor :title + sig { + params(description: String, skip_button: String, submit_button: String, title: String).void + } + def initialize(description: nil, skip_button: nil, submit_button: nil, title: nil); end + end + class Selection < Stripe::RequestParams + class Choice < Stripe::RequestParams + # The style of the button which will be shown for this choice + sig { returns(String) } + attr_accessor :style + # The text which will be shown on the button for this choice + sig { returns(String) } + attr_accessor :value + sig { params(style: String, value: String).void } + def initialize(style: nil, value: nil); end + end + # List of choices for the `selection` input + sig { + returns(T::Array[::Stripe::Terminal::Reader::CollectInputsParams::Input::Selection::Choice]) + } + attr_accessor :choices + sig { + params(choices: T::Array[::Stripe::Terminal::Reader::CollectInputsParams::Input::Selection::Choice]).void + } + def initialize(choices: nil); end + end + class Toggle < Stripe::RequestParams + # The default value of the toggle + sig { returns(String) } + attr_accessor :default_value + # The description which will be displayed for the toggle + sig { returns(String) } + attr_accessor :description + # The title which will be displayed for the toggle + sig { returns(String) } + attr_accessor :title + sig { params(default_value: String, description: String, title: String).void } + def initialize(default_value: nil, description: nil, title: nil); end + end + # Customize the text which will be displayed while collecting this input + sig { returns(::Stripe::Terminal::Reader::CollectInputsParams::Input::CustomText) } + attr_accessor :custom_text + # Indicate that this input is required, disabling the skip button + sig { returns(T::Boolean) } + attr_accessor :required + # Options for the `selection` input + sig { returns(::Stripe::Terminal::Reader::CollectInputsParams::Input::Selection) } + attr_accessor :selection + # List of toggles to be displayed and customization for the toggles + sig { returns(T::Array[::Stripe::Terminal::Reader::CollectInputsParams::Input::Toggle]) } + attr_accessor :toggles + # The type of input to collect + sig { returns(String) } + attr_accessor :type + sig { + params(custom_text: ::Stripe::Terminal::Reader::CollectInputsParams::Input::CustomText, required: T::Boolean, selection: ::Stripe::Terminal::Reader::CollectInputsParams::Input::Selection, toggles: T::Array[::Stripe::Terminal::Reader::CollectInputsParams::Input::Toggle], type: String).void + } + def initialize( + custom_text: nil, + required: nil, + selection: nil, + toggles: nil, + type: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of inputs to be collected using the Reader + sig { returns(T::Array[::Stripe::Terminal::Reader::CollectInputsParams::Input]) } + attr_accessor :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], inputs: T::Array[::Stripe::Terminal::Reader::CollectInputsParams::Input], metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, inputs: nil, metadata: nil); end + end + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :amount_eligible + sig { params(amount_eligible: Integer).void } + def initialize(amount_eligible: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(String) } + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T::Boolean) } + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + sig { + returns(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig::Tipping) + } + attr_accessor :tipping + sig { + params(allow_redisplay: String, enable_customer_cancellation: T::Boolean, skip_tipping: T::Boolean, tipping: ::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig::Tipping).void + } + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ); end + end + # Configuration overrides + sig { returns(::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig) } + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # PaymentIntent ID + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(collect_config: ::Stripe::Terminal::Reader::CollectPaymentMethodParams::CollectConfig, expand: T::Array[String], payment_intent: String).void + } + def initialize(collect_config: nil, expand: nil, payment_intent: nil); end + end + class ConfirmPaymentIntentParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # PaymentIntent ID + sig { returns(String) } + attr_accessor :payment_intent + sig { params(expand: T::Array[String], payment_intent: String).void } + def initialize(expand: nil, payment_intent: nil); end + end + class ProcessPaymentIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :amount_eligible + sig { params(amount_eligible: Integer).void } + def initialize(amount_eligible: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(String) } + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T::Boolean) } + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + sig { + returns(::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig::Tipping) + } + attr_accessor :tipping + sig { + params(allow_redisplay: String, enable_customer_cancellation: T::Boolean, skip_tipping: T::Boolean, tipping: ::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig::Tipping).void + } + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # PaymentIntent ID + sig { returns(String) } + attr_accessor :payment_intent + # Configuration overrides + sig { returns(::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig) } + attr_accessor :process_config + sig { + params(expand: T::Array[String], payment_intent: String, process_config: ::Stripe::Terminal::Reader::ProcessPaymentIntentParams::ProcessConfig).void + } + def initialize(expand: nil, payment_intent: nil, process_config: nil); end + end + class ProcessSetupIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + sig { params(enable_customer_cancellation: T::Boolean).void } + def initialize(enable_customer_cancellation: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(String) } + attr_accessor :allow_redisplay + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Configuration overrides + sig { returns(::Stripe::Terminal::Reader::ProcessSetupIntentParams::ProcessConfig) } + attr_accessor :process_config + # SetupIntent ID + sig { returns(String) } + attr_accessor :setup_intent + sig { + params(allow_redisplay: String, expand: T::Array[String], process_config: ::Stripe::Terminal::Reader::ProcessSetupIntentParams::ProcessConfig, setup_intent: String).void + } + def initialize( + allow_redisplay: nil, + expand: nil, + process_config: nil, + setup_intent: nil + ); end + end + class RefundPaymentParams < Stripe::RequestParams + class RefundPaymentConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + sig { params(enable_customer_cancellation: T::Boolean).void } + def initialize(enable_customer_cancellation: nil); end + end + # A positive integer in __cents__ representing how much of this charge to refund. + sig { returns(Integer) } + attr_accessor :amount + # ID of the Charge to refund. + sig { returns(String) } + attr_accessor :charge + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # ID of the PaymentIntent to refund. + sig { returns(String) } + attr_accessor :payment_intent + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :refund_application_fee + # Configuration overrides + sig { returns(::Stripe::Terminal::Reader::RefundPaymentParams::RefundPaymentConfig) } + attr_accessor :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :reverse_transfer + sig { + params(amount: Integer, charge: String, expand: T::Array[String], metadata: T::Hash[String, String], payment_intent: String, refund_application_fee: T::Boolean, refund_payment_config: ::Stripe::Terminal::Reader::RefundPaymentParams::RefundPaymentConfig, reverse_transfer: T::Boolean).void + } + def initialize( + amount: nil, + charge: nil, + expand: nil, + metadata: nil, + payment_intent: nil, + refund_application_fee: nil, + refund_payment_config: nil, + reverse_transfer: nil + ); end + end + class SetReaderDisplayParams < Stripe::RequestParams + class Cart < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The price of the item in cents. + sig { returns(Integer) } + attr_accessor :amount + # The description or name of the item. + sig { returns(String) } + attr_accessor :description + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + sig { params(amount: Integer, description: String, quantity: Integer).void } + def initialize(amount: nil, description: nil, quantity: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Array of line items that were purchased. + sig { + returns(T::Array[::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart::LineItem]) + } + attr_accessor :line_items + # The amount of tax in cents. + sig { returns(Integer) } + attr_accessor :tax + # Total balance of cart due in cents. + sig { returns(Integer) } + attr_accessor :total + sig { + params(currency: String, line_items: T::Array[::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart::LineItem], tax: Integer, total: Integer).void + } + def initialize(currency: nil, line_items: nil, tax: nil, total: nil); end + end + # Cart + sig { returns(::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart) } + attr_accessor :cart + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Type + sig { returns(String) } + attr_accessor :type + sig { + params(cart: ::Stripe::Terminal::Reader::SetReaderDisplayParams::Cart, expand: T::Array[String], type: String).void + } + def initialize(cart: nil, expand: nil, type: nil); end + end + class PresentPaymentMethodParams < Stripe::RequestParams + class CardPresent < Stripe::RequestParams + # The card number, as a string without any separators. + sig { returns(String) } + attr_accessor :number + sig { params(number: String).void } + def initialize(number: nil); end + end + class InteracPresent < Stripe::RequestParams + # Card Number + sig { returns(String) } + attr_accessor :number + sig { params(number: String).void } + def initialize(number: nil); end + end + # Simulated on-reader tip amount. + sig { returns(Integer) } + attr_accessor :amount_tip + # Simulated data for the card_present payment method. + sig { returns(::Stripe::Terminal::Reader::PresentPaymentMethodParams::CardPresent) } + attr_accessor :card_present + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Simulated data for the interac_present payment method. + sig { returns(::Stripe::Terminal::Reader::PresentPaymentMethodParams::InteracPresent) } + attr_accessor :interac_present + # Simulated payment type. + sig { returns(String) } + attr_accessor :type + sig { + params(amount_tip: Integer, card_present: ::Stripe::Terminal::Reader::PresentPaymentMethodParams::CardPresent, expand: T::Array[String], interac_present: ::Stripe::Terminal::Reader::PresentPaymentMethodParams::InteracPresent, type: String).void + } + def initialize( + amount_tip: nil, + card_present: nil, + expand: nil, + interac_present: nil, + type: nil + ); end + end + # Cancels the current reader action. + sig { + params(params: T.any(::Stripe::Terminal::Reader::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def cancel_action(params = {}, opts = {}); end + + # Cancels the current reader action. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.cancel_action(reader, params = {}, opts = {}); end + + # Initiates an input collection flow on a Reader. + sig { + params(params: T.any(::Stripe::Terminal::Reader::CollectInputsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def collect_inputs(params = {}, opts = {}); end + + # Initiates an input collection flow on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::CollectInputsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.collect_inputs(reader, params = {}, opts = {}); end + + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + sig { + params(params: T.any(::Stripe::Terminal::Reader::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def collect_payment_method(params = {}, opts = {}); end + + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.collect_payment_method(reader, params = {}, opts = {}); end + + # Finalizes a payment on a Reader. + sig { + params(params: T.any(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def confirm_payment_intent(params = {}, opts = {}); end + + # Finalizes a payment on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.confirm_payment_intent(reader, params = {}, opts = {}); end + + # Creates a new Reader object. + sig { + params(params: T.any(::Stripe::Terminal::Reader::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.create(params = {}, opts = {}); end + + # Deletes a Reader object. + sig { + params(id: String, params: T.any(::Stripe::Terminal::Reader::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes a Reader object. + sig { + params(params: T.any(::Stripe::Terminal::Reader::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def delete(params = {}, opts = {}); end + + # Returns a list of Reader objects. + sig { + params(params: T.any(::Stripe::Terminal::Reader::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Initiates a payment flow on a Reader. + sig { + params(params: T.any(::Stripe::Terminal::Reader::ProcessPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def process_payment_intent(params = {}, opts = {}); end + + # Initiates a payment flow on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::ProcessPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.process_payment_intent(reader, params = {}, opts = {}); end + + # Initiates a setup intent flow on a Reader. + sig { + params(params: T.any(::Stripe::Terminal::Reader::ProcessSetupIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def process_setup_intent(params = {}, opts = {}); end + + # Initiates a setup intent flow on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::ProcessSetupIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.process_setup_intent(reader, params = {}, opts = {}); end + + # Initiates a refund on a Reader + sig { + params(params: T.any(::Stripe::Terminal::Reader::RefundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def refund_payment(params = {}, opts = {}); end + + # Initiates a refund on a Reader + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::RefundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.refund_payment(reader, params = {}, opts = {}); end + + # Sets reader display to show cart details. + sig { + params(params: T.any(::Stripe::Terminal::Reader::SetReaderDisplayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def set_reader_display(params = {}, opts = {}); end + + # Sets reader display to show cart details. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::Reader::SetReaderDisplayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.set_reader_display(reader, params = {}, opts = {}); end + + # Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::Terminal::Reader::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def self.update(id, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/terminal/reader_collected_data.rbi b/rbi/stripe/resources/terminal/reader_collected_data.rbi index fe0db0af9..826500a95 100644 --- a/rbi/stripe/resources/terminal/reader_collected_data.rbi +++ b/rbi/stripe/resources/terminal/reader_collected_data.rbi @@ -7,27 +7,35 @@ module Stripe # Returns data collected by Terminal readers. This data is only stored for 24 hours. class ReaderCollectedData < APIResource class Magstripe < Stripe::StripeObject + # The raw magstripe data collected by the reader. sig { returns(T.nilable(String)) } attr_reader :data end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(Magstripe)) } # The magstripe data collected by the reader. + sig { returns(T.nilable(Magstripe)) } attr_reader :magstripe - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The type of data collected by the reader. + sig { returns(String) } attr_reader :type + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/test_helpers/test_clock.rbi b/rbi/stripe/resources/test_helpers/test_clock.rbi index 8beba43e9..30ff12de4 100644 --- a/rbi/stripe/resources/test_helpers/test_clock.rbi +++ b/rbi/stripe/resources/test_helpers/test_clock.rbi @@ -10,42 +10,130 @@ module Stripe class TestClock < APIResource class StatusDetails < Stripe::StripeObject class Advancing < Stripe::StripeObject + # The `frozen_time` that the Test Clock is advancing towards. sig { returns(Integer) } attr_reader :target_frozen_time end + # Attribute for field advancing sig { returns(Advancing) } attr_reader :advancing end - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. - attr_reader :created sig { returns(Integer) } + attr_reader :created # Time at which this clock is scheduled to auto delete. - attr_reader :deletes_after sig { returns(Integer) } + attr_reader :deletes_after # Time at which all objects belonging to this clock are frozen. + sig { returns(Integer) } attr_reader :frozen_time - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(String)) } # The custom name supplied at creation. + sig { returns(T.nilable(String)) } attr_reader :name - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The status of the Test Clock. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The initial frozen time for this test clock. + sig { returns(Integer) } + attr_accessor :frozen_time + # The name for this test clock. + sig { returns(String) } + attr_accessor :name + sig { params(expand: T::Array[String], frozen_time: Integer, name: String).void } + def initialize(expand: nil, frozen_time: nil, name: nil); end + end + class AdvanceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + sig { returns(Integer) } + attr_accessor :frozen_time + sig { params(expand: T::Array[String], frozen_time: Integer).void } + def initialize(expand: nil, frozen_time: nil); end + end + # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. + sig { + params(params: T.any(::Stripe::TestHelpers::TestClock::AdvanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def advance(params = {}, opts = {}); end + + # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. + sig { + params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClock::AdvanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def self.advance(test_clock, params = {}, opts = {}); end + + # Creates a new test clock that can be attached to new customers and quotes. + sig { + params(params: T.any(::Stripe::TestHelpers::TestClock::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def self.create(params = {}, opts = {}); end + + # Deletes a test clock. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::TestClock::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def self.delete(id, params = {}, opts = {}); end + + # Deletes a test clock. + sig { + params(params: T.any(::Stripe::TestHelpers::TestClock::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your test clocks. + sig { + params(params: T.any(::Stripe::TestHelpers::TestClock::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/token.rbi b/rbi/stripe/resources/token.rbi index 0c81fe46e..89df20575 100644 --- a/rbi/stripe/resources/token.rbi +++ b/rbi/stripe/resources/token.rbi @@ -24,7 +24,6 @@ module Stripe # [Radar](https://stripe.com/docs/radar), our integrated solution for automatic fraud protection, # performs best with integrations that use client-side tokenization. class Token < APIResource - sig { returns(Stripe::BankAccount) } # These bank accounts are payment methods on `Customer` objects. # # On the other hand [External Accounts](/api#external_accounts) are transfer @@ -32,34 +31,1141 @@ module Stripe # They can be bank accounts or debit cards as well, and are documented in the links above. # # Related guide: [Bank debits and transfers](/payments/bank-debits-transfers) + sig { returns(Stripe::BankAccount) } attr_reader :bank_account - sig { returns(Stripe::Card) } # You can store multiple cards on a customer in order to charge the customer # later. You can also store multiple debit cards on a recipient in order to # transfer to those cards later. # # Related guide: [Card payments with Sources](https://stripe.com/docs/sources/cards) + sig { returns(Stripe::Card) } attr_reader :card - sig { returns(T.nilable(String)) } # IP address of the client that generates the token. + sig { returns(T.nilable(String)) } attr_reader :client_ip - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Type of the token: `account`, `bank_account`, `card`, or `pii`. + sig { returns(String) } attr_reader :type - sig { returns(T::Boolean) } # Determines if you have already used this token (you can only use tokens once). + sig { returns(T::Boolean) } attr_reader :used + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class Account < Stripe::RequestParams + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document verifying the business. + sig { returns(::Stripe::Token::CreateParams::Account::Company::Verification::Document) } + attr_accessor :document + sig { + params(document: ::Stripe::Token::CreateParams::Account::Company::Verification::Document).void + } + def initialize(document: nil); end + end + # The company's primary address. + sig { returns(::Stripe::Token::CreateParams::Account::Company::Address) } + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + sig { returns(::Stripe::Token::CreateParams::Account::Company::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + sig { returns(::Stripe::Token::CreateParams::Account::Company::AddressKanji) } + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + sig { returns(T::Boolean) } + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + sig { returns(T::Boolean) } + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + sig { returns(String) } + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + sig { returns(String) } + attr_accessor :export_purpose_code + # The company's legal name. + sig { returns(String) } + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + sig { returns(T::Boolean) } + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + sig { returns(::Stripe::Token::CreateParams::Account::Company::OwnershipDeclaration) } + attr_accessor :ownership_declaration + # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. + sig { returns(T::Boolean) } + attr_accessor :ownership_declaration_shown_and_signed + # The company's phone number (used for verification). + sig { returns(String) } + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + sig { returns(String) } + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + sig { returns(T.nilable(String)) } + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + sig { returns(String) } + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + sig { returns(String) } + attr_accessor :tax_id_registrar + # The VAT number of the company. + sig { returns(String) } + attr_accessor :vat_id + # Information on the verification state of the company. + sig { returns(::Stripe::Token::CreateParams::Account::Company::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::Token::CreateParams::Account::Company::Address, address_kana: ::Stripe::Token::CreateParams::Account::Company::AddressKana, address_kanji: ::Stripe::Token::CreateParams::Account::Company::AddressKanji, directors_provided: T::Boolean, executives_provided: T::Boolean, export_license_id: String, export_purpose_code: String, name: String, name_kana: String, name_kanji: String, owners_provided: T::Boolean, ownership_declaration: ::Stripe::Token::CreateParams::Account::Company::OwnershipDeclaration, ownership_declaration_shown_and_signed: T::Boolean, phone: String, registration_number: String, structure: T.nilable(String), tax_id: String, tax_id_registrar: String, vat_id: String, verification: ::Stripe::Token::CreateParams::Account::Company::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + ownership_declaration_shown_and_signed: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ); end + end + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(director: T::Boolean, executive: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), title: String).void + } + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::Token::CreateParams::Account::Individual::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::Token::CreateParams::Account::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(additional_document: ::Stripe::Token::CreateParams::Account::Individual::Verification::AdditionalDocument, document: ::Stripe::Token::CreateParams::Account::Individual::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # The individual's primary address. + sig { returns(::Stripe::Token::CreateParams::Account::Individual::Address) } + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + sig { returns(::Stripe::Token::CreateParams::Account::Individual::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + sig { returns(::Stripe::Token::CreateParams::Account::Individual::AddressKanji) } + attr_accessor :address_kanji + # The individual's date of birth. + sig { returns(T.nilable(::Stripe::Token::CreateParams::Account::Individual::Dob)) } + attr_accessor :dob + # The individual's email address. + sig { returns(String) } + attr_accessor :email + # The individual's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The individual's gender + sig { returns(String) } + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The individual's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The individual's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The individual's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The individual's registered address. + sig { returns(::Stripe::Token::CreateParams::Account::Individual::RegisteredAddress) } + attr_accessor :registered_address + # Describes the person’s relationship to the account. + sig { returns(::Stripe::Token::CreateParams::Account::Individual::Relationship) } + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The individual's verification document information. + sig { returns(::Stripe::Token::CreateParams::Account::Individual::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::Token::CreateParams::Account::Individual::Address, address_kana: ::Stripe::Token::CreateParams::Account::Individual::AddressKana, address_kanji: ::Stripe::Token::CreateParams::Account::Individual::AddressKanji, dob: T.nilable(::Stripe::Token::CreateParams::Account::Individual::Dob), email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), phone: String, political_exposure: String, registered_address: ::Stripe::Token::CreateParams::Account::Individual::RegisteredAddress, relationship: ::Stripe::Token::CreateParams::Account::Individual::Relationship, ssn_last_4: String, verification: ::Stripe::Token::CreateParams::Account::Individual::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + # The business type. + sig { returns(String) } + attr_accessor :business_type + # Information about the company or business. + sig { returns(::Stripe::Token::CreateParams::Account::Company) } + attr_accessor :company + # Information about the person represented by the account. + sig { returns(::Stripe::Token::CreateParams::Account::Individual) } + attr_accessor :individual + # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { + params(business_type: String, company: ::Stripe::Token::CreateParams::Account::Company, individual: ::Stripe::Token::CreateParams::Account::Individual, tos_shown_and_accepted: T::Boolean).void + } + def initialize( + business_type: nil, + company: nil, + individual: nil, + tos_shown_and_accepted: nil + ); end + end + class BankAccount < Stripe::RequestParams + # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + sig { returns(String) } + attr_accessor :account_type + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. + sig { returns(String) } + attr_accessor :payment_method + # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_name: String, account_holder_type: String, account_number: String, account_type: String, country: String, currency: String, payment_method: String, routing_number: String).void + } + def initialize( + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + account_type: nil, + country: nil, + currency: nil, + payment_method: nil, + routing_number: nil + ); end + end + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + sig { returns(String) } + attr_accessor :preferred + sig { params(preferred: String).void } + def initialize(preferred: nil); end + end + # City / District / Suburb / Town / Village. + sig { returns(String) } + attr_accessor :address_city + # Billing address country, if provided. + sig { returns(String) } + attr_accessor :address_country + # Address line 1 (Street address / PO Box / Company name). + sig { returns(String) } + attr_accessor :address_line1 + # Address line 2 (Apartment / Suite / Unit / Building). + sig { returns(String) } + attr_accessor :address_line2 + # State / County / Province / Region. + sig { returns(String) } + attr_accessor :address_state + # ZIP or postal code. + sig { returns(String) } + attr_accessor :address_zip + # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. + sig { returns(String) } + attr_accessor :currency + # Card security code. Highly recommended to always include this value. + sig { returns(String) } + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + sig { returns(String) } + attr_accessor :exp_month + # Two- or four-digit number representing the card's expiration year. + sig { returns(String) } + attr_accessor :exp_year + # Cardholder's full name. + sig { returns(String) } + attr_accessor :name + # Contains information about card networks used to process the payment. + sig { returns(::Stripe::Token::CreateParams::Card::Networks) } + attr_accessor :networks + # The card number, as a string without any separators. + sig { returns(String) } + attr_accessor :number + sig { + params(address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: String, exp_year: String, name: String, networks: ::Stripe::Token::CreateParams::Card::Networks, number: String).void + } + def initialize( + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + networks: nil, + number: nil + ); end + end + class CvcUpdate < Stripe::RequestParams + # The CVC value, in string form. + sig { returns(String) } + attr_accessor :cvc + sig { params(cvc: String).void } + def initialize(cvc: nil); end + end + class Person < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + sig { returns(::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances::Account) } + attr_accessor :account + sig { + params(account: ::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances::Account).void + } + def initialize(account: nil); end + end + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + sig { returns(::Stripe::Token::CreateParams::Person::Documents::CompanyAuthorization) } + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + sig { returns(::Stripe::Token::CreateParams::Person::Documents::Passport) } + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + sig { returns(::Stripe::Token::CreateParams::Person::Documents::Visa) } + attr_accessor :visa + sig { + params(company_authorization: ::Stripe::Token::CreateParams::Person::Documents::CompanyAuthorization, passport: ::Stripe::Token::CreateParams::Person::Documents::Passport, visa: ::Stripe::Token::CreateParams::Person::Documents::Visa).void + } + def initialize(company_authorization: nil, passport: nil, visa: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + sig { returns(T::Boolean) } + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(authorizer: T::Boolean, director: T::Boolean, executive: T::Boolean, legal_guardian: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), representative: T::Boolean, title: String).void + } + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { returns(::Stripe::Token::CreateParams::Person::Verification::AdditionalDocument) } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { returns(::Stripe::Token::CreateParams::Person::Verification::Document) } + attr_accessor :document + sig { + params(additional_document: ::Stripe::Token::CreateParams::Person::Verification::AdditionalDocument, document: ::Stripe::Token::CreateParams::Person::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + sig { returns(::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances) } + attr_accessor :additional_tos_acceptances + # The person's address. + sig { returns(::Stripe::Token::CreateParams::Person::Address) } + attr_accessor :address + # The Kana variation of the person's address (Japan only). + sig { returns(::Stripe::Token::CreateParams::Person::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + sig { returns(::Stripe::Token::CreateParams::Person::AddressKanji) } + attr_accessor :address_kanji + # The person's date of birth. + sig { returns(T.nilable(::Stripe::Token::CreateParams::Person::Dob)) } + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::Token::CreateParams::Person::Documents) } + attr_accessor :documents + # The person's email address. + sig { returns(String) } + attr_accessor :email + # The person's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + sig { returns(String) } + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The person's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The person's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + sig { returns(String) } + attr_accessor :nationality + # The person's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The person's registered address. + sig { returns(::Stripe::Token::CreateParams::Person::RegisteredAddress) } + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + sig { returns(::Stripe::Token::CreateParams::Person::Relationship) } + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The person's verification status. + sig { returns(::Stripe::Token::CreateParams::Person::Verification) } + attr_accessor :verification + sig { + params(additional_tos_acceptances: ::Stripe::Token::CreateParams::Person::AdditionalTosAcceptances, address: ::Stripe::Token::CreateParams::Person::Address, address_kana: ::Stripe::Token::CreateParams::Person::AddressKana, address_kanji: ::Stripe::Token::CreateParams::Person::AddressKanji, dob: T.nilable(::Stripe::Token::CreateParams::Person::Dob), documents: ::Stripe::Token::CreateParams::Person::Documents, email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), nationality: String, phone: String, political_exposure: String, registered_address: ::Stripe::Token::CreateParams::Person::RegisteredAddress, relationship: ::Stripe::Token::CreateParams::Person::Relationship, ssn_last_4: String, verification: ::Stripe::Token::CreateParams::Person::Verification).void + } + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class Pii < Stripe::RequestParams + # The `id_number` for the PII, in string form. + sig { returns(String) } + attr_accessor :id_number + sig { params(id_number: String).void } + def initialize(id_number: nil); end + end + # Information for the account this token represents. + sig { returns(::Stripe::Token::CreateParams::Account) } + attr_accessor :account + # The bank account this token will represent. + sig { returns(::Stripe::Token::CreateParams::BankAccount) } + attr_accessor :bank_account + # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. + sig { returns(T.any(::Stripe::Token::CreateParams::Card, String)) } + attr_accessor :card + # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + sig { returns(String) } + attr_accessor :customer + # The updated CVC value this token represents. + sig { returns(::Stripe::Token::CreateParams::CvcUpdate) } + attr_accessor :cvc_update + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information for the person this token represents. + sig { returns(::Stripe::Token::CreateParams::Person) } + attr_accessor :person + # The PII this token represents. + sig { returns(::Stripe::Token::CreateParams::Pii) } + attr_accessor :pii + sig { + params(account: ::Stripe::Token::CreateParams::Account, bank_account: ::Stripe::Token::CreateParams::BankAccount, card: T.any(::Stripe::Token::CreateParams::Card, String), customer: String, cvc_update: ::Stripe::Token::CreateParams::CvcUpdate, expand: T::Array[String], person: ::Stripe::Token::CreateParams::Person, pii: ::Stripe::Token::CreateParams::Pii).void + } + def initialize( + account: nil, + bank_account: nil, + card: nil, + customer: nil, + cvc_update: nil, + expand: nil, + person: nil, + pii: nil + ); end + end + # Creates a single-use token that represents a bank account's details. + # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + sig { + params(params: T.any(::Stripe::Token::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Token) + } + def self.create(params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/topup.rbi b/rbi/stripe/resources/topup.rbi index 98c75e6ea..c5ef80ca8 100644 --- a/rbi/stripe/resources/topup.rbi +++ b/rbi/stripe/resources/topup.rbi @@ -9,53 +9,217 @@ module Stripe # # Related guide: [Topping up your platform account](https://stripe.com/docs/connect/top-ups) class Topup < APIResource - sig { returns(Integer) } # Amount transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # ID of the balance transaction that describes the impact of this top-up on your account balance. May not be specified depending on status of top-up. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(Integer)) } # Date the funds are expected to arrive in your Stripe account for payouts. This factors in delays like weekends or bank holidays. May not be specified depending on status of top-up. + sig { returns(T.nilable(Integer)) } attr_reader :expected_availability_date - sig { returns(T.nilable(String)) } # Error code explaining reason for top-up failure if available (see [the errors section](https://stripe.com/docs/api#errors) for a list of codes). - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code # Message to user further explaining reason for top-up failure if available. + sig { returns(T.nilable(String)) } attr_reader :failure_message - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Stripe::Source)) } # The source field is deprecated. It might not always be present in the API response. + sig { returns(T.nilable(Stripe::Source)) } attr_reader :source - sig { returns(T.nilable(String)) } # Extra information about a top-up. This will appear on your source's bank statement. It must contain at least one letter. + sig { returns(T.nilable(String)) } attr_reader :statement_descriptor - sig { returns(String) } # The status of the top-up is either `canceled`, `failed`, `pending`, `reversed`, or `succeeded`. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(String)) } # A string that identifies this top-up as part of a group. + sig { returns(T.nilable(String)) } attr_reader :transfer_group + class ListParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A positive integer representing how much to transfer. + sig { returns(T.any(::Stripe::Topup::ListParams::Amount, Integer)) } + attr_accessor :amount + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::Topup::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + sig { returns(String) } + attr_accessor :status + sig { + params(amount: T.any(::Stripe::Topup::ListParams::Amount, Integer), created: T.any(::Stripe::Topup::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + amount: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # A positive integer representing how much to transfer. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + sig { returns(String) } + attr_accessor :source + # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + sig { returns(String) } + attr_accessor :statement_descriptor + # A string that identifies this top-up as part of a group. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), source: String, statement_descriptor: String, transfer_group: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + metadata: nil, + source: nil, + statement_descriptor: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels a top-up. Only pending top-ups can be canceled. + sig { + params(params: T.any(::Stripe::Topup::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def cancel(params = {}, opts = {}); end + + # Cancels a top-up. Only pending top-ups can be canceled. + sig { + params(topup: String, params: T.any(::Stripe::Topup::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def self.cancel(topup, params = {}, opts = {}); end + + # Top up the balance of an account + sig { + params(params: T.any(::Stripe::Topup::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of top-ups. + sig { + params(params: T.any(::Stripe::Topup::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the metadata of a top-up. Other top-up details are not editable by design. + sig { + params(id: String, params: T.any(::Stripe::Topup::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/transfer.rbi b/rbi/stripe/resources/transfer.rbi index 40b84eadf..ddb87d7ab 100644 --- a/rbi/stripe/resources/transfer.rbi +++ b/rbi/stripe/resources/transfer.rbi @@ -14,56 +14,191 @@ module Stripe # # Related guide: [Creating separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) class Transfer < APIResource - sig { returns(Integer) } # Amount in cents (or local equivalent) to be transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Amount in cents (or local equivalent) reversed (can be less than the amount attribute on the transfer if a partial reversal was issued). + sig { returns(Integer) } attr_reader :amount_reversed - sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } # Balance transaction that describes the impact of this transfer on your account balance. + sig { returns(T.nilable(T.any(String, Stripe::BalanceTransaction))) } attr_reader :balance_transaction - sig { returns(Integer) } # Time that this record of the transfer was first created. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(T.any(String, Stripe::Account))) } # ID of the Stripe account the transfer was sent to. + sig { returns(T.nilable(T.any(String, Stripe::Account))) } attr_reader :destination - sig { returns(T.any(String, Stripe::Charge)) } # If the destination is a Stripe account, this will be the ID of the payment that the destination account received for the transfer. + sig { returns(T.any(String, Stripe::Charge)) } attr_reader :destination_payment - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Stripe::ListObject) } # A list of reversals that have been applied to the transfer. + sig { returns(Stripe::ListObject) } attr_reader :reversals - sig { returns(T::Boolean) } # Whether the transfer has been fully reversed. If the transfer is only partially reversed, this attribute will still be false. + sig { returns(T::Boolean) } attr_reader :reversed - sig { returns(T.nilable(T.any(String, Stripe::Charge))) } # ID of the charge that was used to fund the transfer. If null, the transfer was funded from the available balance. + sig { returns(T.nilable(T.any(String, Stripe::Charge))) } attr_reader :source_transaction - sig { returns(String) } # The source balance this transfer came from. One of `card`, `fpx`, or `bank_account`. + sig { returns(String) } attr_reader :source_type - sig { returns(T.nilable(String)) } # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(T.nilable(String)) } attr_reader :transfer_group + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return transfers that were created during the given date interval. + sig { returns(T.any(::Stripe::Transfer::ListParams::Created, Integer)) } + attr_accessor :created + # Only return transfers for the destination specified by this account ID. + sig { returns(String) } + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return transfers with the specified transfer group. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(created: T.any(::Stripe::Transfer::ListParams::Created, Integer), destination: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, transfer_group: String).void + } + def initialize( + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ); end + end + class CreateParams < Stripe::RequestParams + # A positive integer in cents (or local equivalent) representing how much to transfer. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The ID of a connected Stripe account. See the Connect documentation for details. + sig { returns(String) } + attr_accessor :destination + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. + sig { returns(String) } + attr_accessor :source_transaction + # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + sig { returns(String) } + attr_accessor :source_type + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, currency: String, description: String, destination: String, expand: T::Array[String], metadata: T::Hash[String, String], source_transaction: String, source_type: String, transfer_group: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + source_transaction: nil, + source_type: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. + sig { + params(params: T.any(::Stripe::Transfer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. + sig { + params(params: T.any(::Stripe::Transfer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + # + # This request accepts only metadata as an argument. + sig { + params(id: String, params: T.any(::Stripe::Transfer::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/credit_reversal.rbi b/rbi/stripe/resources/treasury/credit_reversal.rbi index 973ec06af..9acc2a643 100644 --- a/rbi/stripe/resources/treasury/credit_reversal.rbi +++ b/rbi/stripe/resources/treasury/credit_reversal.rbi @@ -7,51 +7,120 @@ module Stripe # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. class CreditReversal < APIResource class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the CreditReversal changed status to `posted` sig { returns(T.nilable(Integer)) } attr_reader :posted_at end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # The FinancialAccount to reverse funds from. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The rails used to reverse the funds. - attr_reader :network sig { returns(String) } + attr_reader :network # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The ReceivedCredit being reversed. - attr_reader :received_credit sig { returns(String) } + attr_reader :received_credit # Status of the CreditReversal + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return CreditReversals for the ReceivedCredit ID. + sig { returns(String) } + attr_accessor :received_credit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return CreditReversals for a given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, received_credit: String, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_credit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ReceivedCredit to reverse. + sig { returns(String) } + attr_accessor :received_credit + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], received_credit: String).void + } + def initialize(expand: nil, metadata: nil, received_credit: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Reverses a ReceivedCredit and creates a CreditReversal object. + sig { + params(params: T.any(::Stripe::Treasury::CreditReversal::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::CreditReversal) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of CreditReversals. + sig { + params(params: T.any(::Stripe::Treasury::CreditReversal::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/debit_reversal.rbi b/rbi/stripe/resources/treasury/debit_reversal.rbi index d611cf1df..401ab72e3 100644 --- a/rbi/stripe/resources/treasury/debit_reversal.rbi +++ b/rbi/stripe/resources/treasury/debit_reversal.rbi @@ -7,58 +7,132 @@ module Stripe # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. class DebitReversal < APIResource class LinkedFlows < Stripe::StripeObject + # Set if there is an Issuing dispute associated with the DebitReversal. sig { returns(T.nilable(String)) } attr_reader :issuing_dispute end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the DebitReversal changed status to `completed`. sig { returns(T.nilable(Integer)) } attr_reader :completed_at end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # The FinancialAccount to reverse funds from. - attr_reader :financial_account sig { returns(T.nilable(String)) } + attr_reader :financial_account # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(LinkedFlows)) } # Other flows linked to a DebitReversal. + sig { returns(T.nilable(LinkedFlows)) } attr_reader :linked_flows - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # The rails used to reverse the funds. - attr_reader :network sig { returns(String) } + attr_reader :network # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The ReceivedDebit being reversed. - attr_reader :received_debit sig { returns(String) } + attr_reader :received_debit # Status of the DebitReversal + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return DebitReversals for the ReceivedDebit ID. + sig { returns(String) } + attr_accessor :received_debit + # Only return DebitReversals for a given resolution. + sig { returns(String) } + attr_accessor :resolution + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return DebitReversals for a given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, received_debit: String, resolution: String, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_debit: nil, + resolution: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ReceivedDebit to reverse. + sig { returns(String) } + attr_accessor :received_debit + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], received_debit: String).void + } + def initialize(expand: nil, metadata: nil, received_debit: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Reverses a ReceivedDebit and creates a DebitReversal object. + sig { + params(params: T.any(::Stripe::Treasury::DebitReversal::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::DebitReversal) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of DebitReversals. + sig { + params(params: T.any(::Stripe::Treasury::DebitReversal::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/financial_account.rbi b/rbi/stripe/resources/treasury/financial_account.rbi index eff745d44..128ba5cc5 100644 --- a/rbi/stripe/resources/treasury/financial_account.rbi +++ b/rbi/stripe/resources/treasury/financial_account.rbi @@ -8,99 +8,795 @@ module Stripe # FinancialAccounts serve as the source and destination of Treasury's money movement APIs. class FinancialAccount < APIResource class Balance < Stripe::StripeObject + # Funds the user can spend right now. sig { returns(T::Hash[String, Integer]) } attr_reader :cash + # Funds not spendable yet, but will become available at a later time. sig { returns(T::Hash[String, Integer]) } attr_reader :inbound_pending + # Funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(T::Hash[String, Integer]) } attr_reader :outbound_pending end class FinancialAddress < Stripe::StripeObject class Aba < Stripe::StripeObject + # The name of the person or business that owns the bank account. sig { returns(String) } attr_reader :account_holder_name + # The account number. sig { returns(T.nilable(String)) } attr_reader :account_number + # The last four characters of the account number. sig { returns(String) } attr_reader :account_number_last4 + # Name of the bank. sig { returns(String) } attr_reader :bank_name + # Routing number for the account. sig { returns(String) } attr_reader :routing_number end + # ABA Records contain U.S. bank account details per the ABA format. sig { returns(Aba) } attr_reader :aba + # The list of networks that the address supports sig { returns(T::Array[String]) } attr_reader :supported_networks + # The type of financial address sig { returns(String) } attr_reader :type end class PlatformRestrictions < Stripe::StripeObject + # Restricts all inbound money movement. sig { returns(T.nilable(String)) } attr_reader :inbound_flows + # Restricts all outbound money movement. sig { returns(T.nilable(String)) } attr_reader :outbound_flows end class StatusDetails < Stripe::StripeObject class Closed < Stripe::StripeObject + # The array that contains reasons for a FinancialAccount closure. sig { returns(T::Array[String]) } attr_reader :reasons end + # Details related to the closure of this FinancialAccount sig { returns(T.nilable(Closed)) } attr_reader :closed end - sig { returns(T::Array[String]) } # The array of paths to active Features in the Features hash. + sig { returns(T::Array[String]) } attr_reader :active_features - sig { returns(Balance) } # Balance information for the FinancialAccount + sig { returns(Balance) } attr_reader :balance - sig { returns(String) } # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } attr_reader :country - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + sig { returns(T.nilable(String)) } attr_reader :display_name - sig { returns(Stripe::Treasury::FinancialAccountFeatures) } # Encodes whether a FinancialAccount has access to a particular Feature, with a `status` enum and associated `status_details`. # Stripe or the platform can control Features via the requested field. + sig { returns(Stripe::Treasury::FinancialAccountFeatures) } attr_reader :features - sig { returns(T::Array[FinancialAddress]) } # The set of credentials that resolve to a FinancialAccount. + sig { returns(T::Array[FinancialAddress]) } attr_reader :financial_addresses - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T::Array[String]) } # The array of paths to pending Features in the Features hash. + sig { returns(T::Array[String]) } attr_reader :pending_features - sig { returns(T.nilable(PlatformRestrictions)) } # The set of functionalities that the platform can restrict on the FinancialAccount. + sig { returns(T.nilable(PlatformRestrictions)) } attr_reader :platform_restrictions - sig { returns(T::Array[String]) } # The array of paths to restricted Features in the Features hash. + sig { returns(T::Array[String]) } attr_reader :restricted_features - sig { returns(String) } # Status of this FinancialAccount. + sig { returns(String) } attr_reader :status - sig { returns(StatusDetails) } # Attribute for field status_details + sig { returns(StatusDetails) } attr_reader :status_details - sig { returns(T::Array[String]) } # The currencies the FinancialAccount can hold a balance in. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. + sig { returns(T::Array[String]) } attr_reader :supported_currencies + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return FinancialAccounts that were created during the given date interval. + sig { returns(T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer)) } + attr_accessor :created + # An object ID cursor for use in pagination. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit ranging from 1 to 100 (defaults to 10). + sig { returns(Integer) } + attr_accessor :limit + # An object ID cursor for use in pagination. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Treasury::FinancialAccount::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + sig { returns(String) } + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(bank: String, requested: T::Boolean).void } + def initialize(bank: nil, requested: nil); end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses::Aba) + } + attr_accessor :aba + sig { + params(aba: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses::Aba).void + } + def initialize(aba: nil); end + end + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH Debits via the InboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers::Ach) + } + attr_accessor :ach + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers::Ach).void + } + def initialize(ach: nil); end + end + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + sig { returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::CardIssuing) } + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::DepositInsurance) + } + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses) + } + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers) + } + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::IntraStripeFlows) + } + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments) + } + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers) + } + attr_accessor :outbound_transfers + sig { + params(card_issuing: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::CardIssuing, deposit_insurance: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::DepositInsurance, financial_addresses: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::FinancialAddresses, inbound_transfers: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::InboundTransfers, intra_stripe_flows: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::IntraStripeFlows, outbound_payments: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundPayments, outbound_transfers: ::Stripe::Treasury::FinancialAccount::CreateParams::Features::OutboundTransfers).void + } + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ); end + end + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + sig { returns(String) } + attr_accessor :inbound_flows + # Restricts all outbound money movement. + sig { returns(String) } + attr_accessor :outbound_flows + sig { params(inbound_flows: String, outbound_flows: String).void } + def initialize(inbound_flows: nil, outbound_flows: nil); end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + sig { returns(T.nilable(String)) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + sig { returns(::Stripe::Treasury::FinancialAccount::CreateParams::Features) } + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + sig { returns(::Stripe::Treasury::FinancialAccount::CreateParams::PlatformRestrictions) } + attr_accessor :platform_restrictions + # The currencies the FinancialAccount can hold a balance in. + sig { returns(T::Array[String]) } + attr_accessor :supported_currencies + sig { + params(display_name: T.nilable(String), expand: T::Array[String], features: ::Stripe::Treasury::FinancialAccount::CreateParams::Features, metadata: T::Hash[String, String], platform_restrictions: ::Stripe::Treasury::FinancialAccount::CreateParams::PlatformRestrictions, supported_currencies: T::Array[String]).void + } + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil, + supported_currencies: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + sig { returns(String) } + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(bank: String, requested: T::Boolean).void } + def initialize(bank: nil, requested: nil); end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses::Aba) + } + attr_accessor :aba + sig { + params(aba: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses::Aba).void + } + def initialize(aba: nil); end + end + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH Debits via the InboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers::Ach) + } + attr_accessor :ach + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers::Ach).void + } + def initialize(ach: nil); end + end + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + sig { returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::CardIssuing) } + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::DepositInsurance) + } + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses) + } + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers) + } + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::IntraStripeFlows) + } + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments) + } + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers) + } + attr_accessor :outbound_transfers + sig { + params(card_issuing: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::CardIssuing, deposit_insurance: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::DepositInsurance, financial_addresses: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::FinancialAddresses, inbound_transfers: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::InboundTransfers, intra_stripe_flows: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::IntraStripeFlows, outbound_payments: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundPayments, outbound_transfers: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features::OutboundTransfers).void + } + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ); end + end + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + sig { returns(String) } + attr_accessor :inbound_flows + # Restricts all outbound money movement. + sig { returns(String) } + attr_accessor :outbound_flows + sig { params(inbound_flows: String, outbound_flows: String).void } + def initialize(inbound_flows: nil, outbound_flows: nil); end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + sig { returns(T.nilable(String)) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + sig { returns(::Stripe::Treasury::FinancialAccount::UpdateParams::Features) } + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + sig { returns(::Stripe::Treasury::FinancialAccount::UpdateParams::PlatformRestrictions) } + attr_accessor :platform_restrictions + sig { + params(display_name: T.nilable(String), expand: T::Array[String], features: ::Stripe::Treasury::FinancialAccount::UpdateParams::Features, metadata: T::Hash[String, String], platform_restrictions: ::Stripe::Treasury::FinancialAccount::UpdateParams::PlatformRestrictions).void + } + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil + ); end + end + class RetrieveFeaturesParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateFeaturesParams < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + sig { returns(String) } + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(bank: String, requested: T::Boolean).void } + def initialize(bank: nil, requested: nil); end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses::Aba) + } + attr_accessor :aba + sig { + params(aba: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses::Aba).void + } + def initialize(aba: nil); end + end + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH Debits via the InboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers::Ach) + } + attr_accessor :ach + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers::Ach).void + } + def initialize(ach: nil); end + end + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + sig { returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::CardIssuing) } + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::DepositInsurance) + } + attr_accessor :deposit_insurance + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Contains Features that add FinancialAddresses to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses) + } + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers) + } + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::IntraStripeFlows) + } + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments) + } + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers) + } + attr_accessor :outbound_transfers + sig { + params(card_issuing: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::CardIssuing, deposit_insurance: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::DepositInsurance, expand: T::Array[String], financial_addresses: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::FinancialAddresses, inbound_transfers: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::InboundTransfers, intra_stripe_flows: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::IntraStripeFlows, outbound_payments: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundPayments, outbound_transfers: ::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams::OutboundTransfers).void + } + def initialize( + card_issuing: nil, + deposit_insurance: nil, + expand: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ); end + end + # Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::FinancialAccount::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of FinancialAccounts. + sig { + params(params: T.any(::Stripe::Treasury::FinancialAccount::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Retrieves Features information associated with the FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::FinancialAccount::RetrieveFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures) + } + def retrieve_features(params = {}, opts = {}); end + + # Retrieves Features information associated with the FinancialAccount. + sig { + params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccount::RetrieveFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures) + } + def self.retrieve_features(financial_account, params = {}, opts = {}); end + + # Updates the details of a FinancialAccount. + sig { + params(id: String, params: T.any(::Stripe::Treasury::FinancialAccount::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount) + } + def self.update(id, params = {}, opts = {}); end + + # Updates the Features associated with a FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures) + } + def update_features(params = {}, opts = {}); end + + # Updates the Features associated with a FinancialAccount. + sig { + params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccount::UpdateFeaturesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures) + } + def self.update_features(financial_account, params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/financial_account_features.rbi b/rbi/stripe/resources/treasury/financial_account_features.rbi index 672124d22..3c2a4c4e3 100644 --- a/rbi/stripe/resources/treasury/financial_account_features.rbi +++ b/rbi/stripe/resources/treasury/financial_account_features.rbi @@ -9,193 +9,254 @@ module Stripe class FinancialAccountFeatures < APIResource class CardIssuing < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class DepositInsurance < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class FinancialAddresses < Stripe::StripeObject class Aba < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Requested bank partner for this Financial Account sig { returns(String) } attr_reader :bank + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling the ABA address feature sig { returns(Aba) } attr_reader :aba end class InboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling an inbound ACH specific feature sig { returns(Ach) } attr_reader :ach end class IntraStripeFlows < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class OutboundPayments < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling an outbound ACH specific feature sig { returns(Ach) } attr_reader :ach + # Toggle settings for enabling/disabling a feature sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end class OutboundTransfers < Stripe::StripeObject class Ach < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end class UsDomesticWire < Stripe::StripeObject class StatusDetail < Stripe::StripeObject + # Represents the reason why the status is `pending` or `restricted`. sig { returns(String) } attr_reader :code + # Represents what the user should do, if anything, to activate the Feature. sig { returns(T.nilable(String)) } attr_reader :resolution + # The `platform_restrictions` that are restricting this Feature. sig { returns(String) } attr_reader :restriction end + # Whether the FinancialAccount should have the Feature. sig { returns(T::Boolean) } attr_reader :requested + # Whether the Feature is operational. sig { returns(String) } attr_reader :status + # Additional details; includes at least one entry when the status is not `active`. sig { returns(T::Array[StatusDetail]) } attr_reader :status_details end + # Toggle settings for enabling/disabling an outbound ACH specific feature sig { returns(Ach) } attr_reader :ach + # Toggle settings for enabling/disabling a feature sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - sig { returns(CardIssuing) } # Toggle settings for enabling/disabling a feature + sig { returns(CardIssuing) } attr_reader :card_issuing - sig { returns(DepositInsurance) } # Toggle settings for enabling/disabling a feature + sig { returns(DepositInsurance) } attr_reader :deposit_insurance - sig { returns(FinancialAddresses) } # Settings related to Financial Addresses features on a Financial Account + sig { returns(FinancialAddresses) } attr_reader :financial_addresses - sig { returns(InboundTransfers) } # InboundTransfers contains inbound transfers features for a FinancialAccount. + sig { returns(InboundTransfers) } attr_reader :inbound_transfers - sig { returns(IntraStripeFlows) } # Toggle settings for enabling/disabling a feature + sig { returns(IntraStripeFlows) } attr_reader :intra_stripe_flows - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(OutboundPayments) } # Settings related to Outbound Payments features on a Financial Account + sig { returns(OutboundPayments) } attr_reader :outbound_payments - sig { returns(OutboundTransfers) } # OutboundTransfers contains outbound transfers features for a FinancialAccount. + sig { returns(OutboundTransfers) } attr_reader :outbound_transfers end end diff --git a/rbi/stripe/resources/treasury/inbound_transfer.rbi b/rbi/stripe/resources/treasury/inbound_transfer.rbi index 694cf5077..3e2369787 100644 --- a/rbi/stripe/resources/treasury/inbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/inbound_transfer.rbi @@ -9,129 +9,294 @@ module Stripe # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) class InboundTransfer < APIResource class FailureDetails < Stripe::StripeObject + # Reason for the failure. sig { returns(String) } attr_reader :code end class LinkedFlows < Stripe::StripeObject + # If funds for this flow were returned after the flow went to the `succeeded` state, this field contains a reference to the ReceivedDebit return. sig { returns(T.nilable(String)) } attr_reader :received_debit end class OriginPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # The type of the payment method used in the InboundTransfer. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when an InboundTransfer changed status to `canceled`. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Timestamp describing when an InboundTransfer changed status to `failed`. sig { returns(T.nilable(Integer)) } attr_reader :failed_at + # Timestamp describing when an InboundTransfer changed status to `succeeded`. sig { returns(T.nilable(Integer)) } attr_reader :succeeded_at end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Boolean) } # Returns `true` if the InboundTransfer is able to be canceled. + sig { returns(T::Boolean) } attr_reader :cancelable - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T.nilable(FailureDetails)) } # Details about this InboundTransfer's failure. Only set when status is `failed`. + sig { returns(T.nilable(FailureDetails)) } attr_reader :failure_details - sig { returns(String) } # The FinancialAccount that received the funds. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(LinkedFlows) } # Attribute for field linked_flows + sig { returns(LinkedFlows) } attr_reader :linked_flows - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # The origin payment method to be debited for an InboundTransfer. + sig { returns(T.nilable(String)) } attr_reader :origin_payment_method - sig { returns(T.nilable(OriginPaymentMethodDetails)) } # Details about the PaymentMethod for an InboundTransfer. + sig { returns(T.nilable(OriginPaymentMethodDetails)) } attr_reader :origin_payment_method_details - sig { returns(T.nilable(T::Boolean)) } # Returns `true` if the funds for an InboundTransfer were returned after the InboundTransfer went to the `succeeded` state. + sig { returns(T.nilable(T::Boolean)) } attr_reader :returned - sig { returns(String) } # Statement descriptor shown when funds are debited from the source. Not all payment networks support `statement_descriptor`. - attr_reader :statement_descriptor sig { returns(String) } + attr_reader :statement_descriptor # Status of the InboundTransfer: `processing`, `succeeded`, `failed`, and `canceled`. An InboundTransfer is `processing` if it is created and pending. The status changes to `succeeded` once the funds have been "confirmed" and a `transaction` is created and posted. The status changes to `failed` if the transfer fails. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to send funds to. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The origin payment method to be debited for the InboundTransfer. + sig { returns(String) } + attr_accessor :origin_payment_method + # The complete description that appears on your customers' statements. Maximum 10 characters. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], origin_payment_method: String, statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + metadata: nil, + origin_payment_method: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FailParams < Stripe::RequestParams + class FailureDetails < Stripe::RequestParams + # Reason for the failure. + sig { returns(String) } + attr_accessor :code + sig { params(code: String).void } + def initialize(code: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about a failed InboundTransfer. + sig { returns(::Stripe::Treasury::InboundTransfer::FailParams::FailureDetails) } + attr_accessor :failure_details + sig { + params(expand: T::Array[String], failure_details: ::Stripe::Treasury::InboundTransfer::FailParams::FailureDetails).void + } + def initialize(expand: nil, failure_details: nil); end + end + class ReturnInboundTransferParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SucceedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels an InboundTransfer. + sig { + params(params: T.any(::Stripe::Treasury::InboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def cancel(params = {}, opts = {}); end + + # Cancels an InboundTransfer. + sig { + params(inbound_transfer: String, params: T.any(::Stripe::Treasury::InboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def self.cancel(inbound_transfer, params = {}, opts = {}); end + + # Creates an InboundTransfer. + sig { + params(params: T.any(::Stripe::Treasury::InboundTransfer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of InboundTransfers sent from the specified FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::InboundTransfer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/outbound_payment.rbi b/rbi/stripe/resources/treasury/outbound_payment.rbi index 6fdd0acb1..74cb2931e 100644 --- a/rbi/stripe/resources/treasury/outbound_payment.rbi +++ b/rbi/stripe/resources/treasury/outbound_payment.rbi @@ -13,167 +13,577 @@ module Stripe class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject + # Token of the FinancialAccount. sig { returns(String) } attr_reader :id + # The rails used to send funds. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account + # The type of the payment method used in the OutboundPayment. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class EndUserDetails < Stripe::StripeObject + # IP address of the user initiating the OutboundPayment. Set if `present` is set to `true`. IP address collection is required for risk and compliance reasons. This will be used to help determine if the OutboundPayment is authorized or should be blocked. sig { returns(T.nilable(String)) } attr_reader :ip_address + # `true` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. sig { returns(T::Boolean) } attr_reader :present end class ReturnedDetails < Stripe::StripeObject + # Reason for the return. sig { returns(String) } attr_reader :code + # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when an OutboundPayment changed status to `canceled`. sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Timestamp describing when an OutboundPayment changed status to `failed`. sig { returns(T.nilable(Integer)) } attr_reader :failed_at + # Timestamp describing when an OutboundPayment changed status to `posted`. sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Timestamp describing when an OutboundPayment changed status to `returned`. sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundPayment for payments sent over the `ach` network. sig { returns(String) } attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject + # CHIPS System Sequence Number (SSN) of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :chips + # IMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :imad + # OMAD of the OutboundPayment for payments sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :omad end + # Attribute for field ach sig { returns(Ach) } attr_reader :ach + # The US bank account network used to send funds. sig { returns(String) } attr_reader :type + # Attribute for field us_domestic_wire sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Boolean) } # Returns `true` if the object can be canceled, and `false` otherwise. + sig { returns(T::Boolean) } attr_reader :cancelable - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # ID of the [customer](https://stripe.com/docs/api/customers) to whom an OutboundPayment is sent. - attr_reader :customer sig { returns(T.nilable(String)) } + attr_reader :customer # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description sig { returns(T.nilable(String)) } + attr_reader :description # The PaymentMethod via which an OutboundPayment is sent. This field can be empty if the OutboundPayment was created using `destination_payment_method_data`. + sig { returns(T.nilable(String)) } attr_reader :destination_payment_method - sig { returns(T.nilable(DestinationPaymentMethodDetails)) } # Details about the PaymentMethod for an OutboundPayment. + sig { returns(T.nilable(DestinationPaymentMethodDetails)) } attr_reader :destination_payment_method_details - sig { returns(T.nilable(EndUserDetails)) } # Details about the end user. + sig { returns(T.nilable(EndUserDetails)) } attr_reader :end_user_details - sig { returns(Integer) } # The date when funds are expected to arrive in the destination account. + sig { returns(Integer) } attr_reader :expected_arrival_date - sig { returns(String) } # The FinancialAccount that funds were pulled from. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReturnedDetails)) } # Details about a returned OutboundPayment. Only set when the status is `returned`. + sig { returns(T.nilable(ReturnedDetails)) } attr_reader :returned_details - sig { returns(String) } # The description that appears on the receiving end for an OutboundPayment (for example, bank statement for external bank transfer). - attr_reader :statement_descriptor sig { returns(String) } + attr_reader :statement_descriptor # Current status of the OutboundPayment: `processing`, `failed`, `posted`, `returned`, `canceled`. An OutboundPayment is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundPayment has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundPayment fails to arrive at its destination, its status will change to `returned`. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(TrackingDetails)) } # Details about network-specific tracking information if available. + sig { returns(T.nilable(TrackingDetails)) } attr_reader :tracking_details - sig { returns(T.any(String, Stripe::Treasury::Transaction)) } # The Transaction associated with this object. + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return OutboundPayments that were created during the given date interval. + sig { returns(T.any(::Stripe::Treasury::OutboundPayment::ListParams::Created, Integer)) } + attr_accessor :created + # Only return OutboundPayments sent to this customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + sig { returns(String) } + attr_accessor :status + sig { + params(created: T.any(::Stripe::Treasury::OutboundPayment::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodData < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # Required hash if type is set to `us_bank_account`. + sig { + returns(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(billing_details: ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::BillingDetails, financial_account: String, metadata: T::Hash[String, String], type: String, us_bank_account: ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData::UsBankAccount).void + } + def initialize( + billing_details: nil, + financial_account: nil, + metadata: nil, + type: nil, + us_bank_account: nil + ); end + end + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + sig { params(network: String).void } + def initialize(network: nil); end + end + # Optional fields for `us_bank_account`. + sig { + returns(T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(us_bank_account: T.nilable(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)).void + } + def initialize(us_bank_account: nil); end + end + class EndUserDetails < Stripe::RequestParams + # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. + sig { returns(String) } + attr_accessor :ip_address + # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + sig { returns(T::Boolean) } + attr_accessor :present + sig { params(ip_address: String, present: T::Boolean).void } + def initialize(ip_address: nil, present: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + sig { returns(String) } + attr_accessor :destination_payment_method + # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + sig { + returns(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData) + } + attr_accessor :destination_payment_method_data + # Payment method-specific configuration for this OutboundPayment. + sig { + returns(::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions) + } + attr_accessor :destination_payment_method_options + # End user details. + sig { returns(::Stripe::Treasury::OutboundPayment::CreateParams::EndUserDetails) } + attr_accessor :end_user_details + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to pull funds from. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, customer: String, description: String, destination_payment_method: String, destination_payment_method_data: ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodData, destination_payment_method_options: ::Stripe::Treasury::OutboundPayment::CreateParams::DestinationPaymentMethodOptions, end_user_details: ::Stripe::Treasury::OutboundPayment::CreateParams::EndUserDetails, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_data: nil, + destination_payment_method_options: nil, + end_user_details: nil, + expand: nil, + financial_account: nil, + metadata: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + sig { returns(String) } + attr_accessor :trace_id + sig { params(trace_id: String).void } + def initialize(trace_id: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :omad + sig { params(chips: String, imad: String, omad: String).void } + def initialize(chips: nil, imad: nil, omad: nil); end + end + # ACH network tracking details. + sig { returns(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::Ach) } + attr_accessor :ach + # The US bank account network used to send funds. + sig { returns(String) } + attr_accessor :type + # US domestic wire network tracking details. + sig { + returns(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::Ach, type: String, us_domestic_wire: ::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails::UsDomesticWire).void + } + def initialize(ach: nil, type: nil, us_domestic_wire: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about network-specific tracking information. + sig { returns(::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails) } + attr_accessor :tracking_details + sig { + params(expand: T::Array[String], tracking_details: ::Stripe::Treasury::OutboundPayment::UpdateParams::TrackingDetails).void + } + def initialize(expand: nil, tracking_details: nil); end + end + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReturnOutboundPaymentParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # The return code to be set on the OutboundPayment object. + sig { returns(String) } + attr_accessor :code + sig { params(code: String).void } + def initialize(code: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Optional hash to set the return code. + sig { + returns(::Stripe::Treasury::OutboundPayment::ReturnOutboundPaymentParams::ReturnedDetails) + } + attr_accessor :returned_details + sig { + params(expand: T::Array[String], returned_details: ::Stripe::Treasury::OutboundPayment::ReturnOutboundPaymentParams::ReturnedDetails).void + } + def initialize(expand: nil, returned_details: nil); end + end + # Cancel an OutboundPayment. + sig { + params(params: T.any(::Stripe::Treasury::OutboundPayment::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def cancel(params = {}, opts = {}); end + + # Cancel an OutboundPayment. + sig { + params(id: String, params: T.any(::Stripe::Treasury::OutboundPayment::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def self.cancel(id, params = {}, opts = {}); end + + # Creates an OutboundPayment. + sig { + params(params: T.any(::Stripe::Treasury::OutboundPayment::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of OutboundPayments sent from the specified FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::OutboundPayment::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/outbound_transfer.rbi b/rbi/stripe/resources/treasury/outbound_transfer.rbi index fdca99065..a57f3b516 100644 --- a/rbi/stripe/resources/treasury/outbound_transfer.rbi +++ b/rbi/stripe/resources/treasury/outbound_transfer.rbi @@ -13,160 +13,434 @@ module Stripe class DestinationPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class UsBankAccount < Stripe::StripeObject + # Account holder type: individual or company. sig { returns(T.nilable(String)) } attr_reader :account_holder_type + # Account type: checkings or savings. Defaults to checking if omitted. sig { returns(T.nilable(String)) } attr_reader :account_type + # Name of the bank associated with the bank account. sig { returns(T.nilable(String)) } attr_reader :bank_name + # Uniquely identifies this particular bank account. You can use this attribute to check whether two bank accounts are the same. sig { returns(T.nilable(String)) } attr_reader :fingerprint + # Last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # ID of the mandate used to make this payment. sig { returns(T.any(String, Stripe::Mandate)) } attr_reader :mandate + # The network rails used. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. sig { returns(String) } attr_reader :network + # Routing number of the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # The type of the payment method used in the OutboundTransfer. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end + # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach + # The type of flow that originated the OutboundTransfer. sig { returns(String) } attr_reader :type end class ReturnedDetails < Stripe::StripeObject + # Reason for the return. sig { returns(String) } attr_reader :code + # The Transaction associated with this object. sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when an OutboundTransfer changed status to `canceled` sig { returns(T.nilable(Integer)) } attr_reader :canceled_at + # Timestamp describing when an OutboundTransfer changed status to `failed` sig { returns(T.nilable(Integer)) } attr_reader :failed_at + # Timestamp describing when an OutboundTransfer changed status to `posted` sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Timestamp describing when an OutboundTransfer changed status to `returned` sig { returns(T.nilable(Integer)) } attr_reader :returned_at end class TrackingDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH trace ID of the OutboundTransfer for transfers sent over the `ach` network. sig { returns(String) } attr_reader :trace_id end class UsDomesticWire < Stripe::StripeObject + # CHIPS System Sequence Number (SSN) of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :chips + # IMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :imad + # OMAD of the OutboundTransfer for transfers sent over the `us_domestic_wire` network. sig { returns(T.nilable(String)) } attr_reader :omad end + # Attribute for field ach sig { returns(Ach) } attr_reader :ach + # The US bank account network used to send funds. sig { returns(String) } attr_reader :type + # Attribute for field us_domestic_wire sig { returns(UsDomesticWire) } attr_reader :us_domestic_wire end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(T::Boolean) } # Returns `true` if the object can be canceled, and `false` otherwise. + sig { returns(T::Boolean) } attr_reader :cancelable - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(T.nilable(String)) } # An arbitrary string attached to the object. Often useful for displaying to users. - attr_reader :description sig { returns(T.nilable(String)) } + attr_reader :description # The PaymentMethod used as the payment instrument for an OutboundTransfer. + sig { returns(T.nilable(String)) } attr_reader :destination_payment_method - sig { returns(DestinationPaymentMethodDetails) } # Attribute for field destination_payment_method_details + sig { returns(DestinationPaymentMethodDetails) } attr_reader :destination_payment_method_details - sig { returns(Integer) } # The date when funds are expected to arrive in the destination account. + sig { returns(Integer) } attr_reader :expected_arrival_date - sig { returns(String) } # The FinancialAccount that funds were pulled from. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(T.nilable(NetworkDetails)) } # Details about the network used for the OutboundTransfer. + sig { returns(T.nilable(NetworkDetails)) } attr_reader :network_details - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReturnedDetails)) } # Details about a returned OutboundTransfer. Only set when the status is `returned`. + sig { returns(T.nilable(ReturnedDetails)) } attr_reader :returned_details - sig { returns(String) } # Information about the OutboundTransfer to be sent to the recipient account. - attr_reader :statement_descriptor sig { returns(String) } + attr_reader :statement_descriptor # Current status of the OutboundTransfer: `processing`, `failed`, `canceled`, `posted`, `returned`. An OutboundTransfer is `processing` if it has been created and is pending. The status changes to `posted` once the OutboundTransfer has been "confirmed" and funds have left the account, or to `failed` or `canceled`. If an OutboundTransfer fails to arrive at its destination, its status will change to `returned`. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions - sig { returns(T.nilable(TrackingDetails)) } # Details about network-specific tracking information if available. + sig { returns(T.nilable(TrackingDetails)) } attr_reader :tracking_details - sig { returns(T.any(String, Stripe::Treasury::Transaction)) } # The Transaction associated with this object. + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + sig { params(network: String).void } + def initialize(network: nil); end + end + # Optional fields for `us_bank_account`. + sig { + returns(T.nilable(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(us_bank_account: T.nilable(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)).void + } + def initialize(us_bank_account: nil); end + end + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this OutboundTransfer. + sig { returns(String) } + attr_accessor :addenda + sig { params(addenda: String).void } + def initialize(addenda: nil); end + end + # Optional fields for `ach`. + sig { returns(::Stripe::Treasury::OutboundTransfer::CreateParams::NetworkDetails::Ach) } + attr_accessor :ach + # The type of flow that originated the OutboundTransfer. + sig { returns(String) } + attr_accessor :type + sig { + params(ach: ::Stripe::Treasury::OutboundTransfer::CreateParams::NetworkDetails::Ach, type: String).void + } + def initialize(ach: nil, type: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundTransfer. + sig { returns(String) } + attr_accessor :destination_payment_method + # Hash describing payment method configuration details. + sig { + returns(::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions) + } + attr_accessor :destination_payment_method_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to pull funds from. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Details about the network used for the OutboundTransfer. + sig { returns(::Stripe::Treasury::OutboundTransfer::CreateParams::NetworkDetails) } + attr_accessor :network_details + # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, description: String, destination_payment_method: String, destination_payment_method_options: ::Stripe::Treasury::OutboundTransfer::CreateParams::DestinationPaymentMethodOptions, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], network_details: ::Stripe::Treasury::OutboundTransfer::CreateParams::NetworkDetails, statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_options: nil, + expand: nil, + financial_account: nil, + metadata: nil, + network_details: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + sig { returns(String) } + attr_accessor :trace_id + sig { params(trace_id: String).void } + def initialize(trace_id: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :omad + sig { params(chips: String, imad: String, omad: String).void } + def initialize(chips: nil, imad: nil, omad: nil); end + end + # ACH network tracking details. + sig { returns(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::Ach) } + attr_accessor :ach + # The US bank account network used to send funds. + sig { returns(String) } + attr_accessor :type + # US domestic wire network tracking details. + sig { + returns(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::Ach, type: String, us_domestic_wire: ::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails::UsDomesticWire).void + } + def initialize(ach: nil, type: nil, us_domestic_wire: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about network-specific tracking information. + sig { returns(::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails) } + attr_accessor :tracking_details + sig { + params(expand: T::Array[String], tracking_details: ::Stripe::Treasury::OutboundTransfer::UpdateParams::TrackingDetails).void + } + def initialize(expand: nil, tracking_details: nil); end + end + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReturnOutboundTransferParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # Reason for the return. + sig { returns(String) } + attr_accessor :code + sig { params(code: String).void } + def initialize(code: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about a returned OutboundTransfer. + sig { + returns(::Stripe::Treasury::OutboundTransfer::ReturnOutboundTransferParams::ReturnedDetails) + } + attr_accessor :returned_details + sig { + params(expand: T::Array[String], returned_details: ::Stripe::Treasury::OutboundTransfer::ReturnOutboundTransferParams::ReturnedDetails).void + } + def initialize(expand: nil, returned_details: nil); end + end + # An OutboundTransfer can be canceled if the funds have not yet been paid out. + sig { + params(params: T.any(::Stripe::Treasury::OutboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def cancel(params = {}, opts = {}); end + + # An OutboundTransfer can be canceled if the funds have not yet been paid out. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::Treasury::OutboundTransfer::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def self.cancel(outbound_transfer, params = {}, opts = {}); end + + # Creates an OutboundTransfer. + sig { + params(params: T.any(::Stripe::Treasury::OutboundTransfer::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def self.create(params = {}, opts = {}); end + + # Returns a list of OutboundTransfers sent from the specified FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::OutboundTransfer::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/received_credit.rbi b/rbi/stripe/resources/treasury/received_credit.rbi index a293dafdb..2da0a7cd9 100644 --- a/rbi/stripe/resources/treasury/received_credit.rbi +++ b/rbi/stripe/resources/treasury/received_credit.rbi @@ -9,144 +9,333 @@ module Stripe class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject + # The FinancialAccount ID. sig { returns(String) } attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject + # Bank name. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The routing number for the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Set when `type` is `balance`. sig { returns(String) } attr_reader :balance + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. sig { returns(String) } attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject class SourceFlowDetails < Stripe::StripeObject + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment + # A `Payout` object is created when you receive funds from Stripe, or when you + # initiate a payout to either a bank account or debit card of a [connected + # Stripe account](/docs/connect/bank-debit-card-payouts). You can retrieve individual payouts, + # and list all payouts. Payouts are made on [varying + # schedules](/docs/connect/manage-payout-schedule), depending on your country and + # industry. + # + # Related guide: [Receiving payouts](https://stripe.com/docs/payouts) sig { returns(Stripe::Payout) } attr_reader :payout + # The type of the source flow that originated the ReceivedCredit. sig { returns(String) } attr_reader :type end + # The CreditReversal created as a result of this ReceivedCredit being reversed. sig { returns(T.nilable(String)) } attr_reader :credit_reversal + # Set if the ReceivedCredit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. sig { returns(T.nilable(String)) } attr_reader :issuing_authorization + # Set if the ReceivedCredit is also viewable as an [Issuing transaction](https://stripe.com/docs/api#issuing_transactions) object. sig { returns(T.nilable(String)) } attr_reader :issuing_transaction + # ID of the source flow. Set if `network` is `stripe` and the source flow is visible to the user. Examples of source flows include OutboundPayments, payouts, or CreditReversals. sig { returns(T.nilable(String)) } attr_reader :source_flow + # The expandable object of the source flow. sig { returns(T.nilable(SourceFlowDetails)) } attr_reader :source_flow_details + # The type of flow that originated the ReceivedCredit (for example, `outbound_payment`). sig { returns(T.nilable(String)) } attr_reader :source_flow_type end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end + # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach + # The type of flow that originated the ReceivedCredit. sig { returns(String) } attr_reader :type end class ReversalDetails < Stripe::StripeObject + # Time before which a ReceivedCredit can be reversed. sig { returns(T.nilable(Integer)) } attr_reader :deadline + # Set if a ReceivedCredit cannot be reversed. sig { returns(T.nilable(String)) } attr_reader :restricted_reason end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(String)) } # Reason for the failure. A ReceivedCredit might fail because the receiving FinancialAccount is closed or frozen. - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code # The FinancialAccount that received the funds. - attr_reader :financial_account sig { returns(T.nilable(String)) } + attr_reader :financial_account # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(InitiatingPaymentMethodDetails) } # Attribute for field initiating_payment_method_details + sig { returns(InitiatingPaymentMethodDetails) } attr_reader :initiating_payment_method_details - sig { returns(LinkedFlows) } # Attribute for field linked_flows + sig { returns(LinkedFlows) } attr_reader :linked_flows - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The rails used to send the funds. + sig { returns(String) } attr_reader :network - sig { returns(T.nilable(NetworkDetails)) } # Details specific to the money movement rails. + sig { returns(T.nilable(NetworkDetails)) } attr_reader :network_details - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReversalDetails)) } # Details describing when a ReceivedCredit may be reversed. + sig { returns(T.nilable(ReversalDetails)) } attr_reader :reversal_details - sig { returns(String) } # Status of the ReceivedCredit. ReceivedCredits are created either `succeeded` (approved) or `failed` (declined). If a ReceivedCredit is declined, the failure reason can be found in the `failure_code` field. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction + class ListParams < Stripe::RequestParams + class LinkedFlows < Stripe::RequestParams + # The source flow type. + sig { returns(String) } + attr_accessor :source_flow_type + sig { params(source_flow_type: String).void } + def initialize(source_flow_type: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount that received the funds. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return ReceivedCredits described by the flow. + sig { returns(::Stripe::Treasury::ReceivedCredit::ListParams::LinkedFlows) } + attr_accessor :linked_flows + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return ReceivedCredits that have the given status: `succeeded` or `failed`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, linked_flows: ::Stripe::Treasury::ReceivedCredit::ListParams::LinkedFlows, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + linked_flows: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + sig { returns(String) } + attr_accessor :account_holder_name + # The bank account number. + sig { returns(String) } + attr_accessor :account_number + # The bank account's routing number. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_name: String, account_number: String, routing_number: String).void + } + def initialize(account_holder_name: nil, account_number: nil, routing_number: nil); end + end + # The source type. + sig { returns(String) } + attr_accessor :type + # Optional fields for `us_bank_account`. + sig { + returns(::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(type: String, us_bank_account: ::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount).void + } + def initialize(type: nil, us_bank_account: nil); end + end + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH Addenda record + sig { returns(String) } + attr_accessor :addenda + sig { params(addenda: String).void } + def initialize(addenda: nil); end + end + # Optional fields for `ach`. + sig { returns(::Stripe::Treasury::ReceivedCredit::CreateParams::NetworkDetails::Ach) } + attr_accessor :ach + # The type of flow that originated the ReceivedCredit. + sig { returns(String) } + attr_accessor :type + sig { + params(ach: ::Stripe::Treasury::ReceivedCredit::CreateParams::NetworkDetails::Ach, type: String).void + } + def initialize(ach: nil, type: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to send funds to. + sig { returns(String) } + attr_accessor :financial_account + # Initiating payment method details for the object. + sig { + returns(::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails) + } + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + # Details about the network used for the ReceivedCredit. + sig { returns(::Stripe::Treasury::ReceivedCredit::CreateParams::NetworkDetails) } + attr_accessor :network_details + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], financial_account: String, initiating_payment_method_details: ::Stripe::Treasury::ReceivedCredit::CreateParams::InitiatingPaymentMethodDetails, network: String, network_details: ::Stripe::Treasury::ReceivedCredit::CreateParams::NetworkDetails).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ); end + end + # Returns a list of ReceivedCredits. + sig { + params(params: T.any(::Stripe::Treasury::ReceivedCredit::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/received_debit.rbi b/rbi/stripe/resources/treasury/received_debit.rbi index acd5e2a18..2ae7a36ec 100644 --- a/rbi/stripe/resources/treasury/received_debit.rbi +++ b/rbi/stripe/resources/treasury/received_debit.rbi @@ -9,134 +9,297 @@ module Stripe class InitiatingPaymentMethodDetails < Stripe::StripeObject class BillingDetails < Stripe::StripeObject class Address < Stripe::StripeObject + # City, district, suburb, town, or village. sig { returns(T.nilable(String)) } attr_reader :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). sig { returns(T.nilable(String)) } attr_reader :country + # Address line 1 (e.g., street, PO Box, or company name). sig { returns(T.nilable(String)) } attr_reader :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). sig { returns(T.nilable(String)) } attr_reader :line2 + # ZIP or postal code. sig { returns(T.nilable(String)) } attr_reader :postal_code + # State, county, province, or region. sig { returns(T.nilable(String)) } attr_reader :state end + # Attribute for field address sig { returns(Address) } attr_reader :address + # Email address. sig { returns(T.nilable(String)) } attr_reader :email + # Full name. sig { returns(T.nilable(String)) } attr_reader :name end class FinancialAccount < Stripe::StripeObject + # The FinancialAccount ID. sig { returns(String) } attr_reader :id + # The rails the ReceivedCredit was sent over. A FinancialAccount can only send funds over `stripe`. sig { returns(String) } attr_reader :network end class UsBankAccount < Stripe::StripeObject + # Bank name. sig { returns(T.nilable(String)) } attr_reader :bank_name + # The last four digits of the bank account number. sig { returns(T.nilable(String)) } attr_reader :last4 + # The routing number for the bank account. sig { returns(T.nilable(String)) } attr_reader :routing_number end + # Set when `type` is `balance`. sig { returns(String) } attr_reader :balance + # Attribute for field billing_details sig { returns(BillingDetails) } attr_reader :billing_details + # Attribute for field financial_account sig { returns(FinancialAccount) } attr_reader :financial_account + # Set when `type` is `issuing_card`. This is an [Issuing Card](https://stripe.com/docs/api#issuing_cards) ID. sig { returns(String) } attr_reader :issuing_card + # Polymorphic type matching the originating money movement's source. This can be an external account, a Stripe balance, or a FinancialAccount. sig { returns(String) } attr_reader :type + # Attribute for field us_bank_account sig { returns(UsBankAccount) } attr_reader :us_bank_account end class LinkedFlows < Stripe::StripeObject + # The DebitReversal created as a result of this ReceivedDebit being reversed. sig { returns(T.nilable(String)) } attr_reader :debit_reversal + # Set if the ReceivedDebit is associated with an InboundTransfer's return of funds. sig { returns(T.nilable(String)) } attr_reader :inbound_transfer + # Set if the ReceivedDebit was created due to an [Issuing Authorization](https://stripe.com/docs/api#issuing_authorizations) object. sig { returns(T.nilable(String)) } attr_reader :issuing_authorization + # Set if the ReceivedDebit is also viewable as an [Issuing Dispute](https://stripe.com/docs/api#issuing_disputes) object. sig { returns(T.nilable(String)) } attr_reader :issuing_transaction + # Set if the ReceivedDebit was created due to a [Payout](https://stripe.com/docs/api#payouts) object. sig { returns(T.nilable(String)) } attr_reader :payout + # The ReceivedCredit that Capital withheld from sig { returns(T.nilable(String)) } attr_reader :received_credit_capital_withholding end class NetworkDetails < Stripe::StripeObject class Ach < Stripe::StripeObject + # ACH Addenda record sig { returns(T.nilable(String)) } attr_reader :addenda end + # Details about an ACH transaction. sig { returns(T.nilable(Ach)) } attr_reader :ach + # The type of flow that originated the ReceivedDebit. sig { returns(String) } attr_reader :type end class ReversalDetails < Stripe::StripeObject + # Time before which a ReceivedDebit can be reversed. sig { returns(T.nilable(Integer)) } attr_reader :deadline + # Set if a ReceivedDebit can't be reversed. sig { returns(T.nilable(String)) } attr_reader :restricted_reason end - sig { returns(Integer) } # Amount (in cents) transferred. - attr_reader :amount sig { returns(Integer) } + attr_reader :amount # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(String)) } # Reason for the failure. A ReceivedDebit might fail because the FinancialAccount doesn't have sufficient funds, is closed, or is frozen. - attr_reader :failure_code sig { returns(T.nilable(String)) } + attr_reader :failure_code # The FinancialAccount that funds were pulled from. - attr_reader :financial_account sig { returns(T.nilable(String)) } + attr_reader :financial_account # A [hosted transaction receipt](https://stripe.com/docs/treasury/moving-money/regulatory-receipts) URL that is provided when money movement is considered regulated under Stripe's money transmission licenses. + sig { returns(T.nilable(String)) } attr_reader :hosted_regulatory_receipt_url - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(InitiatingPaymentMethodDetails) } # Attribute for field initiating_payment_method_details + sig { returns(InitiatingPaymentMethodDetails) } attr_reader :initiating_payment_method_details - sig { returns(LinkedFlows) } # Attribute for field linked_flows + sig { returns(LinkedFlows) } attr_reader :linked_flows - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # The network used for the ReceivedDebit. + sig { returns(String) } attr_reader :network - sig { returns(T.nilable(NetworkDetails)) } # Details specific to the money movement rails. + sig { returns(T.nilable(NetworkDetails)) } attr_reader :network_details - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(ReversalDetails)) } # Details describing when a ReceivedDebit might be reversed. + sig { returns(T.nilable(ReversalDetails)) } attr_reader :reversal_details - sig { returns(String) } # Status of the ReceivedDebit. ReceivedDebits are created with a status of either `succeeded` (approved) or `failed` (declined). The failure reason can be found under the `failure_code`. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } # The Transaction associated with this object. + sig { returns(T.nilable(T.any(String, Stripe::Treasury::Transaction))) } attr_reader :transaction + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount that funds were pulled from. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + sig { returns(String) } + attr_accessor :account_holder_name + # The bank account number. + sig { returns(String) } + attr_accessor :account_number + # The bank account's routing number. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_name: String, account_number: String, routing_number: String).void + } + def initialize(account_holder_name: nil, account_number: nil, routing_number: nil); end + end + # The source type. + sig { returns(String) } + attr_accessor :type + # Optional fields for `us_bank_account`. + sig { + returns(::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(type: String, us_bank_account: ::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount).void + } + def initialize(type: nil, us_bank_account: nil); end + end + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this ReceivedDebit. + sig { returns(String) } + attr_accessor :addenda + sig { params(addenda: String).void } + def initialize(addenda: nil); end + end + # Optional fields for `ach`. + sig { returns(::Stripe::Treasury::ReceivedDebit::CreateParams::NetworkDetails::Ach) } + attr_accessor :ach + # The type of flow that originated the ReceivedDebit. + sig { returns(String) } + attr_accessor :type + sig { + params(ach: ::Stripe::Treasury::ReceivedDebit::CreateParams::NetworkDetails::Ach, type: String).void + } + def initialize(ach: nil, type: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to pull funds from. + sig { returns(String) } + attr_accessor :financial_account + # Initiating payment method details for the object. + sig { + returns(::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails) + } + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + # Details about the network used for the ReceivedDebit. + sig { returns(::Stripe::Treasury::ReceivedDebit::CreateParams::NetworkDetails) } + attr_accessor :network_details + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], financial_account: String, initiating_payment_method_details: ::Stripe::Treasury::ReceivedDebit::CreateParams::InitiatingPaymentMethodDetails, network: String, network_details: ::Stripe::Treasury::ReceivedDebit::CreateParams::NetworkDetails).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ); end + end + # Returns a list of ReceivedDebits. + sig { + params(params: T.any(::Stripe::Treasury::ReceivedDebit::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/transaction.rbi b/rbi/stripe/resources/treasury/transaction.rbi index 68c4c2e71..f79bdd96f 100644 --- a/rbi/stripe/resources/treasury/transaction.rbi +++ b/rbi/stripe/resources/treasury/transaction.rbi @@ -7,84 +7,210 @@ module Stripe # Transactions represent changes to a [FinancialAccount's](https://stripe.com/docs/api#financial_accounts) balance. class Transaction < APIResource class BalanceImpact < Stripe::StripeObject + # The change made to funds the user can spend right now. sig { returns(Integer) } attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. sig { returns(Integer) } attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(Integer) } attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. sig { returns(Stripe::Treasury::DebitReversal) } attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) sig { returns(Stripe::Treasury::InboundTransfer) } attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) sig { returns(Stripe::Issuing::Authorization) } attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) sig { returns(Stripe::Treasury::OutboundTransfer) } attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedCredit) } attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedDebit) } attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. sig { returns(String) } attr_reader :type end class StatusTransitions < Stripe::StripeObject + # Timestamp describing when the Transaction changed status to `posted`. sig { returns(T.nilable(Integer)) } attr_reader :posted_at + # Timestamp describing when the Transaction changed status to `void`. sig { returns(T.nilable(Integer)) } attr_reader :void_at end - sig { returns(Integer) } # Amount (in cents) transferred. + sig { returns(Integer) } attr_reader :amount - sig { returns(BalanceImpact) } # Change to a FinancialAccount's balance + sig { returns(BalanceImpact) } attr_reader :balance_impact - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). - attr_reader :currency sig { returns(String) } + attr_reader :currency # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } attr_reader :description - sig { returns(T.nilable(Stripe::ListObject)) } # A list of TransactionEntries that are part of this Transaction. This cannot be expanded in any list endpoints. + sig { returns(T.nilable(Stripe::ListObject)) } attr_reader :entries - sig { returns(String) } # The FinancialAccount associated with this object. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } # ID of the flow that created the Transaction. + sig { returns(T.nilable(String)) } attr_reader :flow - sig { returns(T.nilable(FlowDetails)) } # Details of the flow that created the Transaction. + sig { returns(T.nilable(FlowDetails)) } attr_reader :flow_details - sig { returns(String) } # Type of the flow that created the Transaction. - attr_reader :flow_type sig { returns(String) } + attr_reader :flow_type # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # Status of the Transaction. + sig { returns(String) } attr_reader :status - sig { returns(StatusTransitions) } # Attribute for field status_transitions + sig { returns(StatusTransitions) } attr_reader :status_transitions + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class StatusTransitions < Stripe::RequestParams + class PostedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Returns Transactions with `posted_at` within the specified range. + sig { + returns(T.any(::Stripe::Treasury::Transaction::ListParams::StatusTransitions::PostedAt, Integer)) + } + attr_accessor :posted_at + sig { + params(posted_at: T.any(::Stripe::Treasury::Transaction::ListParams::StatusTransitions::PostedAt, Integer)).void + } + def initialize(posted_at: nil); end + end + # Only return Transactions that were created during the given date interval. + sig { returns(T.any(::Stripe::Treasury::Transaction::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + sig { returns(String) } + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return Transactions that have the given status: `open`, `posted`, or `void`. + sig { returns(String) } + attr_accessor :status + # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. + sig { returns(::Stripe::Treasury::Transaction::ListParams::StatusTransitions) } + attr_accessor :status_transitions + sig { + params(created: T.any(::Stripe::Treasury::Transaction::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, order_by: String, starting_after: String, status: String, status_transitions: ::Stripe::Treasury::Transaction::ListParams::StatusTransitions).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + status: nil, + status_transitions: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves a list of Transaction objects. + sig { + params(params: T.any(::Stripe::Treasury::Transaction::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/treasury/transaction_entry.rbi b/rbi/stripe/resources/treasury/transaction_entry.rbi index 0bb3955a5..e3f6a4ed2 100644 --- a/rbi/stripe/resources/treasury/transaction_entry.rbi +++ b/rbi/stripe/resources/treasury/transaction_entry.rbi @@ -7,72 +7,187 @@ module Stripe # TransactionEntries represent individual units of money movements within a single [Transaction](https://stripe.com/docs/api#transactions). class TransactionEntry < APIResource class BalanceImpact < Stripe::StripeObject + # The change made to funds the user can spend right now. sig { returns(Integer) } attr_reader :cash + # The change made to funds that are not spendable yet, but will become available at a later time. sig { returns(Integer) } attr_reader :inbound_pending + # The change made to funds in the account, but not spendable because they are being held for pending outbound flows. sig { returns(Integer) } attr_reader :outbound_pending end class FlowDetails < Stripe::StripeObject + # You can reverse some [ReceivedCredits](https://stripe.com/docs/api#received_credits) depending on their network and source flow. Reversing a ReceivedCredit leads to the creation of a new object known as a CreditReversal. sig { returns(Stripe::Treasury::CreditReversal) } attr_reader :credit_reversal + # You can reverse some [ReceivedDebits](https://stripe.com/docs/api#received_debits) depending on their network and source flow. Reversing a ReceivedDebit leads to the creation of a new object known as a DebitReversal. sig { returns(Stripe::Treasury::DebitReversal) } attr_reader :debit_reversal + # Use [InboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) to add funds to your [FinancialAccount](https://stripe.com/docs/api#financial_accounts) via a PaymentMethod that is owned by you. The funds will be transferred via an ACH debit. + # + # Related guide: [Moving money with Treasury using InboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/into/inbound-transfers) sig { returns(Stripe::Treasury::InboundTransfer) } attr_reader :inbound_transfer + # When an [issued card](https://stripe.com/docs/issuing) is used to make a purchase, an Issuing `Authorization` + # object is created. [Authorizations](https://stripe.com/docs/issuing/purchases/authorizations) must be approved for the + # purchase to be completed successfully. + # + # Related guide: [Issued card authorizations](https://stripe.com/docs/issuing/purchases/authorizations) sig { returns(Stripe::Issuing::Authorization) } attr_reader :issuing_authorization + # Use [OutboundPayments](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) to send funds to another party's external bank account or [FinancialAccount](https://stripe.com/docs/api#financial_accounts). To send money to an account belonging to the same user, use an [OutboundTransfer](https://stripe.com/docs/api#outbound_transfers). + # + # Simulate OutboundPayment state changes with the `/v1/test_helpers/treasury/outbound_payments` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundPayment objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-payments) sig { returns(Stripe::Treasury::OutboundPayment) } attr_reader :outbound_payment + # Use [OutboundTransfers](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) to transfer funds from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) to a PaymentMethod belonging to the same entity. To send funds to a different party, use [OutboundPayments](https://stripe.com/docs/api#outbound_payments) instead. You can send funds over ACH rails or through a domestic wire transfer to a user's own external bank account. + # + # Simulate OutboundTransfer state changes with the `/v1/test_helpers/treasury/outbound_transfers` endpoints. These methods can only be called on test mode objects. + # + # Related guide: [Moving money with Treasury using OutboundTransfer objects](https://docs.stripe.com/docs/treasury/moving-money/financial-accounts/out-of/outbound-transfers) sig { returns(Stripe::Treasury::OutboundTransfer) } attr_reader :outbound_transfer + # ReceivedCredits represent funds sent to a [FinancialAccount](https://stripe.com/docs/api#financial_accounts) (for example, via ACH or wire). These money movements are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedCredit) } attr_reader :received_credit + # ReceivedDebits represent funds pulled from a [FinancialAccount](https://stripe.com/docs/api#financial_accounts). These are not initiated from the FinancialAccount. sig { returns(Stripe::Treasury::ReceivedDebit) } attr_reader :received_debit + # Type of the flow that created the Transaction. Set to the same value as `flow_type`. sig { returns(String) } attr_reader :type end - sig { returns(BalanceImpact) } # Change to a FinancialAccount's balance + sig { returns(BalanceImpact) } attr_reader :balance_impact - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(String) } # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } attr_reader :currency - sig { returns(Integer) } # When the TransactionEntry will impact the FinancialAccount's balance. + sig { returns(Integer) } attr_reader :effective_at - sig { returns(String) } # The FinancialAccount associated with this object. + sig { returns(String) } attr_reader :financial_account - sig { returns(T.nilable(String)) } # Token of the flow associated with the TransactionEntry. + sig { returns(T.nilable(String)) } attr_reader :flow - sig { returns(T.nilable(FlowDetails)) } # Details of the flow associated with the TransactionEntry. + sig { returns(T.nilable(FlowDetails)) } attr_reader :flow_details - sig { returns(String) } # Type of the flow associated with the TransactionEntry. - attr_reader :flow_type sig { returns(String) } + attr_reader :flow_type # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(T.any(String, Stripe::Treasury::Transaction)) } # The Transaction associated with this object. + sig { returns(T.any(String, Stripe::Treasury::Transaction)) } attr_reader :transaction - sig { returns(String) } # The specific money movement that generated the TransactionEntry. + sig { returns(String) } attr_reader :type + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class EffectiveAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return TransactionEntries that were created during the given date interval. + sig { returns(T.any(::Stripe::Treasury::TransactionEntry::ListParams::Created, Integer)) } + attr_accessor :created + # Attribute for param field effective_at + sig { + returns(T.any(::Stripe::Treasury::TransactionEntry::ListParams::EffectiveAt, Integer)) + } + attr_accessor :effective_at + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + sig { returns(String) } + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return TransactionEntries associated with this Transaction. + sig { returns(String) } + attr_accessor :transaction + sig { + params(created: T.any(::Stripe::Treasury::TransactionEntry::ListParams::Created, Integer), effective_at: T.any(::Stripe::Treasury::TransactionEntry::ListParams::EffectiveAt, Integer), ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, order_by: String, starting_after: String, transaction: String).void + } + def initialize( + created: nil, + effective_at: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + transaction: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves a list of TransactionEntry objects. + sig { + params(params: T.any(::Stripe::Treasury::TransactionEntry::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end end end end \ No newline at end of file diff --git a/rbi/stripe/resources/usage_record.rbi b/rbi/stripe/resources/usage_record.rbi index 19a45b9da..366db1432 100644 --- a/rbi/stripe/resources/usage_record.rbi +++ b/rbi/stripe/resources/usage_record.rbi @@ -10,23 +10,23 @@ module Stripe # # This is our legacy usage-based billing API. See the [updated usage-based billing docs](https://docs.stripe.com/billing/subscriptions/usage-based). class UsageRecord < APIResource - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Integer) } # The usage quantity for the specified date. + sig { returns(Integer) } attr_reader :quantity - sig { returns(String) } # The ID of the subscription item this usage record contains data for. + sig { returns(String) } attr_reader :subscription_item - sig { returns(Integer) } # The timestamp when this usage occurred. + sig { returns(Integer) } attr_reader :timestamp end end \ No newline at end of file diff --git a/rbi/stripe/resources/usage_record_summary.rbi b/rbi/stripe/resources/usage_record_summary.rbi index 9524b5741..7d9770df0 100644 --- a/rbi/stripe/resources/usage_record_summary.rbi +++ b/rbi/stripe/resources/usage_record_summary.rbi @@ -6,31 +6,33 @@ module Stripe # A usage record summary represents an aggregated view of how much usage was accrued for a subscription item within a subscription billing period. class UsageRecordSummary < StripeObject class Period < Stripe::StripeObject + # The end date of this usage period. All usage up to and including this point in time is included. sig { returns(T.nilable(Integer)) } attr_reader :end + # The start date of this usage period. All usage after this point in time is included. sig { returns(T.nilable(Integer)) } attr_reader :start end - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T.nilable(String)) } # The invoice in which this usage period has been billed for. + sig { returns(T.nilable(String)) } attr_reader :invoice - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. + sig { returns(String) } attr_reader :object - sig { returns(Period) } # Attribute for field period + sig { returns(Period) } attr_reader :period - sig { returns(String) } # The ID of the subscription item this summary is describing. + sig { returns(String) } attr_reader :subscription_item - sig { returns(Integer) } # The total usage within this usage period. + sig { returns(Integer) } attr_reader :total_usage end end \ No newline at end of file diff --git a/rbi/stripe/resources/v2/billing/meter_event.rbi b/rbi/stripe/resources/v2/billing/meter_event.rbi index ae44845c5..b887a4168 100644 --- a/rbi/stripe/resources/v2/billing/meter_event.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event.rbi @@ -7,29 +7,29 @@ module Stripe module Billing # Fix me empty_doc_string. class MeterEvent < APIResource - sig { returns(String) } # The creation time of this meter event. - attr_reader :created sig { returns(String) } + attr_reader :created # The name of the meter event. Corresponds with the `event_name` field on a meter. - attr_reader :event_name sig { returns(String) } + attr_reader :event_name # A unique identifier for the event. If not provided, one will be generated. We recommend using a globally unique identifier for this. We’ll enforce uniqueness within a rolling 24 hour period. + sig { returns(String) } attr_reader :identifier - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object - sig { returns(T::Hash[String, String]) } # The payload of the event. This must contain the fields corresponding to a meter’s # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and # `value_settings.event_payload_key` (default is `value`). Read more about the payload. + sig { returns(T::Hash[String, String]) } attr_reader :payload - sig { returns(String) } # The time of the event. Must be within the past 35 calendar days or up to # 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(String) } attr_reader :timestamp end end diff --git a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi index c58053b98..27b5a2e62 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_adjustment.rbi @@ -7,32 +7,33 @@ module Stripe module Billing class MeterEventAdjustment < APIResource class Cancel < Stripe::StripeObject + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. sig { returns(String) } attr_reader :identifier end - sig { returns(Cancel) } # Specifies which event to cancel. + sig { returns(Cancel) } attr_reader :cancel - sig { returns(String) } # The time the adjustment was created. - attr_reader :created sig { returns(String) } + attr_reader :created # The name of the meter event. Corresponds with the `event_name` field on a meter. - attr_reader :event_name sig { returns(String) } + attr_reader :event_name # The unique id of this meter event adjustment. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value of the object field. - attr_reader :object sig { returns(String) } + attr_reader :object # Open Enum. The meter event adjustment’s status. - attr_reader :status sig { returns(String) } + attr_reader :status # Open Enum. Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/v2/billing/meter_event_session.rbi b/rbi/stripe/resources/v2/billing/meter_event_session.rbi index 4dbab8e6b..9e3c7ee9e 100644 --- a/rbi/stripe/resources/v2/billing/meter_event_session.rbi +++ b/rbi/stripe/resources/v2/billing/meter_event_session.rbi @@ -6,24 +6,24 @@ module Stripe module V2 module Billing class MeterEventSession < APIResource - sig { returns(String) } # The authentication token for this session. Use this token when calling the # high-throughput meter event API. - attr_reader :authentication_token sig { returns(String) } + attr_reader :authentication_token # The creation time of this session. - attr_reader :created sig { returns(String) } + attr_reader :created # The time at which this session will expire. - attr_reader :expires_at sig { returns(String) } + attr_reader :expires_at # The unique id of this auth session. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object end end diff --git a/rbi/stripe/resources/v2/event.rbi b/rbi/stripe/resources/v2/event.rbi index 4b6821920..16d63b831 100644 --- a/rbi/stripe/resources/v2/event.rbi +++ b/rbi/stripe/resources/v2/event.rbi @@ -7,36 +7,40 @@ module Stripe class Event < APIResource class Reason < Stripe::StripeObject class Request < Stripe::StripeObject + # ID of the API request that caused the event. sig { returns(String) } attr_reader :id + # The idempotency key transmitted during the request. sig { returns(String) } attr_reader :idempotency_key end + # Event reason type. sig { returns(String) } attr_reader :type + # Information on the API request that instigated the event. sig { returns(T.nilable(Request)) } attr_reader :request end - sig { returns(T.nilable(String)) } # Authentication context needed to fetch the event or related object. + sig { returns(T.nilable(String)) } attr_reader :context - sig { returns(String) } # Time at which the object was created. - attr_reader :created sig { returns(String) } + attr_reader :created # Unique identifier for the event. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(Reason)) } # Reason for the event. + sig { returns(T.nilable(Reason)) } attr_reader :reason - sig { returns(String) } # The type of the event. + sig { returns(String) } attr_reader :type end end diff --git a/rbi/stripe/resources/v2/event_destination.rbi b/rbi/stripe/resources/v2/event_destination.rbi index 91f97cd28..2c1849199 100644 --- a/rbi/stripe/resources/v2/event_destination.rbi +++ b/rbi/stripe/resources/v2/event_destination.rbi @@ -7,76 +7,83 @@ module Stripe class EventDestination < APIResource class StatusDetails < Stripe::StripeObject class Disabled < Stripe::StripeObject + # Reason event destination has been disabled. sig { returns(String) } attr_reader :reason end + # Details about why the event destination has been disabled. sig { returns(T.nilable(Disabled)) } attr_reader :disabled end class AmazonEventbridge < Stripe::StripeObject + # The AWS account ID. sig { returns(String) } attr_reader :aws_account_id + # The ARN of the AWS event source. sig { returns(String) } attr_reader :aws_event_source_arn + # The state of the AWS event source. sig { returns(String) } attr_reader :aws_event_source_status end class WebhookEndpoint < Stripe::StripeObject + # The signing secret of the webhook endpoint, only includable on creation. sig { returns(T.nilable(String)) } attr_reader :signing_secret + # The URL of the webhook endpoint, includable. sig { returns(T.nilable(String)) } attr_reader :url end - sig { returns(String) } # Time at which the object was created. - attr_reader :created sig { returns(String) } + attr_reader :created # An optional description of what the event destination is used for. + sig { returns(String) } attr_reader :description - sig { returns(T::Array[String]) } # The list of events to enable for this endpoint. + sig { returns(T::Array[String]) } attr_reader :enabled_events - sig { returns(String) } # Payload type of events being subscribed to. + sig { returns(String) } attr_reader :event_payload - sig { returns(T.nilable(T::Array[String])) } # Where events should be routed from. + sig { returns(T.nilable(T::Array[String])) } attr_reader :events_from - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T.nilable(T::Hash[String, String])) } # Metadata. + sig { returns(T.nilable(T::Hash[String, String])) } attr_reader :metadata - sig { returns(String) } # Event destination name. - attr_reader :name sig { returns(String) } + attr_reader :name # String representing the object's type. Objects of the same type share the same value of the object field. + sig { returns(String) } attr_reader :object - sig { returns(T.nilable(String)) } # If using the snapshot event payload, the API version events are rendered as. + sig { returns(T.nilable(String)) } attr_reader :snapshot_api_version - sig { returns(String) } # Status. It can be set to either enabled or disabled. + sig { returns(String) } attr_reader :status - sig { returns(T.nilable(StatusDetails)) } # Additional information about event destination status. + sig { returns(T.nilable(StatusDetails)) } attr_reader :status_details - sig { returns(String) } # Event destination type. - attr_reader :type sig { returns(String) } + attr_reader :type # Time at which the object was last updated. + sig { returns(String) } attr_reader :updated - sig { returns(T.nilable(AmazonEventbridge)) } # Amazon EventBridge configuration. + sig { returns(T.nilable(AmazonEventbridge)) } attr_reader :amazon_eventbridge - sig { returns(T.nilable(WebhookEndpoint)) } # Webhook endpoint configuration. + sig { returns(T.nilable(WebhookEndpoint)) } attr_reader :webhook_endpoint end end diff --git a/rbi/stripe/resources/webhook_endpoint.rbi b/rbi/stripe/resources/webhook_endpoint.rbi index b72d73542..9fa65ca9e 100644 --- a/rbi/stripe/resources/webhook_endpoint.rbi +++ b/rbi/stripe/resources/webhook_endpoint.rbi @@ -11,44 +11,167 @@ module Stripe # # Related guide: [Setting up webhooks](https://docs.stripe.com/webhooks/configure) class WebhookEndpoint < APIResource - sig { returns(T.nilable(String)) } # The API version events are rendered as for this webhook endpoint. - attr_reader :api_version sig { returns(T.nilable(String)) } + attr_reader :api_version # The ID of the associated Connect application. + sig { returns(T.nilable(String)) } attr_reader :application - sig { returns(Integer) } # Time at which the object was created. Measured in seconds since the Unix epoch. + sig { returns(Integer) } attr_reader :created - sig { returns(T.nilable(String)) } # An optional description of what the webhook is used for. + sig { returns(T.nilable(String)) } attr_reader :description - sig { returns(T::Array[String]) } # The list of events to enable for this endpoint. `['*']` indicates that all events are enabled, except those that require explicit selection. + sig { returns(T::Array[String]) } attr_reader :enabled_events - sig { returns(String) } # Unique identifier for the object. + sig { returns(String) } attr_reader :id - sig { returns(T::Boolean) } # Has the value `true` if the object exists in live mode or the value `false` if the object exists in test mode. + sig { returns(T::Boolean) } attr_reader :livemode - sig { returns(T::Hash[String, String]) } # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } attr_reader :metadata - sig { returns(String) } # String representing the object's type. Objects of the same type share the same value. - attr_reader :object sig { returns(String) } + attr_reader :object # The endpoint's secret, used to generate [webhook signatures](https://docs.stripe.com/webhooks/signatures). Only returned at creation. - attr_reader :secret sig { returns(String) } + attr_reader :secret # The status of the webhook. It can be `enabled` or `disabled`. - attr_reader :status sig { returns(String) } + attr_reader :status # The URL of the webhook endpoint. + sig { returns(String) } attr_reader :url - sig { returns(T::Boolean) } # Always true for a deleted object + sig { returns(T::Boolean) } attr_reader :deleted + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An optional description of what the webhook is used for. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Disable the webhook endpoint if set to true. + sig { returns(T::Boolean) } + attr_accessor :disabled + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + sig { returns(T::Array[String]) } + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The URL of the webhook endpoint. + sig { returns(String) } + attr_accessor :url + sig { + params(description: T.nilable(String), disabled: T::Boolean, enabled_events: T::Array[String], expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), url: String).void + } + def initialize( + description: nil, + disabled: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + sig { returns(String) } + attr_accessor :api_version + # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :connect + # An optional description of what the webhook is used for. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + sig { returns(T::Array[String]) } + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The URL of the webhook endpoint. + sig { returns(String) } + attr_accessor :url + sig { + params(api_version: String, connect: T::Boolean, description: T.nilable(String), enabled_events: T::Array[String], expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), url: String).void + } + def initialize( + api_version: nil, + connect: nil, + description: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ); end + end + # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. + sig { + params(params: T.any(::Stripe::WebhookEndpoint::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def self.create(params = {}, opts = {}); end + + # You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. + sig { + params(id: String, params: T.any(::Stripe::WebhookEndpoint::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def self.delete(id, params = {}, opts = {}); end + + # You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. + sig { + params(params: T.any(::Stripe::WebhookEndpoint::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def delete(params = {}, opts = {}); end + + # Returns a list of your webhook endpoints. + sig { + params(params: T.any(::Stripe::WebhookEndpoint::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def self.list(params = {}, opts = {}); end + + # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. + sig { + params(id: String, params: T.any(::Stripe::WebhookEndpoint::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def self.update(id, params = {}, opts = {}); end end end \ No newline at end of file diff --git a/rbi/stripe/services/account_capability_service.rbi b/rbi/stripe/services/account_capability_service.rbi new file mode 100644 index 000000000..7b18aea85 --- /dev/null +++ b/rbi/stripe/services/account_capability_service.rbi @@ -0,0 +1,51 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountCapabilityService < StripeService + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # To request a new capability for an account, pass true. There can be a delay before the requested capability becomes active. If the capability has any activation requirements, the response includes them in the `requirements` arrays. + # + # If a capability isn't permanent, you can remove it from the account by passing false. Some capabilities are permanent after they've been requested. Attempting to remove a permanent capability returns an error. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(expand: T::Array[String], requested: T::Boolean).void } + def initialize(expand: nil, requested: nil); end + end + # Returns a list of capabilities associated with the account. The capabilities are returned sorted by creation date, with the most recent capability appearing first. + sig { + params(account: String, params: T.any(::Stripe::AccountCapabilityService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(account, params = {}, opts = {}); end + + # Retrieves information about the specified Account Capability. + sig { + params(account: String, capability: String, params: T.any(::Stripe::AccountCapabilityService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capability) + } + def retrieve(account, capability, params = {}, opts = {}); end + + # Updates an existing Account Capability. Request or remove a capability by updating its requested parameter. + sig { + params(account: String, capability: String, params: T.any(::Stripe::AccountCapabilityService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capability) + } + def update(account, capability, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_external_account_service.rbi b/rbi/stripe/services/account_external_account_service.rbi new file mode 100644 index 000000000..b7687239d --- /dev/null +++ b/rbi/stripe/services/account_external_account_service.rbi @@ -0,0 +1,306 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountExternalAccountService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the bank account that displays the last 4 digits of the account number, either a statement or a check. + sig { + returns(::Stripe::AccountExternalAccountService::UpdateParams::Documents::BankAccountOwnershipVerification) + } + attr_accessor :bank_account_ownership_verification + sig { + params(bank_account_ownership_verification: ::Stripe::AccountExternalAccountService::UpdateParams::Documents::BankAccountOwnershipVerification).void + } + def initialize(bank_account_ownership_verification: nil); end + end + # The name of the person or business that owns the bank account. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. + sig { returns(T.nilable(String)) } + attr_accessor :account_holder_type + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + sig { returns(String) } + attr_accessor :account_type + # City/District/Suburb/Town/Village. + sig { returns(String) } + attr_accessor :address_city + # Billing address country, if provided when creating card. + sig { returns(String) } + attr_accessor :address_country + # Address line 1 (Street address/PO Box/Company name). + sig { returns(String) } + attr_accessor :address_line1 + # Address line 2 (Apartment/Suite/Unit/Building). + sig { returns(String) } + attr_accessor :address_line2 + # State/County/Province/Region. + sig { returns(String) } + attr_accessor :address_state + # ZIP or postal code. + sig { returns(String) } + attr_accessor :address_zip + # When set to true, this becomes the default external account for its currency. + sig { returns(T::Boolean) } + attr_accessor :default_for_currency + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::AccountExternalAccountService::UpdateParams::Documents) } + attr_accessor :documents + # Two digit number representing the card’s expiration month. + sig { returns(String) } + attr_accessor :exp_month + # Four digit number representing the card’s expiration year. + sig { returns(String) } + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Cardholder name. + sig { returns(String) } + attr_accessor :name + sig { + params(account_holder_name: String, account_holder_type: T.nilable(String), account_type: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, default_for_currency: T::Boolean, documents: ::Stripe::AccountExternalAccountService::UpdateParams::Documents, exp_month: String, exp_year: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), name: String).void + } + def initialize( + account_holder_name: nil, + account_holder_type: nil, + account_type: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + default_for_currency: nil, + documents: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + metadata: nil, + name: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filter external accounts according to a particular object type. + sig { returns(String) } + attr_accessor :object + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, object: String, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + object: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(object: String, account_holder_name: String, account_holder_type: String, account_number: String, country: String, currency: String, routing_number: String).void + } + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ); end + end + class Card < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field address_city + sig { returns(String) } + attr_accessor :address_city + # Attribute for param field address_country + sig { returns(String) } + attr_accessor :address_country + # Attribute for param field address_line1 + sig { returns(String) } + attr_accessor :address_line1 + # Attribute for param field address_line2 + sig { returns(String) } + attr_accessor :address_line2 + # Attribute for param field address_state + sig { returns(String) } + attr_accessor :address_state + # Attribute for param field address_zip + sig { returns(String) } + attr_accessor :address_zip + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field cvc + sig { returns(String) } + attr_accessor :cvc + # Attribute for param field exp_month + sig { returns(Integer) } + attr_accessor :exp_month + # Attribute for param field exp_year + sig { returns(Integer) } + attr_accessor :exp_year + # Attribute for param field name + sig { returns(String) } + attr_accessor :name + # Attribute for param field number + sig { returns(String) } + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(object: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: Integer, exp_year: Integer, name: String, number: String, metadata: T::Hash[String, String]).void + } + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil + ); end + end + class CardToken < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field token + sig { returns(String) } + attr_accessor :token + sig { params(object: String, currency: String, token: String).void } + def initialize(object: nil, currency: nil, token: nil); end + end + # When set to true, or if this is the first external account added in this currency, this account becomes the default external account for its currency. + sig { returns(T::Boolean) } + attr_accessor :default_for_currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Please refer to full [documentation](https://stripe.com/docs/api) instead. + sig { + returns(T.any(String, ::Stripe::AccountExternalAccountService::CreateParams::Card, ::Stripe::AccountExternalAccountService::CreateParams::BankAccount, ::Stripe::AccountExternalAccountService::CreateParams::CardToken)) + } + attr_accessor :external_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(default_for_currency: T::Boolean, expand: T::Array[String], external_account: T.any(String, ::Stripe::AccountExternalAccountService::CreateParams::Card, ::Stripe::AccountExternalAccountService::CreateParams::BankAccount, ::Stripe::AccountExternalAccountService::CreateParams::CardToken), metadata: T::Hash[String, String]).void + } + def initialize( + default_for_currency: nil, + expand: nil, + external_account: nil, + metadata: nil + ); end + end + # Create an external account for a given account. + sig { + params(account: String, params: T.any(::Stripe::AccountExternalAccountService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card)) + } + def create(account, params = {}, opts = {}); end + + # Delete a specified external account for a given account. + sig { + params(account: String, id: String, params: T.any(::Stripe::AccountExternalAccountService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card)) + } + def delete(account, id, params = {}, opts = {}); end + + # List external accounts for an account. + sig { + params(account: String, params: T.any(::Stripe::AccountExternalAccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(account, params = {}, opts = {}); end + + # Retrieve a specified external account for a given account. + sig { + params(account: String, id: String, params: T.any(::Stripe::AccountExternalAccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card)) + } + def retrieve(account, id, params = {}, opts = {}); end + + # Updates the metadata, account holder name, account holder type of a bank account belonging to + # a connected account and optionally sets it as the default for its currency. Other bank account + # details are not editable by design. + # + # You can only update bank accounts when [account.controller.requirement_collection is application, which includes Custom accounts](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection). + # + # You can re-enable a disabled bank account by performing an update call without providing any + # arguments or changes. + sig { + params(account: String, id: String, params: T.any(::Stripe::AccountExternalAccountService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::BankAccount, Stripe::Card)) + } + def update(account, id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_link_service.rbi b/rbi/stripe/services/account_link_service.rbi new file mode 100644 index 000000000..62a320925 --- /dev/null +++ b/rbi/stripe/services/account_link_service.rbi @@ -0,0 +1,58 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountLinkService < StripeService + class CreateParams < Stripe::RequestParams + class CollectionOptions < Stripe::RequestParams + # Specifies whether the platform collects only currently_due requirements (`currently_due`) or both currently_due and eventually_due requirements (`eventually_due`). If you don't specify `collection_options`, the default value is `currently_due`. + sig { returns(String) } + attr_accessor :fields + # Specifies whether the platform collects future_requirements in addition to requirements in Connect Onboarding. The default value is `omit`. + sig { returns(String) } + attr_accessor :future_requirements + sig { params(fields: String, future_requirements: String).void } + def initialize(fields: nil, future_requirements: nil); end + end + # The identifier of the account to create an account link for. + sig { returns(String) } + attr_accessor :account + # The collect parameter is deprecated. Use `collection_options` instead. + sig { returns(String) } + attr_accessor :collect + # Specifies the requirements that Stripe collects from connected accounts in the Connect Onboarding flow. + sig { returns(::Stripe::AccountLinkService::CreateParams::CollectionOptions) } + attr_accessor :collection_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The URL the user will be redirected to if the account link is expired, has been previously-visited, or is otherwise invalid. The URL you specify should attempt to generate a new account link with the same parameters used to create the original account link, then redirect the user to the new account link's URL so they can continue with Connect Onboarding. If a new account link cannot be generated or the redirect fails you should display a useful error to the user. + sig { returns(String) } + attr_accessor :refresh_url + # The URL that the user will be redirected to upon leaving or completing the linked flow. + sig { returns(String) } + attr_accessor :return_url + # The type of account link the user is requesting. Possible values are `account_onboarding` or `account_update`. + sig { returns(String) } + attr_accessor :type + sig { + params(account: String, collect: String, collection_options: ::Stripe::AccountLinkService::CreateParams::CollectionOptions, expand: T::Array[String], refresh_url: String, return_url: String, type: String).void + } + def initialize( + account: nil, + collect: nil, + collection_options: nil, + expand: nil, + refresh_url: nil, + return_url: nil, + type: nil + ); end + end + # Creates an AccountLink object that includes a single-use Stripe URL that the platform can redirect their user to in order to take them through the Connect Onboarding flow. + sig { + params(params: T.any(::Stripe::AccountLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountLink) + } + def create(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_login_link_service.rbi b/rbi/stripe/services/account_login_link_service.rbi new file mode 100644 index 000000000..43b430858 --- /dev/null +++ b/rbi/stripe/services/account_login_link_service.rbi @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountLoginLinkService < StripeService + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a login link for a connected account to access the Express Dashboard. + # + # You can only create login links for accounts that use the [Express Dashboard](https://stripe.com/connect/express-dashboard) and are connected to your platform. + sig { + params(account: String, params: T.any(::Stripe::AccountLoginLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::LoginLink) + } + def create(account, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_notice_service.rbi b/rbi/stripe/services/account_notice_service.rbi new file mode 100644 index 000000000..4e9668dc0 --- /dev/null +++ b/rbi/stripe/services/account_notice_service.rbi @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountNoticeService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Set to false to only return unsent AccountNotices. + sig { returns(T::Boolean) } + attr_accessor :sent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, sent: T::Boolean, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + sent: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Email < Stripe::RequestParams + # Content of the email in plain text. The copy must match exactly the language that Stripe Compliance has approved for use. + sig { returns(String) } + attr_accessor :plain_text + # Email address of the recipient. + sig { returns(String) } + attr_accessor :recipient + # Subject of the email. + sig { returns(String) } + attr_accessor :subject + sig { params(plain_text: String, recipient: String, subject: String).void } + def initialize(plain_text: nil, recipient: nil, subject: nil); end + end + # Information about the email you sent. + sig { returns(::Stripe::AccountNoticeService::UpdateParams::Email) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Date when you sent the notice. + sig { returns(Integer) } + attr_accessor :sent_at + sig { + params(email: ::Stripe::AccountNoticeService::UpdateParams::Email, expand: T::Array[String], metadata: T::Hash[String, String], sent_at: Integer).void + } + def initialize(email: nil, expand: nil, metadata: nil, sent_at: nil); end + end + # Retrieves a list of AccountNotice objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. + sig { + params(params: T.any(::Stripe::AccountNoticeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an AccountNotice object. + sig { + params(account_notice: String, params: T.any(::Stripe::AccountNoticeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountNotice) + } + def retrieve(account_notice, params = {}, opts = {}); end + + # Updates an AccountNotice object. + sig { + params(account_notice: String, params: T.any(::Stripe::AccountNoticeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountNotice) + } + def update(account_notice, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_person_service.rbi b/rbi/stripe/services/account_person_service.rbi new file mode 100644 index 000000000..e4951ef26 --- /dev/null +++ b/rbi/stripe/services/account_person_service.rbi @@ -0,0 +1,903 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountPersonService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + sig { + returns(::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances::Account) + } + attr_accessor :account + sig { + params(account: ::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances::Account).void + } + def initialize(account: nil); end + end + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + sig { + returns(::Stripe::AccountPersonService::UpdateParams::Documents::CompanyAuthorization) + } + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Documents::Passport) } + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Documents::Visa) } + attr_accessor :visa + sig { + params(company_authorization: ::Stripe::AccountPersonService::UpdateParams::Documents::CompanyAuthorization, passport: ::Stripe::AccountPersonService::UpdateParams::Documents::Passport, visa: ::Stripe::AccountPersonService::UpdateParams::Documents::Visa).void + } + def initialize(company_authorization: nil, passport: nil, visa: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + sig { returns(T::Boolean) } + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(authorizer: T::Boolean, director: T::Boolean, executive: T::Boolean, legal_guardian: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), representative: T::Boolean, title: String).void + } + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::AccountPersonService::UpdateParams::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Verification::Document) } + attr_accessor :document + sig { + params(additional_document: ::Stripe::AccountPersonService::UpdateParams::Verification::AdditionalDocument, document: ::Stripe::AccountPersonService::UpdateParams::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + sig { returns(::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances) } + attr_accessor :additional_tos_acceptances + # The person's address. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Address) } + attr_accessor :address + # The Kana variation of the person's address (Japan only). + sig { returns(::Stripe::AccountPersonService::UpdateParams::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + sig { returns(::Stripe::AccountPersonService::UpdateParams::AddressKanji) } + attr_accessor :address_kanji + # The person's date of birth. + sig { returns(T.nilable(::Stripe::AccountPersonService::UpdateParams::Dob)) } + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Documents) } + attr_accessor :documents + # The person's email address. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The person's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + sig { returns(String) } + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The person's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The person's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + sig { returns(String) } + attr_accessor :nationality + # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + sig { returns(String) } + attr_accessor :person_token + # The person's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The person's registered address. + sig { returns(::Stripe::AccountPersonService::UpdateParams::RegisteredAddress) } + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Relationship) } + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The person's verification status. + sig { returns(::Stripe::AccountPersonService::UpdateParams::Verification) } + attr_accessor :verification + sig { + params(additional_tos_acceptances: ::Stripe::AccountPersonService::UpdateParams::AdditionalTosAcceptances, address: ::Stripe::AccountPersonService::UpdateParams::Address, address_kana: ::Stripe::AccountPersonService::UpdateParams::AddressKana, address_kanji: ::Stripe::AccountPersonService::UpdateParams::AddressKanji, dob: T.nilable(::Stripe::AccountPersonService::UpdateParams::Dob), documents: ::Stripe::AccountPersonService::UpdateParams::Documents, email: String, expand: T::Array[String], first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), nationality: String, person_token: String, phone: String, political_exposure: String, registered_address: ::Stripe::AccountPersonService::UpdateParams::RegisteredAddress, relationship: ::Stripe::AccountPersonService::UpdateParams::Relationship, ssn_last_4: String, verification: ::Stripe::AccountPersonService::UpdateParams::Verification).void + } + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + expand: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + person_token: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class ListParams < Stripe::RequestParams + class Relationship < Stripe::RequestParams + # A filter on the list of people returned based on whether these people are authorizers of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :authorizer + # A filter on the list of people returned based on whether these people are directors of the account's company. + sig { returns(T::Boolean) } + attr_accessor :director + # A filter on the list of people returned based on whether these people are executives of the account's company. + sig { returns(T::Boolean) } + attr_accessor :executive + # A filter on the list of people returned based on whether these people are legal guardians of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :legal_guardian + # A filter on the list of people returned based on whether these people are owners of the account's company. + sig { returns(T::Boolean) } + attr_accessor :owner + # A filter on the list of people returned based on whether these people are the representative of the account's company. + sig { returns(T::Boolean) } + attr_accessor :representative + sig { + params(authorizer: T::Boolean, director: T::Boolean, executive: T::Boolean, legal_guardian: T::Boolean, owner: T::Boolean, representative: T::Boolean).void + } + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + representative: nil + ); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filters on the list of people returned based on the person's relationship to the account's company. + sig { returns(::Stripe::AccountPersonService::ListParams::Relationship) } + attr_accessor :relationship + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, relationship: ::Stripe::AccountPersonService::ListParams::Relationship, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + relationship: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + sig { + returns(::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances::Account) + } + attr_accessor :account + sig { + params(account: ::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances::Account).void + } + def initialize(account: nil); end + end + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + sig { + returns(::Stripe::AccountPersonService::CreateParams::Documents::CompanyAuthorization) + } + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + sig { returns(::Stripe::AccountPersonService::CreateParams::Documents::Passport) } + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + sig { returns(::Stripe::AccountPersonService::CreateParams::Documents::Visa) } + attr_accessor :visa + sig { + params(company_authorization: ::Stripe::AccountPersonService::CreateParams::Documents::CompanyAuthorization, passport: ::Stripe::AccountPersonService::CreateParams::Documents::Passport, visa: ::Stripe::AccountPersonService::CreateParams::Documents::Visa).void + } + def initialize(company_authorization: nil, passport: nil, visa: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + sig { returns(T::Boolean) } + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(authorizer: T::Boolean, director: T::Boolean, executive: T::Boolean, legal_guardian: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), representative: T::Boolean, title: String).void + } + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::AccountPersonService::CreateParams::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { returns(::Stripe::AccountPersonService::CreateParams::Verification::Document) } + attr_accessor :document + sig { + params(additional_document: ::Stripe::AccountPersonService::CreateParams::Verification::AdditionalDocument, document: ::Stripe::AccountPersonService::CreateParams::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + sig { returns(::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances) } + attr_accessor :additional_tos_acceptances + # The person's address. + sig { returns(::Stripe::AccountPersonService::CreateParams::Address) } + attr_accessor :address + # The Kana variation of the person's address (Japan only). + sig { returns(::Stripe::AccountPersonService::CreateParams::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + sig { returns(::Stripe::AccountPersonService::CreateParams::AddressKanji) } + attr_accessor :address_kanji + # The person's date of birth. + sig { returns(T.nilable(::Stripe::AccountPersonService::CreateParams::Dob)) } + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::AccountPersonService::CreateParams::Documents) } + attr_accessor :documents + # The person's email address. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The person's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + sig { returns(String) } + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The person's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The person's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + sig { returns(String) } + attr_accessor :nationality + # A [person token](https://docs.stripe.com/connect/account-tokens), used to securely provide details to the person. + sig { returns(String) } + attr_accessor :person_token + # The person's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The person's registered address. + sig { returns(::Stripe::AccountPersonService::CreateParams::RegisteredAddress) } + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + sig { returns(::Stripe::AccountPersonService::CreateParams::Relationship) } + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The person's verification status. + sig { returns(::Stripe::AccountPersonService::CreateParams::Verification) } + attr_accessor :verification + sig { + params(additional_tos_acceptances: ::Stripe::AccountPersonService::CreateParams::AdditionalTosAcceptances, address: ::Stripe::AccountPersonService::CreateParams::Address, address_kana: ::Stripe::AccountPersonService::CreateParams::AddressKana, address_kanji: ::Stripe::AccountPersonService::CreateParams::AddressKanji, dob: T.nilable(::Stripe::AccountPersonService::CreateParams::Dob), documents: ::Stripe::AccountPersonService::CreateParams::Documents, email: String, expand: T::Array[String], first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), nationality: String, person_token: String, phone: String, political_exposure: String, registered_address: ::Stripe::AccountPersonService::CreateParams::RegisteredAddress, relationship: ::Stripe::AccountPersonService::CreateParams::Relationship, ssn_last_4: String, verification: ::Stripe::AccountPersonService::CreateParams::Verification).void + } + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + expand: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + person_token: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + # Creates a new person. + sig { + params(account: String, params: T.any(::Stripe::AccountPersonService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person) + } + def create(account, params = {}, opts = {}); end + + # Deletes an existing person's relationship to the account's legal entity. Any person with a relationship for an account can be deleted through the API, except if the person is the account_opener. If your integration is using the executive parameter, you cannot delete the only verified executive on file. + sig { + params(account: String, person: String, params: T.any(::Stripe::AccountPersonService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person) + } + def delete(account, person, params = {}, opts = {}); end + + # Returns a list of people associated with the account's legal entity. The people are returned sorted by creation date, with the most recent people appearing first. + sig { + params(account: String, params: T.any(::Stripe::AccountPersonService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(account, params = {}, opts = {}); end + + # Retrieves an existing person. + sig { + params(account: String, person: String, params: T.any(::Stripe::AccountPersonService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person) + } + def retrieve(account, person, params = {}, opts = {}); end + + # Updates an existing person. + sig { + params(account: String, person: String, params: T.any(::Stripe::AccountPersonService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Person) + } + def update(account, person, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_service.rbi b/rbi/stripe/services/account_service.rbi new file mode 100644 index 000000000..64d93be32 --- /dev/null +++ b/rbi/stripe/services/account_service.rbi @@ -0,0 +1,4177 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountService < StripeService + attr_reader :capabilities + attr_reader :external_accounts + attr_reader :login_links + attr_reader :persons + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(object: String, account_holder_name: String, account_holder_type: String, account_number: String, country: String, currency: String, routing_number: String).void + } + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ); end + end + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + sig { returns(String) } + attr_accessor :fiscal_year_end + sig { params(amount: Integer, currency: String, fiscal_year_end: String).void } + def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end + end + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The applicant's gross annual revenue for its preceding fiscal year. + sig { returns(::Stripe::AccountService::UpdateParams::BusinessProfile::AnnualRevenue) } + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + sig { returns(Integer) } + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + sig { returns(String) } + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + sig { + returns(::Stripe::AccountService::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue) + } + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + sig { returns(String) } + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + sig { returns(String) } + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + sig { returns(::Stripe::AccountService::UpdateParams::BusinessProfile::SupportAddress) } + attr_accessor :support_address + # A publicly available email address for sending support issues to. + sig { returns(String) } + attr_accessor :support_email + # A publicly available phone number to call with support issues. + sig { returns(String) } + attr_accessor :support_phone + # A publicly available website for handling support issues. + sig { returns(T.nilable(String)) } + attr_accessor :support_url + # The business's publicly available website. + sig { returns(String) } + attr_accessor :url + sig { + params(annual_revenue: ::Stripe::AccountService::UpdateParams::BusinessProfile::AnnualRevenue, estimated_worker_count: Integer, mcc: String, monthly_estimated_revenue: ::Stripe::AccountService::UpdateParams::BusinessProfile::MonthlyEstimatedRevenue, name: String, product_description: String, support_address: ::Stripe::AccountService::UpdateParams::BusinessProfile::SupportAddress, support_email: String, support_phone: String, support_url: T.nilable(String), url: String).void + } + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ); end + end + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # The acss_debit_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::AcssDebitPayments) } + attr_accessor :acss_debit_payments + # The affirm_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::AffirmPayments) } + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::AfterpayClearpayPayments) + } + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::AlmaPayments) } + attr_accessor :alma_payments + # The amazon_pay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::AmazonPayPayments) } + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::AuBecsDebitPayments) } + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::AutomaticIndirectTax) } + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::BancontactPayments) } + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::BankTransferPayments) } + attr_accessor :bank_transfer_payments + # The blik_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::BlikPayments) } + attr_accessor :blik_payments + # The boleto_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::BoletoPayments) } + attr_accessor :boleto_payments + # The card_issuing capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::CardIssuing) } + attr_accessor :card_issuing + # The card_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::CardPayments) } + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::CartesBancairesPayments) + } + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments) } + attr_accessor :cashapp_payments + # The eps_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments) } + attr_accessor :eps_payments + # The fpx_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::FpxPayments) } + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::GbBankTransferPayments) + } + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::GiropayPayments) } + attr_accessor :giropay_payments + # The gopay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::GopayPayments) } + attr_accessor :gopay_payments + # The grabpay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::GrabpayPayments) } + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::IdBankTransferPayments) + } + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::IdBankTransferPaymentsBca) + } + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::IdealPayments) } + attr_accessor :ideal_payments + # The india_international_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::IndiaInternationalPayments) + } + attr_accessor :india_international_payments + # The jcb_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::JcbPayments) } + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::JpBankTransferPayments) + } + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::KakaoPayPayments) } + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::KlarnaPayments) } + attr_accessor :klarna_payments + # The konbini_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::KonbiniPayments) } + attr_accessor :konbini_payments + # The kr_card_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::KrCardPayments) } + attr_accessor :kr_card_payments + # The legacy_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::LegacyPayments) } + attr_accessor :legacy_payments + # The link_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::LinkPayments) } + attr_accessor :link_payments + # The mb_way_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::MbWayPayments) } + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::MobilepayPayments) } + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::MultibancoPayments) } + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::MxBankTransferPayments) + } + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::NaverPayPayments) } + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::OxxoPayments) } + attr_accessor :oxxo_payments + # The p24_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::P24Payments) } + attr_accessor :p24_payments + # The payco_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::PaycoPayments) } + attr_accessor :payco_payments + # The paynow_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::PaynowPayments) } + attr_accessor :paynow_payments + # The paypal_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::PaypalPayments) } + attr_accessor :paypal_payments + # The payto_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::PaytoPayments) } + attr_accessor :payto_payments + # The promptpay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::PromptpayPayments) } + attr_accessor :promptpay_payments + # The qris_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::QrisPayments) } + attr_accessor :qris_payments + # The rechnung_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::RechnungPayments) } + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::RevolutPayPayments) } + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::SamsungPayPayments) } + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::SepaBankTransferPayments) + } + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::SepaDebitPayments) } + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::ShopeepayPayments) } + attr_accessor :shopeepay_payments + # The sofort_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::SofortPayments) } + attr_accessor :sofort_payments + # The swish_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::SwishPayments) } + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099K) } + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099Misc) + } + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::Transfers) } + attr_accessor :transfers + # The treasury capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::Treasury) } + attr_accessor :treasury + # The treasury_evolve capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::TreasuryEvolve) } + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::TreasuryFifthThird) } + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::TreasuryGoldmanSachs) } + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::TwintPayments) } + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::UsBankAccountAchPayments) + } + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::UpdateParams::Capabilities::UsBankTransferPayments) + } + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities::ZipPayments) } + attr_accessor :zip_payments + sig { + params(acss_debit_payments: ::Stripe::AccountService::UpdateParams::Capabilities::AcssDebitPayments, affirm_payments: ::Stripe::AccountService::UpdateParams::Capabilities::AffirmPayments, afterpay_clearpay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::AfterpayClearpayPayments, alma_payments: ::Stripe::AccountService::UpdateParams::Capabilities::AlmaPayments, amazon_pay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::AmazonPayPayments, au_becs_debit_payments: ::Stripe::AccountService::UpdateParams::Capabilities::AuBecsDebitPayments, automatic_indirect_tax: ::Stripe::AccountService::UpdateParams::Capabilities::AutomaticIndirectTax, bacs_debit_payments: ::Stripe::AccountService::UpdateParams::Capabilities::BacsDebitPayments, bancontact_payments: ::Stripe::AccountService::UpdateParams::Capabilities::BancontactPayments, bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::BankTransferPayments, blik_payments: ::Stripe::AccountService::UpdateParams::Capabilities::BlikPayments, boleto_payments: ::Stripe::AccountService::UpdateParams::Capabilities::BoletoPayments, card_issuing: ::Stripe::AccountService::UpdateParams::Capabilities::CardIssuing, card_payments: ::Stripe::AccountService::UpdateParams::Capabilities::CardPayments, cartes_bancaires_payments: ::Stripe::AccountService::UpdateParams::Capabilities::CartesBancairesPayments, cashapp_payments: ::Stripe::AccountService::UpdateParams::Capabilities::CashappPayments, eps_payments: ::Stripe::AccountService::UpdateParams::Capabilities::EpsPayments, fpx_payments: ::Stripe::AccountService::UpdateParams::Capabilities::FpxPayments, gb_bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::GbBankTransferPayments, giropay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::GiropayPayments, gopay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::GopayPayments, grabpay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::GrabpayPayments, id_bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::IdBankTransferPayments, id_bank_transfer_payments_bca: ::Stripe::AccountService::UpdateParams::Capabilities::IdBankTransferPaymentsBca, ideal_payments: ::Stripe::AccountService::UpdateParams::Capabilities::IdealPayments, india_international_payments: ::Stripe::AccountService::UpdateParams::Capabilities::IndiaInternationalPayments, jcb_payments: ::Stripe::AccountService::UpdateParams::Capabilities::JcbPayments, jp_bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::JpBankTransferPayments, kakao_pay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::KakaoPayPayments, klarna_payments: ::Stripe::AccountService::UpdateParams::Capabilities::KlarnaPayments, konbini_payments: ::Stripe::AccountService::UpdateParams::Capabilities::KonbiniPayments, kr_card_payments: ::Stripe::AccountService::UpdateParams::Capabilities::KrCardPayments, legacy_payments: ::Stripe::AccountService::UpdateParams::Capabilities::LegacyPayments, link_payments: ::Stripe::AccountService::UpdateParams::Capabilities::LinkPayments, mb_way_payments: ::Stripe::AccountService::UpdateParams::Capabilities::MbWayPayments, mobilepay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::MobilepayPayments, multibanco_payments: ::Stripe::AccountService::UpdateParams::Capabilities::MultibancoPayments, mx_bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::MxBankTransferPayments, naver_pay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::NaverPayPayments, oxxo_payments: ::Stripe::AccountService::UpdateParams::Capabilities::OxxoPayments, p24_payments: ::Stripe::AccountService::UpdateParams::Capabilities::P24Payments, payco_payments: ::Stripe::AccountService::UpdateParams::Capabilities::PaycoPayments, paynow_payments: ::Stripe::AccountService::UpdateParams::Capabilities::PaynowPayments, paypal_payments: ::Stripe::AccountService::UpdateParams::Capabilities::PaypalPayments, payto_payments: ::Stripe::AccountService::UpdateParams::Capabilities::PaytoPayments, promptpay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::PromptpayPayments, qris_payments: ::Stripe::AccountService::UpdateParams::Capabilities::QrisPayments, rechnung_payments: ::Stripe::AccountService::UpdateParams::Capabilities::RechnungPayments, revolut_pay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::RevolutPayPayments, samsung_pay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::SamsungPayPayments, sepa_bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::SepaBankTransferPayments, sepa_debit_payments: ::Stripe::AccountService::UpdateParams::Capabilities::SepaDebitPayments, shopeepay_payments: ::Stripe::AccountService::UpdateParams::Capabilities::ShopeepayPayments, sofort_payments: ::Stripe::AccountService::UpdateParams::Capabilities::SofortPayments, swish_payments: ::Stripe::AccountService::UpdateParams::Capabilities::SwishPayments, tax_reporting_us_1099_k: ::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099K, tax_reporting_us_1099_misc: ::Stripe::AccountService::UpdateParams::Capabilities::TaxReportingUs1099Misc, transfers: ::Stripe::AccountService::UpdateParams::Capabilities::Transfers, treasury: ::Stripe::AccountService::UpdateParams::Capabilities::Treasury, treasury_evolve: ::Stripe::AccountService::UpdateParams::Capabilities::TreasuryEvolve, treasury_fifth_third: ::Stripe::AccountService::UpdateParams::Capabilities::TreasuryFifthThird, treasury_goldman_sachs: ::Stripe::AccountService::UpdateParams::Capabilities::TreasuryGoldmanSachs, twint_payments: ::Stripe::AccountService::UpdateParams::Capabilities::TwintPayments, us_bank_account_ach_payments: ::Stripe::AccountService::UpdateParams::Capabilities::UsBankAccountAchPayments, us_bank_transfer_payments: ::Stripe::AccountService::UpdateParams::Capabilities::UsBankTransferPayments, zip_payments: ::Stripe::AccountService::UpdateParams::Capabilities::ZipPayments).void + } + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ); end + end + class Card < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field address_city + sig { returns(String) } + attr_accessor :address_city + # Attribute for param field address_country + sig { returns(String) } + attr_accessor :address_country + # Attribute for param field address_line1 + sig { returns(String) } + attr_accessor :address_line1 + # Attribute for param field address_line2 + sig { returns(String) } + attr_accessor :address_line2 + # Attribute for param field address_state + sig { returns(String) } + attr_accessor :address_state + # Attribute for param field address_zip + sig { returns(String) } + attr_accessor :address_zip + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field cvc + sig { returns(String) } + attr_accessor :cvc + # Attribute for param field exp_month + sig { returns(Integer) } + attr_accessor :exp_month + # Attribute for param field exp_year + sig { returns(Integer) } + attr_accessor :exp_year + # Attribute for param field name + sig { returns(String) } + attr_accessor :name + # Attribute for param field number + sig { returns(String) } + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Attribute for param field default_for_currency + sig { returns(T::Boolean) } + attr_accessor :default_for_currency + sig { + params(object: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: Integer, exp_year: Integer, name: String, number: String, metadata: T::Hash[String, String], default_for_currency: T::Boolean).void + } + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ); end + end + class CardToken < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field token + sig { returns(String) } + attr_accessor :token + sig { params(object: String, currency: String, token: String).void } + def initialize(object: nil, currency: nil, token: nil); end + end + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document verifying the business. + sig { returns(::Stripe::AccountService::UpdateParams::Company::Verification::Document) } + attr_accessor :document + sig { + params(document: ::Stripe::AccountService::UpdateParams::Company::Verification::Document).void + } + def initialize(document: nil); end + end + # The company's primary address. + sig { returns(::Stripe::AccountService::UpdateParams::Company::Address) } + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + sig { returns(::Stripe::AccountService::UpdateParams::Company::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + sig { returns(::Stripe::AccountService::UpdateParams::Company::AddressKanji) } + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + sig { returns(T::Boolean) } + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + sig { returns(T::Boolean) } + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + sig { returns(String) } + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + sig { returns(String) } + attr_accessor :export_purpose_code + # The company's legal name. + sig { returns(String) } + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + sig { returns(T::Boolean) } + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + sig { returns(::Stripe::AccountService::UpdateParams::Company::OwnershipDeclaration) } + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + sig { returns(String) } + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + sig { returns(String) } + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + sig { returns(T.nilable(String)) } + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + sig { returns(String) } + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + sig { returns(String) } + attr_accessor :tax_id_registrar + # The VAT number of the company. + sig { returns(String) } + attr_accessor :vat_id + # Information on the verification state of the company. + sig { returns(::Stripe::AccountService::UpdateParams::Company::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::AccountService::UpdateParams::Company::Address, address_kana: ::Stripe::AccountService::UpdateParams::Company::AddressKana, address_kanji: ::Stripe::AccountService::UpdateParams::Company::AddressKanji, directors_provided: T::Boolean, executives_provided: T::Boolean, export_license_id: String, export_purpose_code: String, name: String, name_kana: String, name_kanji: String, owners_provided: T::Boolean, ownership_declaration: ::Stripe::AccountService::UpdateParams::Company::OwnershipDeclaration, phone: String, registration_number: String, structure: T.nilable(String), tax_id: String, tax_id_registrar: String, vat_id: String, verification: ::Stripe::AccountService::UpdateParams::Company::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ); end + end + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + sig { + returns(::Stripe::AccountService::UpdateParams::Documents::BankAccountOwnershipVerification) + } + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + sig { returns(::Stripe::AccountService::UpdateParams::Documents::CompanyLicense) } + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + sig { + returns(::Stripe::AccountService::UpdateParams::Documents::CompanyMemorandumOfAssociation) + } + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + sig { returns(::Stripe::AccountService::UpdateParams::Documents::CompanyMinisterialDecree) } + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + sig { + returns(::Stripe::AccountService::UpdateParams::Documents::CompanyRegistrationVerification) + } + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + sig { returns(::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification) } + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + sig { returns(::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration) } + attr_accessor :proof_of_registration + sig { + params(bank_account_ownership_verification: ::Stripe::AccountService::UpdateParams::Documents::BankAccountOwnershipVerification, company_license: ::Stripe::AccountService::UpdateParams::Documents::CompanyLicense, company_memorandum_of_association: ::Stripe::AccountService::UpdateParams::Documents::CompanyMemorandumOfAssociation, company_ministerial_decree: ::Stripe::AccountService::UpdateParams::Documents::CompanyMinisterialDecree, company_registration_verification: ::Stripe::AccountService::UpdateParams::Documents::CompanyRegistrationVerification, company_tax_id_verification: ::Stripe::AccountService::UpdateParams::Documents::CompanyTaxIdVerification, proof_of_registration: ::Stripe::AccountService::UpdateParams::Documents::ProofOfRegistration).void + } + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ); end + end + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + sig { returns(T.nilable(String)) } + attr_accessor :payments_pricing + sig { params(payments_pricing: T.nilable(String)).void } + def initialize(payments_pricing: nil); end + end + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(director: T::Boolean, executive: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), title: String).void + } + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::AccountService::UpdateParams::Individual::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::AccountService::UpdateParams::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(additional_document: ::Stripe::AccountService::UpdateParams::Individual::Verification::AdditionalDocument, document: ::Stripe::AccountService::UpdateParams::Individual::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # The individual's primary address. + sig { returns(::Stripe::AccountService::UpdateParams::Individual::Address) } + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + sig { returns(::Stripe::AccountService::UpdateParams::Individual::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + sig { returns(::Stripe::AccountService::UpdateParams::Individual::AddressKanji) } + attr_accessor :address_kanji + # The individual's date of birth. + sig { returns(T.nilable(::Stripe::AccountService::UpdateParams::Individual::Dob)) } + attr_accessor :dob + # The individual's email address. + sig { returns(String) } + attr_accessor :email + # The individual's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The individual's gender + sig { returns(String) } + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The individual's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The individual's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The individual's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The individual's registered address. + sig { returns(::Stripe::AccountService::UpdateParams::Individual::RegisteredAddress) } + attr_accessor :registered_address + # Describes the person’s relationship to the account. + sig { returns(::Stripe::AccountService::UpdateParams::Individual::Relationship) } + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The individual's verification document information. + sig { returns(::Stripe::AccountService::UpdateParams::Individual::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::AccountService::UpdateParams::Individual::Address, address_kana: ::Stripe::AccountService::UpdateParams::Individual::AddressKana, address_kanji: ::Stripe::AccountService::UpdateParams::Individual::AddressKanji, dob: T.nilable(::Stripe::AccountService::UpdateParams::Individual::Dob), email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), phone: String, political_exposure: String, registered_address: ::Stripe::AccountService::UpdateParams::Individual::RegisteredAddress, relationship: ::Stripe::AccountService::UpdateParams::Individual::Relationship, ssn_last_4: String, verification: ::Stripe::AccountService::UpdateParams::Individual::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::AccountService::UpdateParams::RiskControls::Charges) } + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::AccountService::UpdateParams::RiskControls::Payouts) } + attr_accessor :payouts + sig { + params(charges: ::Stripe::AccountService::UpdateParams::RiskControls::Charges, payouts: ::Stripe::AccountService::UpdateParams::RiskControls::Payouts).void + } + def initialize(charges: nil, payouts: nil); end + end + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + sig { returns(String) } + attr_accessor :display_name + sig { params(display_name: String).void } + def initialize(display_name: nil); end + end + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + sig { returns(String) } + attr_accessor :account_holder_name + # Bank BCA business account number + sig { returns(String) } + attr_accessor :business_account_number + sig { params(account_holder_name: String, business_account_number: String).void } + def initialize(account_holder_name: nil, business_account_number: nil); end + end + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + sig { returns(String) } + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + sig { returns(String) } + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + sig { returns(String) } + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + sig { returns(String) } + attr_accessor :secondary_color + sig { + params(icon: String, logo: String, primary_color: String, secondary_color: String).void + } + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end + end + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + sig { returns(T::Hash[String, String]) } + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + sig { returns(T::Hash[String, T::Array[String]]) } + attr_accessor :payout_destination_selector + sig { + params(payout_destination: T::Hash[String, String], payout_destination_selector: T::Hash[String, T::Array[String]]).void + } + def initialize(payout_destination: nil, payout_destination_selector: nil); end + end + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + sig { + returns(::Stripe::AccountService::UpdateParams::Settings::CardIssuing::TosAcceptance) + } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::AccountService::UpdateParams::Settings::CardIssuing::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + sig { returns(T::Boolean) } + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + sig { returns(T::Boolean) } + attr_accessor :cvc_failure + sig { params(avs_failure: T::Boolean, cvc_failure: T::Boolean).void } + def initialize(avs_failure: nil, cvc_failure: nil); end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::CardPayments::DeclineOn) } + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(String) } + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kanji + sig { + params(decline_on: ::Stripe::AccountService::UpdateParams::Settings::CardPayments::DeclineOn, statement_descriptor_prefix: String, statement_descriptor_prefix_kana: T.nilable(String), statement_descriptor_prefix_kanji: T.nilable(String)).void + } + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ); end + end + class Invoices < Stripe::RequestParams + # The list of default Account Tax IDs to automatically include on invoices. Account Tax IDs get added when an invoice is finalized. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_account_tax_ids + sig { params(default_account_tax_ids: T.nilable(T::Array[String])).void } + def initialize(default_account_tax_ids: nil); end + end + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kanji + sig { + params(statement_descriptor: String, statement_descriptor_kana: String, statement_descriptor_kanji: String).void + } + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ); end + end + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + sig { returns(T.any(String, Integer)) } + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + sig { returns(String) } + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + sig { returns(Integer) } + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + sig { returns(String) } + attr_accessor :weekly_anchor + sig { + params(delay_days: T.any(String, Integer), interval: String, monthly_anchor: Integer, weekly_anchor: String).void + } + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + weekly_anchor: nil + ); end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + sig { returns(T::Boolean) } + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Payouts::Schedule) } + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(debit_negative_balances: T::Boolean, schedule: ::Stripe::AccountService::UpdateParams::Settings::Payouts::Schedule, statement_descriptor: String).void + } + def initialize( + debit_negative_balances: nil, + schedule: nil, + statement_descriptor: nil + ); end + end + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + sig { returns(T::Boolean) } + attr_accessor :consented_to_paperless_delivery + sig { params(consented_to_paperless_delivery: T::Boolean).void } + def initialize(consented_to_paperless_delivery: nil); end + end + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Treasury::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::AccountService::UpdateParams::Settings::Treasury::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + # Settings specific to Bacs Direct Debit payments. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::BankBcaOnboarding) } + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Branding) } + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Capital) } + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::CardIssuing) } + attr_accessor :card_issuing + # Settings specific to card charging on the account. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::CardPayments) } + attr_accessor :card_payments + # Settings specific to the account's use of Invoices. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Invoices) } + attr_accessor :invoices + # Settings that apply across payment methods for charging on the account. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Payments) } + attr_accessor :payments + # Settings specific to the account's payouts. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Payouts) } + attr_accessor :payouts + # Settings specific to the account's tax forms. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::TaxForms) } + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + sig { returns(::Stripe::AccountService::UpdateParams::Settings::Treasury) } + attr_accessor :treasury + sig { + params(bacs_debit_payments: ::Stripe::AccountService::UpdateParams::Settings::BacsDebitPayments, bank_bca_onboarding: ::Stripe::AccountService::UpdateParams::Settings::BankBcaOnboarding, branding: ::Stripe::AccountService::UpdateParams::Settings::Branding, capital: ::Stripe::AccountService::UpdateParams::Settings::Capital, card_issuing: ::Stripe::AccountService::UpdateParams::Settings::CardIssuing, card_payments: ::Stripe::AccountService::UpdateParams::Settings::CardPayments, invoices: ::Stripe::AccountService::UpdateParams::Settings::Invoices, payments: ::Stripe::AccountService::UpdateParams::Settings::Payments, payouts: ::Stripe::AccountService::UpdateParams::Settings::Payouts, tax_forms: ::Stripe::AccountService::UpdateParams::Settings::TaxForms, treasury: ::Stripe::AccountService::UpdateParams::Settings::Treasury).void + } + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + invoices: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ); end + end + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :ip + # The user's service agreement type. + sig { returns(String) } + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, service_agreement: String, user_agent: String).void + } + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + sig { returns(String) } + attr_accessor :account_token + # Business information about the account. + sig { returns(::Stripe::AccountService::UpdateParams::BusinessProfile) } + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(String) } + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + sig { returns(::Stripe::AccountService::UpdateParams::Capabilities) } + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::AccountService::UpdateParams::Company) } + attr_accessor :company + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + sig { returns(String) } + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::AccountService::UpdateParams::Documents) } + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { + returns(T.nilable(T.any(String, ::Stripe::AccountService::UpdateParams::BankAccount, ::Stripe::AccountService::UpdateParams::Card, ::Stripe::AccountService::UpdateParams::CardToken))) + } + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + sig { returns(::Stripe::AccountService::UpdateParams::Groups) } + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::AccountService::UpdateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::AccountService::UpdateParams::RiskControls) } + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + sig { returns(::Stripe::AccountService::UpdateParams::Settings) } + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + sig { returns(::Stripe::AccountService::UpdateParams::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(account_token: String, business_profile: ::Stripe::AccountService::UpdateParams::BusinessProfile, business_type: String, capabilities: ::Stripe::AccountService::UpdateParams::Capabilities, company: ::Stripe::AccountService::UpdateParams::Company, default_currency: String, documents: ::Stripe::AccountService::UpdateParams::Documents, email: String, expand: T::Array[String], external_account: T.nilable(T.any(String, ::Stripe::AccountService::UpdateParams::BankAccount, ::Stripe::AccountService::UpdateParams::Card, ::Stripe::AccountService::UpdateParams::CardToken)), groups: ::Stripe::AccountService::UpdateParams::Groups, individual: ::Stripe::AccountService::UpdateParams::Individual, metadata: T.nilable(T::Hash[String, String]), risk_controls: ::Stripe::AccountService::UpdateParams::RiskControls, settings: ::Stripe::AccountService::UpdateParams::Settings, tos_acceptance: ::Stripe::AccountService::UpdateParams::TosAcceptance).void + } + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil + ); end + end + class RetrieveCurrentParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return connected accounts that were created during the given date interval. + sig { returns(T.any(::Stripe::AccountService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::AccountService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BankAccount < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # The name of the person or business that owns the bank account.This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The routing number, sort code, or other country-appropriateinstitution number for the bank account. For US bank accounts, this is required and should bethe ACH routing number, not the wire routing number. If you are providing an IBAN for`account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(object: String, account_holder_name: String, account_holder_type: String, account_number: String, country: String, currency: String, routing_number: String).void + } + def initialize( + object: nil, + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + country: nil, + currency: nil, + routing_number: nil + ); end + end + class BusinessProfile < Stripe::RequestParams + class AnnualRevenue < Stripe::RequestParams + # A non-negative integer representing the amount in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The close-out date of the preceding fiscal year in ISO 8601 format. E.g. 2023-12-31 for the 31st of December, 2023. + sig { returns(String) } + attr_accessor :fiscal_year_end + sig { params(amount: Integer, currency: String, fiscal_year_end: String).void } + def initialize(amount: nil, currency: nil, fiscal_year_end: nil); end + end + class MonthlyEstimatedRevenue < Stripe::RequestParams + # A non-negative integer representing how much to charge in the [smallest currency unit](/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class SupportAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The applicant's gross annual revenue for its preceding fiscal year. + sig { returns(::Stripe::AccountService::CreateParams::BusinessProfile::AnnualRevenue) } + attr_accessor :annual_revenue + # An estimated upper bound of employees, contractors, vendors, etc. currently working for the business. + sig { returns(Integer) } + attr_accessor :estimated_worker_count + # [The merchant category code for the account](/connect/setting-mcc). MCCs are used to classify businesses based on the goods or services they provide. + sig { returns(String) } + attr_accessor :mcc + # An estimate of the monthly revenue of the business. Only accepted for accounts in Brazil and India. + sig { + returns(::Stripe::AccountService::CreateParams::BusinessProfile::MonthlyEstimatedRevenue) + } + attr_accessor :monthly_estimated_revenue + # The customer-facing business name. + sig { returns(String) } + attr_accessor :name + # Internal-only description of the product sold by, or service provided by, the business. Used by Stripe for risk and underwriting purposes. + sig { returns(String) } + attr_accessor :product_description + # A publicly available mailing address for sending support issues to. + sig { returns(::Stripe::AccountService::CreateParams::BusinessProfile::SupportAddress) } + attr_accessor :support_address + # A publicly available email address for sending support issues to. + sig { returns(String) } + attr_accessor :support_email + # A publicly available phone number to call with support issues. + sig { returns(String) } + attr_accessor :support_phone + # A publicly available website for handling support issues. + sig { returns(T.nilable(String)) } + attr_accessor :support_url + # The business's publicly available website. + sig { returns(String) } + attr_accessor :url + sig { + params(annual_revenue: ::Stripe::AccountService::CreateParams::BusinessProfile::AnnualRevenue, estimated_worker_count: Integer, mcc: String, monthly_estimated_revenue: ::Stripe::AccountService::CreateParams::BusinessProfile::MonthlyEstimatedRevenue, name: String, product_description: String, support_address: ::Stripe::AccountService::CreateParams::BusinessProfile::SupportAddress, support_email: String, support_phone: String, support_url: T.nilable(String), url: String).void + } + def initialize( + annual_revenue: nil, + estimated_worker_count: nil, + mcc: nil, + monthly_estimated_revenue: nil, + name: nil, + product_description: nil, + support_address: nil, + support_email: nil, + support_phone: nil, + support_url: nil, + url: nil + ); end + end + class Capabilities < Stripe::RequestParams + class AcssDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AffirmPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AfterpayClearpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AlmaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AmazonPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AuBecsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class AutomaticIndirectTax < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BacsDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BancontactPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BlikPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class BoletoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardIssuing < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CartesBancairesPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class CashappPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class EpsPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FpxPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GbBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GiropayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GopayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class GrabpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdBankTransferPaymentsBca < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IdealPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class IndiaInternationalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JcbPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class JpBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KakaoPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KlarnaPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KonbiniPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class KrCardPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LegacyPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class LinkPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MbWayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MobilepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MultibancoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class MxBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class NaverPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OxxoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class P24Payments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaycoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaynowPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaypalPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PaytoPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class PromptpayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class QrisPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RechnungPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class RevolutPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SamsungPayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SepaDebitPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ShopeepayPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SofortPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class SwishPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099K < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TaxReportingUs1099Misc < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Transfers < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class Treasury < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryEvolve < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryFifthThird < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TreasuryGoldmanSachs < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class TwintPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankAccountAchPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsBankTransferPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class ZipPayments < Stripe::RequestParams + # Passing true requests the capability for the account, if it is not already requested. A requested capability may not immediately become active. Any requirements to activate the capability are returned in the `requirements` arrays. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # The acss_debit_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::AcssDebitPayments) } + attr_accessor :acss_debit_payments + # The affirm_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::AffirmPayments) } + attr_accessor :affirm_payments + # The afterpay_clearpay_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::AfterpayClearpayPayments) + } + attr_accessor :afterpay_clearpay_payments + # The alma_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::AlmaPayments) } + attr_accessor :alma_payments + # The amazon_pay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::AmazonPayPayments) } + attr_accessor :amazon_pay_payments + # The au_becs_debit_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::AuBecsDebitPayments) } + attr_accessor :au_becs_debit_payments + # The automatic_indirect_tax capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::AutomaticIndirectTax) } + attr_accessor :automatic_indirect_tax + # The bacs_debit_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # The bancontact_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::BancontactPayments) } + attr_accessor :bancontact_payments + # The bank_transfer_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::BankTransferPayments) } + attr_accessor :bank_transfer_payments + # The blik_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::BlikPayments) } + attr_accessor :blik_payments + # The boleto_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::BoletoPayments) } + attr_accessor :boleto_payments + # The card_issuing capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::CardIssuing) } + attr_accessor :card_issuing + # The card_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::CardPayments) } + attr_accessor :card_payments + # The cartes_bancaires_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::CartesBancairesPayments) + } + attr_accessor :cartes_bancaires_payments + # The cashapp_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::CashappPayments) } + attr_accessor :cashapp_payments + # The eps_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::EpsPayments) } + attr_accessor :eps_payments + # The fpx_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::FpxPayments) } + attr_accessor :fpx_payments + # The gb_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::GbBankTransferPayments) + } + attr_accessor :gb_bank_transfer_payments + # The giropay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::GiropayPayments) } + attr_accessor :giropay_payments + # The gopay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::GopayPayments) } + attr_accessor :gopay_payments + # The grabpay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::GrabpayPayments) } + attr_accessor :grabpay_payments + # The id_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::IdBankTransferPayments) + } + attr_accessor :id_bank_transfer_payments + # The id_bank_transfer_payments_bca capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::IdBankTransferPaymentsBca) + } + attr_accessor :id_bank_transfer_payments_bca + # The ideal_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::IdealPayments) } + attr_accessor :ideal_payments + # The india_international_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::IndiaInternationalPayments) + } + attr_accessor :india_international_payments + # The jcb_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::JcbPayments) } + attr_accessor :jcb_payments + # The jp_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::JpBankTransferPayments) + } + attr_accessor :jp_bank_transfer_payments + # The kakao_pay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::KakaoPayPayments) } + attr_accessor :kakao_pay_payments + # The klarna_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::KlarnaPayments) } + attr_accessor :klarna_payments + # The konbini_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::KonbiniPayments) } + attr_accessor :konbini_payments + # The kr_card_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::KrCardPayments) } + attr_accessor :kr_card_payments + # The legacy_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::LegacyPayments) } + attr_accessor :legacy_payments + # The link_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::LinkPayments) } + attr_accessor :link_payments + # The mb_way_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::MbWayPayments) } + attr_accessor :mb_way_payments + # The mobilepay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::MobilepayPayments) } + attr_accessor :mobilepay_payments + # The multibanco_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::MultibancoPayments) } + attr_accessor :multibanco_payments + # The mx_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::MxBankTransferPayments) + } + attr_accessor :mx_bank_transfer_payments + # The naver_pay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::NaverPayPayments) } + attr_accessor :naver_pay_payments + # The oxxo_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::OxxoPayments) } + attr_accessor :oxxo_payments + # The p24_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::P24Payments) } + attr_accessor :p24_payments + # The payco_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::PaycoPayments) } + attr_accessor :payco_payments + # The paynow_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::PaynowPayments) } + attr_accessor :paynow_payments + # The paypal_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::PaypalPayments) } + attr_accessor :paypal_payments + # The payto_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::PaytoPayments) } + attr_accessor :payto_payments + # The promptpay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::PromptpayPayments) } + attr_accessor :promptpay_payments + # The qris_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::QrisPayments) } + attr_accessor :qris_payments + # The rechnung_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::RechnungPayments) } + attr_accessor :rechnung_payments + # The revolut_pay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::RevolutPayPayments) } + attr_accessor :revolut_pay_payments + # The samsung_pay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::SamsungPayPayments) } + attr_accessor :samsung_pay_payments + # The sepa_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::SepaBankTransferPayments) + } + attr_accessor :sepa_bank_transfer_payments + # The sepa_debit_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::SepaDebitPayments) } + attr_accessor :sepa_debit_payments + # The shopeepay_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::ShopeepayPayments) } + attr_accessor :shopeepay_payments + # The sofort_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::SofortPayments) } + attr_accessor :sofort_payments + # The swish_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::SwishPayments) } + attr_accessor :swish_payments + # The tax_reporting_us_1099_k capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099K) } + attr_accessor :tax_reporting_us_1099_k + # The tax_reporting_us_1099_misc capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099Misc) + } + attr_accessor :tax_reporting_us_1099_misc + # The transfers capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::Transfers) } + attr_accessor :transfers + # The treasury capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::Treasury) } + attr_accessor :treasury + # The treasury_evolve capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::TreasuryEvolve) } + attr_accessor :treasury_evolve + # The treasury_fifth_third capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::TreasuryFifthThird) } + attr_accessor :treasury_fifth_third + # The treasury_goldman_sachs capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::TreasuryGoldmanSachs) } + attr_accessor :treasury_goldman_sachs + # The twint_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::TwintPayments) } + attr_accessor :twint_payments + # The us_bank_account_ach_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::UsBankAccountAchPayments) + } + attr_accessor :us_bank_account_ach_payments + # The us_bank_transfer_payments capability. + sig { + returns(::Stripe::AccountService::CreateParams::Capabilities::UsBankTransferPayments) + } + attr_accessor :us_bank_transfer_payments + # The zip_payments capability. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities::ZipPayments) } + attr_accessor :zip_payments + sig { + params(acss_debit_payments: ::Stripe::AccountService::CreateParams::Capabilities::AcssDebitPayments, affirm_payments: ::Stripe::AccountService::CreateParams::Capabilities::AffirmPayments, afterpay_clearpay_payments: ::Stripe::AccountService::CreateParams::Capabilities::AfterpayClearpayPayments, alma_payments: ::Stripe::AccountService::CreateParams::Capabilities::AlmaPayments, amazon_pay_payments: ::Stripe::AccountService::CreateParams::Capabilities::AmazonPayPayments, au_becs_debit_payments: ::Stripe::AccountService::CreateParams::Capabilities::AuBecsDebitPayments, automatic_indirect_tax: ::Stripe::AccountService::CreateParams::Capabilities::AutomaticIndirectTax, bacs_debit_payments: ::Stripe::AccountService::CreateParams::Capabilities::BacsDebitPayments, bancontact_payments: ::Stripe::AccountService::CreateParams::Capabilities::BancontactPayments, bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::BankTransferPayments, blik_payments: ::Stripe::AccountService::CreateParams::Capabilities::BlikPayments, boleto_payments: ::Stripe::AccountService::CreateParams::Capabilities::BoletoPayments, card_issuing: ::Stripe::AccountService::CreateParams::Capabilities::CardIssuing, card_payments: ::Stripe::AccountService::CreateParams::Capabilities::CardPayments, cartes_bancaires_payments: ::Stripe::AccountService::CreateParams::Capabilities::CartesBancairesPayments, cashapp_payments: ::Stripe::AccountService::CreateParams::Capabilities::CashappPayments, eps_payments: ::Stripe::AccountService::CreateParams::Capabilities::EpsPayments, fpx_payments: ::Stripe::AccountService::CreateParams::Capabilities::FpxPayments, gb_bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::GbBankTransferPayments, giropay_payments: ::Stripe::AccountService::CreateParams::Capabilities::GiropayPayments, gopay_payments: ::Stripe::AccountService::CreateParams::Capabilities::GopayPayments, grabpay_payments: ::Stripe::AccountService::CreateParams::Capabilities::GrabpayPayments, id_bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::IdBankTransferPayments, id_bank_transfer_payments_bca: ::Stripe::AccountService::CreateParams::Capabilities::IdBankTransferPaymentsBca, ideal_payments: ::Stripe::AccountService::CreateParams::Capabilities::IdealPayments, india_international_payments: ::Stripe::AccountService::CreateParams::Capabilities::IndiaInternationalPayments, jcb_payments: ::Stripe::AccountService::CreateParams::Capabilities::JcbPayments, jp_bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::JpBankTransferPayments, kakao_pay_payments: ::Stripe::AccountService::CreateParams::Capabilities::KakaoPayPayments, klarna_payments: ::Stripe::AccountService::CreateParams::Capabilities::KlarnaPayments, konbini_payments: ::Stripe::AccountService::CreateParams::Capabilities::KonbiniPayments, kr_card_payments: ::Stripe::AccountService::CreateParams::Capabilities::KrCardPayments, legacy_payments: ::Stripe::AccountService::CreateParams::Capabilities::LegacyPayments, link_payments: ::Stripe::AccountService::CreateParams::Capabilities::LinkPayments, mb_way_payments: ::Stripe::AccountService::CreateParams::Capabilities::MbWayPayments, mobilepay_payments: ::Stripe::AccountService::CreateParams::Capabilities::MobilepayPayments, multibanco_payments: ::Stripe::AccountService::CreateParams::Capabilities::MultibancoPayments, mx_bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::MxBankTransferPayments, naver_pay_payments: ::Stripe::AccountService::CreateParams::Capabilities::NaverPayPayments, oxxo_payments: ::Stripe::AccountService::CreateParams::Capabilities::OxxoPayments, p24_payments: ::Stripe::AccountService::CreateParams::Capabilities::P24Payments, payco_payments: ::Stripe::AccountService::CreateParams::Capabilities::PaycoPayments, paynow_payments: ::Stripe::AccountService::CreateParams::Capabilities::PaynowPayments, paypal_payments: ::Stripe::AccountService::CreateParams::Capabilities::PaypalPayments, payto_payments: ::Stripe::AccountService::CreateParams::Capabilities::PaytoPayments, promptpay_payments: ::Stripe::AccountService::CreateParams::Capabilities::PromptpayPayments, qris_payments: ::Stripe::AccountService::CreateParams::Capabilities::QrisPayments, rechnung_payments: ::Stripe::AccountService::CreateParams::Capabilities::RechnungPayments, revolut_pay_payments: ::Stripe::AccountService::CreateParams::Capabilities::RevolutPayPayments, samsung_pay_payments: ::Stripe::AccountService::CreateParams::Capabilities::SamsungPayPayments, sepa_bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::SepaBankTransferPayments, sepa_debit_payments: ::Stripe::AccountService::CreateParams::Capabilities::SepaDebitPayments, shopeepay_payments: ::Stripe::AccountService::CreateParams::Capabilities::ShopeepayPayments, sofort_payments: ::Stripe::AccountService::CreateParams::Capabilities::SofortPayments, swish_payments: ::Stripe::AccountService::CreateParams::Capabilities::SwishPayments, tax_reporting_us_1099_k: ::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099K, tax_reporting_us_1099_misc: ::Stripe::AccountService::CreateParams::Capabilities::TaxReportingUs1099Misc, transfers: ::Stripe::AccountService::CreateParams::Capabilities::Transfers, treasury: ::Stripe::AccountService::CreateParams::Capabilities::Treasury, treasury_evolve: ::Stripe::AccountService::CreateParams::Capabilities::TreasuryEvolve, treasury_fifth_third: ::Stripe::AccountService::CreateParams::Capabilities::TreasuryFifthThird, treasury_goldman_sachs: ::Stripe::AccountService::CreateParams::Capabilities::TreasuryGoldmanSachs, twint_payments: ::Stripe::AccountService::CreateParams::Capabilities::TwintPayments, us_bank_account_ach_payments: ::Stripe::AccountService::CreateParams::Capabilities::UsBankAccountAchPayments, us_bank_transfer_payments: ::Stripe::AccountService::CreateParams::Capabilities::UsBankTransferPayments, zip_payments: ::Stripe::AccountService::CreateParams::Capabilities::ZipPayments).void + } + def initialize( + acss_debit_payments: nil, + affirm_payments: nil, + afterpay_clearpay_payments: nil, + alma_payments: nil, + amazon_pay_payments: nil, + au_becs_debit_payments: nil, + automatic_indirect_tax: nil, + bacs_debit_payments: nil, + bancontact_payments: nil, + bank_transfer_payments: nil, + blik_payments: nil, + boleto_payments: nil, + card_issuing: nil, + card_payments: nil, + cartes_bancaires_payments: nil, + cashapp_payments: nil, + eps_payments: nil, + fpx_payments: nil, + gb_bank_transfer_payments: nil, + giropay_payments: nil, + gopay_payments: nil, + grabpay_payments: nil, + id_bank_transfer_payments: nil, + id_bank_transfer_payments_bca: nil, + ideal_payments: nil, + india_international_payments: nil, + jcb_payments: nil, + jp_bank_transfer_payments: nil, + kakao_pay_payments: nil, + klarna_payments: nil, + konbini_payments: nil, + kr_card_payments: nil, + legacy_payments: nil, + link_payments: nil, + mb_way_payments: nil, + mobilepay_payments: nil, + multibanco_payments: nil, + mx_bank_transfer_payments: nil, + naver_pay_payments: nil, + oxxo_payments: nil, + p24_payments: nil, + payco_payments: nil, + paynow_payments: nil, + paypal_payments: nil, + payto_payments: nil, + promptpay_payments: nil, + qris_payments: nil, + rechnung_payments: nil, + revolut_pay_payments: nil, + samsung_pay_payments: nil, + sepa_bank_transfer_payments: nil, + sepa_debit_payments: nil, + shopeepay_payments: nil, + sofort_payments: nil, + swish_payments: nil, + tax_reporting_us_1099_k: nil, + tax_reporting_us_1099_misc: nil, + transfers: nil, + treasury: nil, + treasury_evolve: nil, + treasury_fifth_third: nil, + treasury_goldman_sachs: nil, + twint_payments: nil, + us_bank_account_ach_payments: nil, + us_bank_transfer_payments: nil, + zip_payments: nil + ); end + end + class Card < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field address_city + sig { returns(String) } + attr_accessor :address_city + # Attribute for param field address_country + sig { returns(String) } + attr_accessor :address_country + # Attribute for param field address_line1 + sig { returns(String) } + attr_accessor :address_line1 + # Attribute for param field address_line2 + sig { returns(String) } + attr_accessor :address_line2 + # Attribute for param field address_state + sig { returns(String) } + attr_accessor :address_state + # Attribute for param field address_zip + sig { returns(String) } + attr_accessor :address_zip + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field cvc + sig { returns(String) } + attr_accessor :cvc + # Attribute for param field exp_month + sig { returns(Integer) } + attr_accessor :exp_month + # Attribute for param field exp_year + sig { returns(Integer) } + attr_accessor :exp_year + # Attribute for param field name + sig { returns(String) } + attr_accessor :name + # Attribute for param field number + sig { returns(String) } + attr_accessor :number + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Attribute for param field default_for_currency + sig { returns(T::Boolean) } + attr_accessor :default_for_currency + sig { + params(object: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: Integer, exp_year: Integer, name: String, number: String, metadata: T::Hash[String, String], default_for_currency: T::Boolean).void + } + def initialize( + object: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + number: nil, + metadata: nil, + default_for_currency: nil + ); end + end + class CardToken < Stripe::RequestParams + # Attribute for param field object + sig { returns(String) } + attr_accessor :object + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field token + sig { returns(String) } + attr_accessor :token + sig { params(object: String, currency: String, token: String).void } + def initialize(object: nil, currency: nil, token: nil); end + end + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document verifying the business. + sig { returns(::Stripe::AccountService::CreateParams::Company::Verification::Document) } + attr_accessor :document + sig { + params(document: ::Stripe::AccountService::CreateParams::Company::Verification::Document).void + } + def initialize(document: nil); end + end + # The company's primary address. + sig { returns(::Stripe::AccountService::CreateParams::Company::Address) } + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + sig { returns(::Stripe::AccountService::CreateParams::Company::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + sig { returns(::Stripe::AccountService::CreateParams::Company::AddressKanji) } + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + sig { returns(T::Boolean) } + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + sig { returns(T::Boolean) } + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + sig { returns(String) } + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + sig { returns(String) } + attr_accessor :export_purpose_code + # The company's legal name. + sig { returns(String) } + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + sig { returns(T::Boolean) } + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + sig { returns(::Stripe::AccountService::CreateParams::Company::OwnershipDeclaration) } + attr_accessor :ownership_declaration + # The company's phone number (used for verification). + sig { returns(String) } + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + sig { returns(String) } + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + sig { returns(T.nilable(String)) } + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + sig { returns(String) } + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + sig { returns(String) } + attr_accessor :tax_id_registrar + # The VAT number of the company. + sig { returns(String) } + attr_accessor :vat_id + # Information on the verification state of the company. + sig { returns(::Stripe::AccountService::CreateParams::Company::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::AccountService::CreateParams::Company::Address, address_kana: ::Stripe::AccountService::CreateParams::Company::AddressKana, address_kanji: ::Stripe::AccountService::CreateParams::Company::AddressKanji, directors_provided: T::Boolean, executives_provided: T::Boolean, export_license_id: String, export_purpose_code: String, name: String, name_kana: String, name_kanji: String, owners_provided: T::Boolean, ownership_declaration: ::Stripe::AccountService::CreateParams::Company::OwnershipDeclaration, phone: String, registration_number: String, structure: T.nilable(String), tax_id: String, tax_id_registrar: String, vat_id: String, verification: ::Stripe::AccountService::CreateParams::Company::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ); end + end + class Controller < Stripe::RequestParams + class Application < Stripe::RequestParams + # Whether the controller is liable for losses on this account. For details, see [Understanding Connect Account Balances](https://stripe.com/docs/connect/account-balances). + sig { returns(T::Boolean) } + attr_accessor :loss_liable + # Whether the controller owns onboarding for this account. + sig { returns(T::Boolean) } + attr_accessor :onboarding_owner + # Whether the controller has pricing controls for this account. + sig { returns(T::Boolean) } + attr_accessor :pricing_controls + sig { + params(loss_liable: T::Boolean, onboarding_owner: T::Boolean, pricing_controls: T::Boolean).void + } + def initialize(loss_liable: nil, onboarding_owner: nil, pricing_controls: nil); end + end + class Dashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Fees < Stripe::RequestParams + # A value indicating the responsible payer of Stripe fees on this account. Defaults to `account`. Learn more about [fee behavior on connected accounts](https://docs.stripe.com/connect/direct-charges-fee-payer-behavior). + sig { returns(String) } + attr_accessor :payer + sig { params(payer: String).void } + def initialize(payer: nil); end + end + class Losses < Stripe::RequestParams + # A value indicating who is liable when this account can't pay back negative balances resulting from payments. Defaults to `stripe`. + sig { returns(String) } + attr_accessor :payments + sig { params(payments: String).void } + def initialize(payments: nil); end + end + class StripeDashboard < Stripe::RequestParams + # Whether this account should have access to the full Stripe Dashboard (`full`), to the Express Dashboard (`express`), or to no Stripe-hosted dashboard (`none`). Defaults to `full`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # A hash of configuration describing the Connect application that controls the account. + sig { returns(::Stripe::AccountService::CreateParams::Controller::Application) } + attr_accessor :application + # Properties of the account's dashboard. + sig { returns(::Stripe::AccountService::CreateParams::Controller::Dashboard) } + attr_accessor :dashboard + # A hash of configuration for who pays Stripe fees for product usage on this account. + sig { returns(::Stripe::AccountService::CreateParams::Controller::Fees) } + attr_accessor :fees + # A hash of configuration for products that have negative balance liability, and whether Stripe or a Connect application is responsible for them. + sig { returns(::Stripe::AccountService::CreateParams::Controller::Losses) } + attr_accessor :losses + # A value indicating responsibility for collecting updated information when requirements on the account are due or change. Defaults to `stripe`. + sig { returns(String) } + attr_accessor :requirement_collection + # A hash of configuration for Stripe-hosted dashboards. + sig { returns(::Stripe::AccountService::CreateParams::Controller::StripeDashboard) } + attr_accessor :stripe_dashboard + sig { + params(application: ::Stripe::AccountService::CreateParams::Controller::Application, dashboard: ::Stripe::AccountService::CreateParams::Controller::Dashboard, fees: ::Stripe::AccountService::CreateParams::Controller::Fees, losses: ::Stripe::AccountService::CreateParams::Controller::Losses, requirement_collection: String, stripe_dashboard: ::Stripe::AccountService::CreateParams::Controller::StripeDashboard).void + } + def initialize( + application: nil, + dashboard: nil, + fees: nil, + losses: nil, + requirement_collection: nil, + stripe_dashboard: nil + ); end + end + class Documents < Stripe::RequestParams + class BankAccountOwnershipVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyLicense < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMemorandumOfAssociation < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyMinisterialDecree < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyRegistrationVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class CompanyTaxIdVerification < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class ProofOfRegistration < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that support the [Bank account ownership verification](https://support.stripe.com/questions/bank-account-ownership-verification) requirement. Must be a document associated with the account’s primary active bank account that displays the last 4 digits of the account number, either a statement or a check. + sig { + returns(::Stripe::AccountService::CreateParams::Documents::BankAccountOwnershipVerification) + } + attr_accessor :bank_account_ownership_verification + # One or more documents that demonstrate proof of a company's license to operate. + sig { returns(::Stripe::AccountService::CreateParams::Documents::CompanyLicense) } + attr_accessor :company_license + # One or more documents showing the company's Memorandum of Association. + sig { + returns(::Stripe::AccountService::CreateParams::Documents::CompanyMemorandumOfAssociation) + } + attr_accessor :company_memorandum_of_association + # (Certain countries only) One or more documents showing the ministerial decree legalizing the company's establishment. + sig { returns(::Stripe::AccountService::CreateParams::Documents::CompanyMinisterialDecree) } + attr_accessor :company_ministerial_decree + # One or more documents that demonstrate proof of a company's registration with the appropriate local authorities. + sig { + returns(::Stripe::AccountService::CreateParams::Documents::CompanyRegistrationVerification) + } + attr_accessor :company_registration_verification + # One or more documents that demonstrate proof of a company's tax ID. + sig { returns(::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification) } + attr_accessor :company_tax_id_verification + # One or more documents showing the company’s proof of registration with the national business registry. + sig { returns(::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration) } + attr_accessor :proof_of_registration + sig { + params(bank_account_ownership_verification: ::Stripe::AccountService::CreateParams::Documents::BankAccountOwnershipVerification, company_license: ::Stripe::AccountService::CreateParams::Documents::CompanyLicense, company_memorandum_of_association: ::Stripe::AccountService::CreateParams::Documents::CompanyMemorandumOfAssociation, company_ministerial_decree: ::Stripe::AccountService::CreateParams::Documents::CompanyMinisterialDecree, company_registration_verification: ::Stripe::AccountService::CreateParams::Documents::CompanyRegistrationVerification, company_tax_id_verification: ::Stripe::AccountService::CreateParams::Documents::CompanyTaxIdVerification, proof_of_registration: ::Stripe::AccountService::CreateParams::Documents::ProofOfRegistration).void + } + def initialize( + bank_account_ownership_verification: nil, + company_license: nil, + company_memorandum_of_association: nil, + company_ministerial_decree: nil, + company_registration_verification: nil, + company_tax_id_verification: nil, + proof_of_registration: nil + ); end + end + class Groups < Stripe::RequestParams + # The group the account is in to determine their payments pricing, and null if the account is on customized pricing. [See the Platform pricing tool documentation](https://stripe.com/docs/connect/platform-pricing-tools) for details. + sig { returns(T.nilable(String)) } + attr_accessor :payments_pricing + sig { params(payments_pricing: T.nilable(String)).void } + def initialize(payments_pricing: nil); end + end + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(director: T::Boolean, executive: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), title: String).void + } + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::AccountService::CreateParams::Individual::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::AccountService::CreateParams::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(additional_document: ::Stripe::AccountService::CreateParams::Individual::Verification::AdditionalDocument, document: ::Stripe::AccountService::CreateParams::Individual::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # The individual's primary address. + sig { returns(::Stripe::AccountService::CreateParams::Individual::Address) } + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + sig { returns(::Stripe::AccountService::CreateParams::Individual::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + sig { returns(::Stripe::AccountService::CreateParams::Individual::AddressKanji) } + attr_accessor :address_kanji + # The individual's date of birth. + sig { returns(T.nilable(::Stripe::AccountService::CreateParams::Individual::Dob)) } + attr_accessor :dob + # The individual's email address. + sig { returns(String) } + attr_accessor :email + # The individual's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The individual's gender + sig { returns(String) } + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The individual's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The individual's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The individual's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The individual's registered address. + sig { returns(::Stripe::AccountService::CreateParams::Individual::RegisteredAddress) } + attr_accessor :registered_address + # Describes the person’s relationship to the account. + sig { returns(::Stripe::AccountService::CreateParams::Individual::Relationship) } + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The individual's verification document information. + sig { returns(::Stripe::AccountService::CreateParams::Individual::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::AccountService::CreateParams::Individual::Address, address_kana: ::Stripe::AccountService::CreateParams::Individual::AddressKana, address_kanji: ::Stripe::AccountService::CreateParams::Individual::AddressKanji, dob: T.nilable(::Stripe::AccountService::CreateParams::Individual::Dob), email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), phone: String, political_exposure: String, registered_address: ::Stripe::AccountService::CreateParams::Individual::RegisteredAddress, relationship: ::Stripe::AccountService::CreateParams::Individual::Relationship, ssn_last_4: String, verification: ::Stripe::AccountService::CreateParams::Individual::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class RiskControls < Stripe::RequestParams + class Charges < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + class Payouts < Stripe::RequestParams + # To request to pause a risk control, pass `true`. To request to unpause a risk control, pass `false`. + # There can be a delay before the risk control is paused or unpaused. + sig { returns(T::Boolean) } + attr_accessor :pause_requested + sig { params(pause_requested: T::Boolean).void } + def initialize(pause_requested: nil); end + end + # Represents the risk control status of charges. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::AccountService::CreateParams::RiskControls::Charges) } + attr_accessor :charges + # Represents the risk control status of payouts. Please see [this page for more details](https://stripe.com/docs/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::AccountService::CreateParams::RiskControls::Payouts) } + attr_accessor :payouts + sig { + params(charges: ::Stripe::AccountService::CreateParams::RiskControls::Charges, payouts: ::Stripe::AccountService::CreateParams::RiskControls::Payouts).void + } + def initialize(charges: nil, payouts: nil); end + end + class Settings < Stripe::RequestParams + class BacsDebitPayments < Stripe::RequestParams + # The Bacs Direct Debit Display Name for this account. For payments made with Bacs Direct Debit, this name appears on the mandate as the statement descriptor. Mobile banking apps display it as the name of the business. To use custom branding, set the Bacs Direct Debit Display Name during or right after creation. Custom branding incurs an additional monthly fee for the platform. If you don't set the display name before requesting Bacs capability, it's automatically set as "Stripe" and the account is onboarded to Stripe branding, which is free. + sig { returns(String) } + attr_accessor :display_name + sig { params(display_name: String).void } + def initialize(display_name: nil); end + end + class BankBcaOnboarding < Stripe::RequestParams + # Bank BCA business account holder name + sig { returns(String) } + attr_accessor :account_holder_name + # Bank BCA business account number + sig { returns(String) } + attr_accessor :business_account_number + sig { params(account_holder_name: String, business_account_number: String).void } + def initialize(account_holder_name: nil, business_account_number: nil); end + end + class Branding < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) An icon for the account. Must be square and at least 128px x 128px. + sig { returns(String) } + attr_accessor :icon + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A logo for the account that will be used in Checkout instead of the icon and without the account's name next to it if provided. Must be at least 128px x 128px. + sig { returns(String) } + attr_accessor :logo + # A CSS hex color value representing the primary branding color for this account. + sig { returns(String) } + attr_accessor :primary_color + # A CSS hex color value representing the secondary branding color for this account. + sig { returns(String) } + attr_accessor :secondary_color + sig { + params(icon: String, logo: String, primary_color: String, secondary_color: String).void + } + def initialize(icon: nil, logo: nil, primary_color: nil, secondary_color: nil); end + end + class Capital < Stripe::RequestParams + # Per-currency mapping of user-selected destination accounts used to pay out loans. + sig { returns(T::Hash[String, String]) } + attr_accessor :payout_destination + # Per-currency mapping of all destination accounts eligible to receive Capital financing payouts. + sig { returns(T::Hash[String, T::Array[String]]) } + attr_accessor :payout_destination_selector + sig { + params(payout_destination: T::Hash[String, String], payout_destination_selector: T::Hash[String, T::Array[String]]).void + } + def initialize(payout_destination: nil, payout_destination_selector: nil); end + end + class CardIssuing < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the [Stripe Issuing Terms and Disclosures](/issuing/connect/tos_acceptance). + sig { + returns(::Stripe::AccountService::CreateParams::Settings::CardIssuing::TosAcceptance) + } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::AccountService::CreateParams::Settings::CardIssuing::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + class CardPayments < Stripe::RequestParams + class DeclineOn < Stripe::RequestParams + # Whether Stripe automatically declines charges with an incorrect ZIP or postal code. This setting only applies when a ZIP or postal code is provided and they fail bank verification. + sig { returns(T::Boolean) } + attr_accessor :avs_failure + # Whether Stripe automatically declines charges with an incorrect CVC. This setting only applies when a CVC is provided and it fails bank verification. + sig { returns(T::Boolean) } + attr_accessor :cvc_failure + sig { params(avs_failure: T::Boolean, cvc_failure: T::Boolean).void } + def initialize(avs_failure: nil, cvc_failure: nil); end + end + # Automatically declines certain charge types regardless of whether the card issuer accepted or declined the charge. + sig { returns(::Stripe::AccountService::CreateParams::Settings::CardPayments::DeclineOn) } + attr_accessor :decline_on + # The default text that appears on credit card statements when a charge is made. This field prefixes any dynamic `statement_descriptor` specified on the charge. `statement_descriptor_prefix` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(String) } + attr_accessor :statement_descriptor_prefix + # The Kana variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kana` specified on the charge. `statement_descriptor_prefix_kana` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kana + # The Kanji variation of the default text that appears on credit card statements when a charge is made (Japan only). This field prefixes any dynamic `statement_descriptor_suffix_kanji` specified on the charge. `statement_descriptor_prefix_kanji` is useful for maximizing descriptor space for the dynamic portion. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_prefix_kanji + sig { + params(decline_on: ::Stripe::AccountService::CreateParams::Settings::CardPayments::DeclineOn, statement_descriptor_prefix: String, statement_descriptor_prefix_kana: T.nilable(String), statement_descriptor_prefix_kanji: T.nilable(String)).void + } + def initialize( + decline_on: nil, + statement_descriptor_prefix: nil, + statement_descriptor_prefix_kana: nil, + statement_descriptor_prefix_kanji: nil + ); end + end + class Payments < Stripe::RequestParams + # The default text that appears on statements for non-card charges outside of Japan. For card charges, if you don't set a `statement_descriptor_prefix`, this text is also used as the statement descriptor prefix. In that case, if concatenating the statement descriptor suffix causes the combined statement descriptor to exceed 22 characters, we truncate the `statement_descriptor` text to limit the full descriptor to 22 characters. For more information about statement descriptors and their requirements, see the [account settings documentation](https://docs.stripe.com/get-started/account/statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor + # The Kana variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kana + # The Kanji variation of `statement_descriptor` used for charges in Japan. Japanese statement descriptors have [special requirements](https://docs.stripe.com/get-started/account/statement-descriptors#set-japanese-statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor_kanji + sig { + params(statement_descriptor: String, statement_descriptor_kana: String, statement_descriptor_kanji: String).void + } + def initialize( + statement_descriptor: nil, + statement_descriptor_kana: nil, + statement_descriptor_kanji: nil + ); end + end + class Payouts < Stripe::RequestParams + class Schedule < Stripe::RequestParams + # The number of days charge funds are held before being paid out. May also be set to `minimum`, representing the lowest available value for the account country. Default is `minimum`. The `delay_days` parameter remains at the last configured value if `interval` is `manual`. [Learn more about controlling payout delay days](/connect/manage-payout-schedule). + sig { returns(T.any(String, Integer)) } + attr_accessor :delay_days + # How frequently available funds are paid out. One of: `daily`, `manual`, `weekly`, or `monthly`. Default is `daily`. + sig { returns(String) } + attr_accessor :interval + # The day of the month when available funds are paid out, specified as a number between 1--31. Payouts nominally scheduled between the 29th and 31st of the month are instead sent on the last day of a shorter month. Required and applicable only if `interval` is `monthly`. + sig { returns(Integer) } + attr_accessor :monthly_anchor + # The day of the week when available funds are paid out, specified as `monday`, `tuesday`, etc. (required and applicable only if `interval` is `weekly`.) + sig { returns(String) } + attr_accessor :weekly_anchor + sig { + params(delay_days: T.any(String, Integer), interval: String, monthly_anchor: Integer, weekly_anchor: String).void + } + def initialize( + delay_days: nil, + interval: nil, + monthly_anchor: nil, + weekly_anchor: nil + ); end + end + # A Boolean indicating whether Stripe should try to reclaim negative balances from an attached bank account. For details, see [Understanding Connect Account Balances](/connect/account-balances). + sig { returns(T::Boolean) } + attr_accessor :debit_negative_balances + # Details on when funds from charges are available, and when they are paid out to an external account. For details, see our [Setting Bank and Debit Card Payouts](/connect/bank-transfers#payout-information) documentation. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Payouts::Schedule) } + attr_accessor :schedule + # The text that appears on the bank account statement for payouts. If not set, this defaults to the platform's bank descriptor as set in the Dashboard. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(debit_negative_balances: T::Boolean, schedule: ::Stripe::AccountService::CreateParams::Settings::Payouts::Schedule, statement_descriptor: String).void + } + def initialize( + debit_negative_balances: nil, + schedule: nil, + statement_descriptor: nil + ); end + end + class TaxForms < Stripe::RequestParams + # Whether the account opted out of receiving their tax forms by postal delivery. + sig { returns(T::Boolean) } + attr_accessor :consented_to_paperless_delivery + sig { params(consented_to_paperless_delivery: T::Boolean).void } + def initialize(consented_to_paperless_delivery: nil); end + end + class Treasury < Stripe::RequestParams + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the account's acceptance of the Stripe Treasury Services Agreement. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Treasury::TosAcceptance) } + attr_accessor :tos_acceptance + sig { + params(tos_acceptance: ::Stripe::AccountService::CreateParams::Settings::Treasury::TosAcceptance).void + } + def initialize(tos_acceptance: nil); end + end + # Settings specific to Bacs Direct Debit. + sig { returns(::Stripe::AccountService::CreateParams::Settings::BacsDebitPayments) } + attr_accessor :bacs_debit_payments + # Settings specific to bank BCA onboarding for Indonesia bank transfers payments method. + sig { returns(::Stripe::AccountService::CreateParams::Settings::BankBcaOnboarding) } + attr_accessor :bank_bca_onboarding + # Settings used to apply the account's branding to email receipts, invoices, Checkout, and other products. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Branding) } + attr_accessor :branding + # Settings specific to the account's use of the Capital product. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Capital) } + attr_accessor :capital + # Settings specific to the account's use of the Card Issuing product. + sig { returns(::Stripe::AccountService::CreateParams::Settings::CardIssuing) } + attr_accessor :card_issuing + # Settings specific to card charging on the account. + sig { returns(::Stripe::AccountService::CreateParams::Settings::CardPayments) } + attr_accessor :card_payments + # Settings that apply across payment methods for charging on the account. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Payments) } + attr_accessor :payments + # Settings specific to the account's payouts. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Payouts) } + attr_accessor :payouts + # Settings specific to the account's tax forms. + sig { returns(::Stripe::AccountService::CreateParams::Settings::TaxForms) } + attr_accessor :tax_forms + # Settings specific to the account's Treasury FinancialAccounts. + sig { returns(::Stripe::AccountService::CreateParams::Settings::Treasury) } + attr_accessor :treasury + sig { + params(bacs_debit_payments: ::Stripe::AccountService::CreateParams::Settings::BacsDebitPayments, bank_bca_onboarding: ::Stripe::AccountService::CreateParams::Settings::BankBcaOnboarding, branding: ::Stripe::AccountService::CreateParams::Settings::Branding, capital: ::Stripe::AccountService::CreateParams::Settings::Capital, card_issuing: ::Stripe::AccountService::CreateParams::Settings::CardIssuing, card_payments: ::Stripe::AccountService::CreateParams::Settings::CardPayments, payments: ::Stripe::AccountService::CreateParams::Settings::Payments, payouts: ::Stripe::AccountService::CreateParams::Settings::Payouts, tax_forms: ::Stripe::AccountService::CreateParams::Settings::TaxForms, treasury: ::Stripe::AccountService::CreateParams::Settings::Treasury).void + } + def initialize( + bacs_debit_payments: nil, + bank_bca_onboarding: nil, + branding: nil, + capital: nil, + card_issuing: nil, + card_payments: nil, + payments: nil, + payouts: nil, + tax_forms: nil, + treasury: nil + ); end + end + class TosAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted their service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :ip + # The user's service agreement type. + sig { returns(String) } + attr_accessor :service_agreement + # The user agent of the browser from which the account representative accepted their service agreement. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, service_agreement: String, user_agent: String).void + } + def initialize(date: nil, ip: nil, service_agreement: nil, user_agent: nil); end + end + # An [account token](https://stripe.com/docs/api#create_account_token), used to securely provide details to the account. + sig { returns(String) } + attr_accessor :account_token + # Business information about the account. + sig { returns(::Stripe::AccountService::CreateParams::BusinessProfile) } + attr_accessor :business_profile + # The business type. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(String) } + attr_accessor :business_type + # Each key of the dictionary represents a capability, and each capability + # maps to its settings (for example, whether it has been requested or not). Each + # capability is inactive until you have provided its specific + # requirements and Stripe has verified them. An account might have some + # of its requested capabilities be active and some be inactive. + # + # Required when [account.controller.stripe_dashboard.type](/api/accounts/create#create_account-controller-dashboard-type) + # is `none`, which includes Custom accounts. + sig { returns(::Stripe::AccountService::CreateParams::Capabilities) } + attr_accessor :capabilities + # Information about the company or business. This field is available for any `business_type`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::AccountService::CreateParams::Company) } + attr_accessor :company + # A hash of configuration describing the account controller's attributes. + sig { returns(::Stripe::AccountService::CreateParams::Controller) } + attr_accessor :controller + # The country in which the account holder resides, or in which the business is legally established. This should be an ISO 3166-1 alpha-2 country code. For example, if you are in the United States and the business for which you're creating an account is legally represented in Canada, you would use `CA` as the country for the account being created. Available countries include [Stripe's global markets](https://stripe.com/global) as well as countries where [cross-border payouts](https://stripe.com/docs/connect/cross-border-payouts) are supported. + sig { returns(String) } + attr_accessor :country + # Three-letter ISO currency code representing the default currency for the account. This must be a currency that [Stripe supports in the account's country](https://docs.stripe.com/payouts). + sig { returns(String) } + attr_accessor :default_currency + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::AccountService::CreateParams::Documents) } + attr_accessor :documents + # The email address of the account holder. This is only to make the account easier to identify to you. If [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts, Stripe doesn't email the account without your consent. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A card or bank account to attach to the account for receiving [payouts](/connect/bank-debit-card-payouts) (you won’t be able to use it for top-ups). You can provide either a token, like the ones returned by [Stripe.js](/js), or a dictionary, as documented in the `external_account` parameter for [bank account](/api#account_create_bank_account) creation.

By default, providing an external account sets it as the new default external account for its currency, and deletes the old default if one exists. To add additional external accounts without replacing the existing default for the currency, use the [bank account](/api#account_create_bank_account) or [card creation](/api#account_create_card) APIs. After you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { + returns(T.any(String, ::Stripe::AccountService::CreateParams::BankAccount, ::Stripe::AccountService::CreateParams::Card, ::Stripe::AccountService::CreateParams::CardToken)) + } + attr_accessor :external_account + # A hash of account group type to tokens. These are account groups this account should be added to. + sig { returns(::Stripe::AccountService::CreateParams::Groups) } + attr_accessor :groups + # Information about the person represented by the account. This field is null unless `business_type` is set to `individual`. Once you create an [Account Link](/api/account_links) or [Account Session](/api/account_sessions), this property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. + sig { returns(::Stripe::AccountService::CreateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A hash to configure risk controls on the account. Please see [this page for more details](/connect/pausing-payments-or-payouts-on-connected-accounts). + sig { returns(::Stripe::AccountService::CreateParams::RiskControls) } + attr_accessor :risk_controls + # Options for customizing how the account functions within Stripe. + sig { returns(::Stripe::AccountService::CreateParams::Settings) } + attr_accessor :settings + # Details on the account's acceptance of the [Stripe Services Agreement](/connect/updating-accounts#tos-acceptance). This property can only be updated for accounts where [controller.requirement_collection](/api/accounts/object#account_object-controller-requirement_collection) is `application`, which includes Custom accounts. This property defaults to a `full` service agreement when empty. + sig { returns(::Stripe::AccountService::CreateParams::TosAcceptance) } + attr_accessor :tos_acceptance + # The type of Stripe account to create. May be one of `custom`, `express` or `standard`. + sig { returns(String) } + attr_accessor :type + sig { + params(account_token: String, business_profile: ::Stripe::AccountService::CreateParams::BusinessProfile, business_type: String, capabilities: ::Stripe::AccountService::CreateParams::Capabilities, company: ::Stripe::AccountService::CreateParams::Company, controller: ::Stripe::AccountService::CreateParams::Controller, country: String, default_currency: String, documents: ::Stripe::AccountService::CreateParams::Documents, email: String, expand: T::Array[String], external_account: T.any(String, ::Stripe::AccountService::CreateParams::BankAccount, ::Stripe::AccountService::CreateParams::Card, ::Stripe::AccountService::CreateParams::CardToken), groups: ::Stripe::AccountService::CreateParams::Groups, individual: ::Stripe::AccountService::CreateParams::Individual, metadata: T.nilable(T::Hash[String, String]), risk_controls: ::Stripe::AccountService::CreateParams::RiskControls, settings: ::Stripe::AccountService::CreateParams::Settings, tos_acceptance: ::Stripe::AccountService::CreateParams::TosAcceptance, type: String).void + } + def initialize( + account_token: nil, + business_profile: nil, + business_type: nil, + capabilities: nil, + company: nil, + controller: nil, + country: nil, + default_currency: nil, + documents: nil, + email: nil, + expand: nil, + external_account: nil, + groups: nil, + individual: nil, + metadata: nil, + risk_controls: nil, + settings: nil, + tos_acceptance: nil, + type: nil + ); end + end + class RejectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The reason for rejecting the account. Can be `fraud`, `terms_of_service`, or `other`. + sig { returns(String) } + attr_accessor :reason + sig { params(expand: T::Array[String], reason: String).void } + def initialize(expand: nil, reason: nil); end + end + # With [Connect](https://stripe.com/docs/connect), you can create Stripe accounts for your users. + # To do this, you'll first need to [register your platform](https://dashboard.stripe.com/account/applications/settings). + # + # If you've already collected information for your connected accounts, you [can prefill that information](https://stripe.com/docs/connect/best-practices#onboarding) when + # creating the account. Connect Onboarding won't ask for the prefilled information during account onboarding. + # You can prefill any information on the account. + sig { + params(params: T.any(::Stripe::AccountService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def create(params = {}, opts = {}); end + + # With [Connect](https://stripe.com/connect), you can delete accounts you manage. + # + # Test-mode accounts can be deleted at any time. + # + # Live-mode accounts where Stripe is responsible for negative account balances cannot be deleted, which includes Standard accounts. Live-mode accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be deleted when all [balances](https://stripe.com/api/balance/balance_object) are zero. + # + # If you want to delete your own account, use the [account information tab in your account settings](https://dashboard.stripe.com/settings/account) instead. + sig { + params(account: String, params: T.any(::Stripe::AccountService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def delete(account, params = {}, opts = {}); end + + # Returns a list of accounts connected to your platform via [Connect](https://stripe.com/docs/connect). If you're not a platform, the list is empty. + sig { + params(params: T.any(::Stripe::AccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # With [Connect](https://stripe.com/connect), you can reject accounts that you have flagged as suspicious. + # + # Only accounts where your platform is liable for negative account balances, which includes Custom and Express accounts, can be rejected. Test-mode accounts can be rejected at any time. Live-mode accounts can only be rejected after all balances are zero. + sig { + params(account: String, params: T.any(::Stripe::AccountService::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def reject(account, params = {}, opts = {}); end + + # Retrieves the details of an account. + sig { + params(account: String, params: T.any(::Stripe::AccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def retrieve(account, params = {}, opts = {}); end + + # Retrieves the details of an account. + sig { + params(params: T.any(::Stripe::AccountService::RetrieveCurrentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def retrieve_current(params = {}, opts = {}); end + + # Updates a [connected account](https://stripe.com/connect/accounts) by setting the values of the parameters passed. Any parameters not provided are + # left unchanged. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is application, which includes Custom accounts, you can update any information on the account. + # + # For accounts where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) + # is stripe, which includes Standard and Express accounts, you can update all information until you create + # an [Account Link or
Account Session](https://stripe.com/api/account_links) to start Connect onboarding, + # after which some properties can no longer be updated. + # + # To update your own account, use the [Dashboard](https://dashboard.stripe.com/settings/account). Refer to our + # [Connect](https://stripe.com/docs/connect/updating-accounts) documentation to learn more about updating accounts. + sig { + params(account: String, params: T.any(::Stripe::AccountService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Account) + } + def update(account, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/account_session_service.rbi b/rbi/stripe/services/account_session_service.rbi new file mode 100644 index 000000000..73b5b16b1 --- /dev/null +++ b/rbi/stripe/services/account_session_service.rbi @@ -0,0 +1,757 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AccountSessionService < StripeService + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class AccountManagement < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::AccountManagement::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class AccountOnboarding < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class AppInstall < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_apps + sig { params(allowed_apps: T.nilable(T::Array[String])).void } + def initialize(allowed_apps: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::AppInstall::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::AppInstall::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class AppViewport < Stripe::RequestParams + class Features < Stripe::RequestParams + # List of apps allowed to be enabled for this account session. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_apps + sig { params(allowed_apps: T.nilable(T::Array[String])).void } + def initialize(allowed_apps: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::AppViewport::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::AppViewport::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Balances < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :standard_payouts + sig { + params(disable_stripe_user_authentication: T::Boolean, edit_payout_schedule: T::Boolean, external_account_collection: T::Boolean, instant_payouts: T::Boolean, standard_payouts: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::Balances::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::Balances::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalFinancing < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancing::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancing::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalFinancingApplication < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingApplication::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingApplication::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalFinancingPromotion < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingPromotion::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingPromotion::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class CapitalOverview < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalOverview::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::CapitalOverview::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Documents < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::Documents::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::Documents::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class FinancialAccount < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow external accounts to be linked for money transfer. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + # Whether to allow sending money. + sig { returns(T::Boolean) } + attr_accessor :send_money + # Whether to allow transferring balance. + sig { returns(T::Boolean) } + attr_accessor :transfer_balance + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean, send_money: T::Boolean, transfer_balance: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil, + send_money: nil, + transfer_balance: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class FinancialAccountTransactions < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card spend dispute management features. + sig { returns(T::Boolean) } + attr_accessor :card_spend_dispute_management + sig { params(card_spend_dispute_management: T::Boolean).void } + def initialize(card_spend_dispute_management: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class IssuingCard < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + sig { returns(T::Boolean) } + attr_accessor :card_management + # Whether to allow card spend dispute management features. + sig { returns(T::Boolean) } + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + sig { returns(T::Boolean) } + attr_accessor :cardholder_management + # Whether to allow spend control management features. + sig { returns(T::Boolean) } + attr_accessor :spend_control_management + sig { + params(card_management: T::Boolean, card_spend_dispute_management: T::Boolean, cardholder_management: T::Boolean, spend_control_management: T::Boolean).void + } + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + spend_control_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::IssuingCard::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class IssuingCardsList < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow card management features. + sig { returns(T::Boolean) } + attr_accessor :card_management + # Whether to allow card spend dispute management features. + sig { returns(T::Boolean) } + attr_accessor :card_spend_dispute_management + # Whether to allow cardholder management features. + sig { returns(T::Boolean) } + attr_accessor :cardholder_management + # Disables Stripe user authentication for this embedded component. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow spend control management features. + sig { returns(T::Boolean) } + attr_accessor :spend_control_management + sig { + params(card_management: T::Boolean, card_spend_dispute_management: T::Boolean, cardholder_management: T::Boolean, disable_stripe_user_authentication: T::Boolean, spend_control_management: T::Boolean).void + } + def initialize( + card_management: nil, + card_spend_dispute_management: nil, + cardholder_management: nil, + disable_stripe_user_authentication: nil, + spend_control_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class NotificationBanner < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + sig { + params(disable_stripe_user_authentication: T::Boolean, external_account_collection: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + external_account_collection: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PaymentDetails < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + sig { returns(T::Boolean) } + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :refund_management + sig { + params(capture_payments: T::Boolean, destination_on_behalf_of_charge_management: T::Boolean, dispute_management: T::Boolean, refund_management: T::Boolean).void + } + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PaymentMethodSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::PaymentMethodSettings::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::PaymentMethodSettings::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Payments < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow capturing and cancelling payment intents. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :capture_payments + # Whether to allow connected accounts to manage destination charges that are created on behalf of them. This is `false` by default. + sig { returns(T::Boolean) } + attr_accessor :destination_on_behalf_of_charge_management + # Whether to allow responding to disputes, including submitting evidence and accepting disputes. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :dispute_management + # Whether to allow sending refunds. This is `true` by default. + sig { returns(T::Boolean) } + attr_accessor :refund_management + sig { + params(capture_payments: T::Boolean, destination_on_behalf_of_charge_management: T::Boolean, dispute_management: T::Boolean, refund_management: T::Boolean).void + } + def initialize( + capture_payments: nil, + destination_on_behalf_of_charge_management: nil, + dispute_management: nil, + refund_management: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::Payments::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::Payments::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Payouts < Stripe::RequestParams + class Features < Stripe::RequestParams + # Disables Stripe user authentication for this embedded component. This value can only be true for accounts where `controller.requirement_collection` is `application`. The default value is the opposite of the `external_account_collection` value. For example, if you don’t set `external_account_collection`, it defaults to true and `disable_stripe_user_authentication` defaults to false. + sig { returns(T::Boolean) } + attr_accessor :disable_stripe_user_authentication + # Whether to allow payout schedule to be changed. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :edit_payout_schedule + # Whether to allow platforms to control bank account collection for their connected accounts. This feature can only be false for accounts where you’re responsible for collecting updated information when requirements are due or change, like custom accounts. Otherwise, bank account collection is determined by compliance requirements. The default value for this feature is `true`. + sig { returns(T::Boolean) } + attr_accessor :external_account_collection + # Whether to allow creation of instant payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :instant_payouts + # Whether to allow creation of standard payouts. Default `true` when Stripe owns Loss Liability, default `false` otherwise. + sig { returns(T::Boolean) } + attr_accessor :standard_payouts + sig { + params(disable_stripe_user_authentication: T::Boolean, edit_payout_schedule: T::Boolean, external_account_collection: T::Boolean, instant_payouts: T::Boolean, standard_payouts: T::Boolean).void + } + def initialize( + disable_stripe_user_authentication: nil, + edit_payout_schedule: nil, + external_account_collection: nil, + instant_payouts: nil, + standard_payouts: nil + ); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::Payouts::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::Payouts::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PayoutsList < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::PayoutsList::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class Recipients < Stripe::RequestParams + class Features < Stripe::RequestParams + # Whether to allow sending money. + sig { returns(T::Boolean) } + attr_accessor :send_money + sig { params(send_money: T::Boolean).void } + def initialize(send_money: nil); end + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Attribute for param field features + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::Recipients::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::Recipients::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class ReportingChart < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::ReportingChart::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::ReportingChart::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class TaxRegistrations < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class TaxSettings < Stripe::RequestParams + class Features < Stripe::RequestParams + + end + # Whether the embedded component is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of features enabled in the embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::AccountSessionService::CreateParams::Components::TaxSettings::Features).void + } + def initialize(enabled: nil, features: nil); end + end + # Configuration for the account management embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::AccountManagement) + } + attr_accessor :account_management + # Configuration for the account onboarding embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding) + } + attr_accessor :account_onboarding + # Configuration for the app install component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::AppInstall) } + attr_accessor :app_install + # Configuration for the app viewport component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::AppViewport) } + attr_accessor :app_viewport + # Configuration for the balances embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::Balances) } + attr_accessor :balances + # Configuration for the capital financing embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancing) } + attr_accessor :capital_financing + # Configuration for the capital financing application embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingApplication) + } + attr_accessor :capital_financing_application + # Configuration for the capital financing promotion embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingPromotion) + } + attr_accessor :capital_financing_promotion + # Configuration for the capital overview embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::CapitalOverview) } + attr_accessor :capital_overview + # Configuration for the documents embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::Documents) } + attr_accessor :documents + # Configuration for the financial account component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount) } + attr_accessor :financial_account + # Configuration for the financial account transactions component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions) + } + attr_accessor :financial_account_transactions + # Configuration for the issuing card component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::IssuingCard) } + attr_accessor :issuing_card + # Configuration for the issuing cards list component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList) } + attr_accessor :issuing_cards_list + # Configuration for the notification banner embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner) + } + attr_accessor :notification_banner + # Configuration for the payment details embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails) } + attr_accessor :payment_details + # Configuration for the payment method settings embedded component. + sig { + returns(::Stripe::AccountSessionService::CreateParams::Components::PaymentMethodSettings) + } + attr_accessor :payment_method_settings + # Configuration for the payments embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::Payments) } + attr_accessor :payments + # Configuration for the payouts embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::Payouts) } + attr_accessor :payouts + # Configuration for the payouts list embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::PayoutsList) } + attr_accessor :payouts_list + # Configuration for the recipients component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::Recipients) } + attr_accessor :recipients + # Configuration for the reporting chart embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::ReportingChart) } + attr_accessor :reporting_chart + # Configuration for the tax registrations embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations) } + attr_accessor :tax_registrations + # Configuration for the tax settings embedded component. + sig { returns(::Stripe::AccountSessionService::CreateParams::Components::TaxSettings) } + attr_accessor :tax_settings + sig { + params(account_management: ::Stripe::AccountSessionService::CreateParams::Components::AccountManagement, account_onboarding: ::Stripe::AccountSessionService::CreateParams::Components::AccountOnboarding, app_install: ::Stripe::AccountSessionService::CreateParams::Components::AppInstall, app_viewport: ::Stripe::AccountSessionService::CreateParams::Components::AppViewport, balances: ::Stripe::AccountSessionService::CreateParams::Components::Balances, capital_financing: ::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancing, capital_financing_application: ::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingApplication, capital_financing_promotion: ::Stripe::AccountSessionService::CreateParams::Components::CapitalFinancingPromotion, capital_overview: ::Stripe::AccountSessionService::CreateParams::Components::CapitalOverview, documents: ::Stripe::AccountSessionService::CreateParams::Components::Documents, financial_account: ::Stripe::AccountSessionService::CreateParams::Components::FinancialAccount, financial_account_transactions: ::Stripe::AccountSessionService::CreateParams::Components::FinancialAccountTransactions, issuing_card: ::Stripe::AccountSessionService::CreateParams::Components::IssuingCard, issuing_cards_list: ::Stripe::AccountSessionService::CreateParams::Components::IssuingCardsList, notification_banner: ::Stripe::AccountSessionService::CreateParams::Components::NotificationBanner, payment_details: ::Stripe::AccountSessionService::CreateParams::Components::PaymentDetails, payment_method_settings: ::Stripe::AccountSessionService::CreateParams::Components::PaymentMethodSettings, payments: ::Stripe::AccountSessionService::CreateParams::Components::Payments, payouts: ::Stripe::AccountSessionService::CreateParams::Components::Payouts, payouts_list: ::Stripe::AccountSessionService::CreateParams::Components::PayoutsList, recipients: ::Stripe::AccountSessionService::CreateParams::Components::Recipients, reporting_chart: ::Stripe::AccountSessionService::CreateParams::Components::ReportingChart, tax_registrations: ::Stripe::AccountSessionService::CreateParams::Components::TaxRegistrations, tax_settings: ::Stripe::AccountSessionService::CreateParams::Components::TaxSettings).void + } + def initialize( + account_management: nil, + account_onboarding: nil, + app_install: nil, + app_viewport: nil, + balances: nil, + capital_financing: nil, + capital_financing_application: nil, + capital_financing_promotion: nil, + capital_overview: nil, + documents: nil, + financial_account: nil, + financial_account_transactions: nil, + issuing_card: nil, + issuing_cards_list: nil, + notification_banner: nil, + payment_details: nil, + payment_method_settings: nil, + payments: nil, + payouts: nil, + payouts_list: nil, + recipients: nil, + reporting_chart: nil, + tax_registrations: nil, + tax_settings: nil + ); end + end + # The identifier of the account to create an Account Session for. + sig { returns(String) } + attr_accessor :account + # Each key of the dictionary represents an embedded component, and each embedded component maps to its configuration (e.g. whether it has been enabled or not). + sig { returns(::Stripe::AccountSessionService::CreateParams::Components) } + attr_accessor :components + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(account: String, components: ::Stripe::AccountSessionService::CreateParams::Components, expand: T::Array[String]).void + } + def initialize(account: nil, components: nil, expand: nil); end + end + # Creates a AccountSession object that includes a single-use token that the platform can use on their front-end to grant client-side API access. + sig { + params(params: T.any(::Stripe::AccountSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::AccountSession) + } + def create(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/apple_pay_domain_service.rbi b/rbi/stripe/services/apple_pay_domain_service.rbi new file mode 100644 index 000000000..9fe787017 --- /dev/null +++ b/rbi/stripe/services/apple_pay_domain_service.rbi @@ -0,0 +1,78 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ApplePayDomainService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + # Attribute for param field domain_name + sig { returns(String) } + attr_accessor :domain_name + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(domain_name: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + domain_name: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Attribute for param field domain_name + sig { returns(String) } + attr_accessor :domain_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(domain_name: String, expand: T::Array[String]).void } + def initialize(domain_name: nil, expand: nil); end + end + # Create an apple pay domain. + sig { + params(params: T.any(::Stripe::ApplePayDomainService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain) + } + def create(params = {}, opts = {}); end + + # Delete an apple pay domain. + sig { + params(domain: String, params: T.any(::Stripe::ApplePayDomainService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain) + } + def delete(domain, params = {}, opts = {}); end + + # List apple pay domains. + sig { + params(params: T.any(::Stripe::ApplePayDomainService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieve an apple pay domain. + sig { + params(domain: String, params: T.any(::Stripe::ApplePayDomainService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplePayDomain) + } + def retrieve(domain, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/application_fee_refund_service.rbi b/rbi/stripe/services/application_fee_refund_service.rbi new file mode 100644 index 000000000..8f5a1664c --- /dev/null +++ b/rbi/stripe/services/application_fee_refund_service.rbi @@ -0,0 +1,91 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ApplicationFeeRefundService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # A positive integer, in _cents (or local equivalent)_, representing how much of this fee to refund. Can refund only up to the remaining unrefunded amount of the fee. + sig { returns(Integer) } + attr_accessor :amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(amount: Integer, expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(amount: nil, expand: nil, metadata: nil); end + end + # Refunds an application fee that has previously been collected but not yet refunded. + # Funds will be refunded to the Stripe account from which the fee was originally collected. + # + # You can optionally refund only part of an application fee. + # You can do so multiple times, until the entire fee has been refunded. + # + # Once entirely refunded, an application fee can't be refunded again. + # This method will raise an error when called on an already-refunded application fee, + # or when trying to refund more money than is left on an application fee. + sig { + params(id: String, params: T.any(::Stripe::ApplicationFeeRefundService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFeeRefund) + } + def create(id, params = {}, opts = {}); end + + # You can see a list of the refunds belonging to a specific application fee. Note that the 10 most recent refunds are always available by default on the application fee object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional refunds. + sig { + params(id: String, params: T.any(::Stripe::ApplicationFeeRefundService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(id, params = {}, opts = {}); end + + # By default, you can see the 10 most recent refunds stored directly on the application fee object, but you can also retrieve details about a specific refund stored on the application fee. + sig { + params(fee: String, id: String, params: T.any(::Stripe::ApplicationFeeRefundService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFeeRefund) + } + def retrieve(fee, id, params = {}, opts = {}); end + + # Updates the specified application fee refund by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + # + # This request only accepts metadata as an argument. + sig { + params(fee: String, id: String, params: T.any(::Stripe::ApplicationFeeRefundService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFeeRefund) + } + def update(fee, id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/application_fee_service.rbi b/rbi/stripe/services/application_fee_service.rbi new file mode 100644 index 000000000..51d4f2dda --- /dev/null +++ b/rbi/stripe/services/application_fee_service.rbi @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ApplicationFeeService < StripeService + attr_reader :refunds + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return application fees for the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return applications fees that were created during the given date interval. + sig { returns(T.any(::Stripe::ApplicationFeeService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::ApplicationFeeService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of application fees you've previously collected. The application fees are returned in sorted order, with the most recent fees appearing first. + sig { + params(params: T.any(::Stripe::ApplicationFeeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an application fee that your account has collected. The same information is returned when refunding the application fee. + sig { + params(id: String, params: T.any(::Stripe::ApplicationFeeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ApplicationFee) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/apps/secret_service.rbi b/rbi/stripe/services/apps/secret_service.rbi new file mode 100644 index 000000000..1b51c1b0c --- /dev/null +++ b/rbi/stripe/services/apps/secret_service.rbi @@ -0,0 +1,151 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Apps + class SecretService < StripeService + class ListParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::SecretService::ListParams::Scope) } + attr_accessor :scope + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, scope: ::Stripe::Apps::SecretService::ListParams::Scope, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + scope: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The Unix timestamp for the expiry time of the secret, after which the secret deletes. + sig { returns(Integer) } + attr_accessor :expires_at + # A name for the secret that's unique within the scope. + sig { returns(String) } + attr_accessor :name + # The plaintext secret value to be stored. + sig { returns(String) } + attr_accessor :payload + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::SecretService::CreateParams::Scope) } + attr_accessor :scope + sig { + params(expand: T::Array[String], expires_at: Integer, name: String, payload: String, scope: ::Stripe::Apps::SecretService::CreateParams::Scope).void + } + def initialize(expand: nil, expires_at: nil, name: nil, payload: nil, scope: nil); end + end + class FindParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A name for the secret that's unique within the scope. + sig { returns(String) } + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::SecretService::FindParams::Scope) } + attr_accessor :scope + sig { + params(expand: T::Array[String], name: String, scope: ::Stripe::Apps::SecretService::FindParams::Scope).void + } + def initialize(expand: nil, name: nil, scope: nil); end + end + class DeleteWhereParams < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The secret scope type. + sig { returns(String) } + attr_accessor :type + # The user ID. This field is required if `type` is set to `user`, and should not be provided if `type` is set to `account`. + sig { returns(String) } + attr_accessor :user + sig { params(type: String, user: String).void } + def initialize(type: nil, user: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A name for the secret that's unique within the scope. + sig { returns(String) } + attr_accessor :name + # Specifies the scoping of the secret. Requests originating from UI extensions can only access account-scoped secrets or secrets scoped to their own user. + sig { returns(::Stripe::Apps::SecretService::DeleteWhereParams::Scope) } + attr_accessor :scope + sig { + params(expand: T::Array[String], name: String, scope: ::Stripe::Apps::SecretService::DeleteWhereParams::Scope).void + } + def initialize(expand: nil, name: nil, scope: nil); end + end + # Create or replace a secret in the secret store. + sig { + params(params: T.any(::Stripe::Apps::SecretService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret) + } + def create(params = {}, opts = {}); end + + # Deletes a secret from the secret store by name and scope. + sig { + params(params: T.any(::Stripe::Apps::SecretService::DeleteWhereParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret) + } + def delete_where(params = {}, opts = {}); end + + # Finds a secret in the secret store by name and scope. + sig { + params(params: T.any(::Stripe::Apps::SecretService::FindParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Apps::Secret) + } + def find(params = {}, opts = {}); end + + # List all secrets stored on the given scope. + sig { + params(params: T.any(::Stripe::Apps::SecretService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/apps_service.rbi b/rbi/stripe/services/apps_service.rbi new file mode 100644 index 000000000..2bfceb80d --- /dev/null +++ b/rbi/stripe/services/apps_service.rbi @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class AppsService < StripeService + attr_reader :secrets + end +end \ No newline at end of file diff --git a/rbi/stripe/services/balance_service.rbi b/rbi/stripe/services/balance_service.rbi new file mode 100644 index 000000000..39a7ecde3 --- /dev/null +++ b/rbi/stripe/services/balance_service.rbi @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class BalanceService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves the current account balance, based on the authentication that was used to make the request. + # For a sample request, see [Accounting for negative balances](https://stripe.com/docs/connect/account-balances#accounting-for-negative-balances). + sig { + params(params: T.any(::Stripe::BalanceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Balance) + } + def retrieve(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/balance_transaction_service.rbi b/rbi/stripe/services/balance_transaction_service.rbi new file mode 100644 index 000000000..8071f4551 --- /dev/null +++ b/rbi/stripe/services/balance_transaction_service.rbi @@ -0,0 +1,89 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class BalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return transactions that were created during the given date interval. + sig { returns(T.any(::Stripe::BalanceTransactionService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return transactions in a certain currency. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # For automatic Stripe payouts only, only returns transactions that were paid out on the specified payout ID. + sig { returns(String) } + attr_accessor :payout + # Only returns the original transaction. + sig { returns(String) } + attr_accessor :source + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only returns transactions of the given type. One of: `adjustment`, `advance`, `advance_funding`, `anticipation_repayment`, `application_fee`, `application_fee_refund`, `charge`, `climate_order_purchase`, `climate_order_refund`, `connect_collection_transfer`, `contribution`, `issuing_authorization_hold`, `issuing_authorization_release`, `issuing_dispute`, `issuing_transaction`, `obligation_outbound`, `obligation_reversal_inbound`, `payment`, `payment_failure_refund`, `payment_network_reserve_hold`, `payment_network_reserve_release`, `payment_refund`, `payment_reversal`, `payment_unreconciled`, `payout`, `payout_cancel`, `payout_failure`, `payout_minimum_balance_hold`, `payout_minimum_balance_release`, `refund`, `refund_failure`, `reserve_transaction`, `reserved_funds`, `stripe_fee`, `stripe_fx_fee`, `tax_fee`, `topup`, `topup_reversal`, `transfer`, `transfer_cancel`, `transfer_failure`, or `transfer_refund`. + sig { returns(String) } + attr_accessor :type + sig { + params(created: T.any(::Stripe::BalanceTransactionService::ListParams::Created, Integer), currency: String, ending_before: String, expand: T::Array[String], limit: Integer, payout: String, source: String, starting_after: String, type: String).void + } + def initialize( + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + payout: nil, + source: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of transactions that have contributed to the Stripe account balance (e.g., charges, transfers, and so forth). The transactions are returned in sorted order, with the most recent transactions appearing first. + # + # Note that this endpoint was previously called “Balance history” and used the path /v1/balance/history. + sig { + params(params: T.any(::Stripe::BalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the balance transaction with the given ID. + # + # Note that this endpoint previously used the path /v1/balance/history/:id. + sig { + params(id: String, params: T.any(::Stripe::BalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BalanceTransaction) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/alert_service.rbi b/rbi/stripe/services/billing/alert_service.rbi new file mode 100644 index 000000000..9dfbd6554 --- /dev/null +++ b/rbi/stripe/services/billing/alert_service.rbi @@ -0,0 +1,152 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class AlertService < StripeService + class ListParams < Stripe::RequestParams + # Filter results to only include this type of alert. + sig { returns(String) } + attr_accessor :alert_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filter results to only include alerts with the given meter. + sig { returns(String) } + attr_accessor :meter + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(alert_type: String, ending_before: String, expand: T::Array[String], limit: Integer, meter: String, starting_after: String).void + } + def initialize( + alert_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + meter: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class UsageThreshold < Stripe::RequestParams + class Filter < Stripe::RequestParams + # Limit the scope to this usage alert only to this customer. + sig { returns(String) } + attr_accessor :customer + # What type of filter is being applied to this usage alert. + sig { returns(String) } + attr_accessor :type + sig { params(customer: String, type: String).void } + def initialize(customer: nil, type: nil); end + end + # The filters allows limiting the scope of this usage alert. You can only specify up to one filter at this time. + sig { + returns(T::Array[::Stripe::Billing::AlertService::CreateParams::UsageThreshold::Filter]) + } + attr_accessor :filters + # Defines at which value the alert will fire. + sig { returns(Integer) } + attr_accessor :gte + # The [Billing Meter](/api/billing/meter) ID whose usage is monitored. + sig { returns(String) } + attr_accessor :meter + # Whether the alert should only fire only once, or once per billing cycle. + sig { returns(String) } + attr_accessor :recurrence + sig { + params(filters: T::Array[::Stripe::Billing::AlertService::CreateParams::UsageThreshold::Filter], gte: Integer, meter: String, recurrence: String).void + } + def initialize(filters: nil, gte: nil, meter: nil, recurrence: nil); end + end + # The type of alert to create. + sig { returns(String) } + attr_accessor :alert_type + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The title of the alert. + sig { returns(String) } + attr_accessor :title + # The configuration of the usage threshold. + sig { returns(::Stripe::Billing::AlertService::CreateParams::UsageThreshold) } + attr_accessor :usage_threshold + sig { + params(alert_type: String, expand: T::Array[String], title: String, usage_threshold: ::Stripe::Billing::AlertService::CreateParams::UsageThreshold).void + } + def initialize(alert_type: nil, expand: nil, title: nil, usage_threshold: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Reactivates this alert, allowing it to trigger again. + sig { + params(id: String, params: T.any(::Stripe::Billing::AlertService::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def activate(id, params = {}, opts = {}); end + + # Archives this alert, removing it from the list view and APIs. This is non-reversible. + sig { + params(id: String, params: T.any(::Stripe::Billing::AlertService::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def archive(id, params = {}, opts = {}); end + + # Creates a billing alert + sig { + params(params: T.any(::Stripe::Billing::AlertService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def create(params = {}, opts = {}); end + + # Deactivates this alert, preventing it from triggering. + sig { + params(id: String, params: T.any(::Stripe::Billing::AlertService::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def deactivate(id, params = {}, opts = {}); end + + # Lists billing active and inactive alerts + sig { + params(params: T.any(::Stripe::Billing::AlertService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a billing alert given an ID + sig { + params(id: String, params: T.any(::Stripe::Billing::AlertService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Alert) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/credit_balance_summary_service.rbi b/rbi/stripe/services/billing/credit_balance_summary_service.rbi new file mode 100644 index 000000000..f4e5ea360 --- /dev/null +++ b/rbi/stripe/services/billing/credit_balance_summary_service.rbi @@ -0,0 +1,54 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class CreditBalanceSummaryService < StripeService + class RetrieveParams < Stripe::RequestParams + class Filter < Stripe::RequestParams + class ApplicabilityScope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + sig { returns(String) } + attr_accessor :price_type + sig { params(price_type: String).void } + def initialize(price_type: nil); end + end + # The billing credit applicability scope for which to fetch credit balance summary. + sig { + returns(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter::ApplicabilityScope) + } + attr_accessor :applicability_scope + # The credit grant for which to fetch credit balance summary. + sig { returns(String) } + attr_accessor :credit_grant + # Specify the type of this filter. + sig { returns(String) } + attr_accessor :type + sig { + params(applicability_scope: ::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter::ApplicabilityScope, credit_grant: String, type: String).void + } + def initialize(applicability_scope: nil, credit_grant: nil, type: nil); end + end + # The customer for which to fetch credit balance summary. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The filter criteria for the credit balance summary. + sig { returns(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter) } + attr_accessor :filter + sig { + params(customer: String, expand: T::Array[String], filter: ::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams::Filter).void + } + def initialize(customer: nil, expand: nil, filter: nil); end + end + # Retrieves the credit balance summary for a customer. + sig { + params(params: T.any(::Stripe::Billing::CreditBalanceSummaryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditBalanceSummary) + } + def retrieve(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/credit_balance_transaction_service.rbi b/rbi/stripe/services/billing/credit_balance_transaction_service.rbi new file mode 100644 index 000000000..b8060ab33 --- /dev/null +++ b/rbi/stripe/services/billing/credit_balance_transaction_service.rbi @@ -0,0 +1,59 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class CreditBalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # The credit grant for which to fetch credit balance transactions. + sig { returns(String) } + attr_accessor :credit_grant + # The customer for which to fetch credit balance transactions. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(credit_grant: String, customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + credit_grant: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieve a list of credit balance transactions. + sig { + params(params: T.any(::Stripe::Billing::CreditBalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a credit balance transaction. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditBalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditBalanceTransaction) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/credit_grant_service.rbi b/rbi/stripe/services/billing/credit_grant_service.rbi new file mode 100644 index 000000000..4b5439605 --- /dev/null +++ b/rbi/stripe/services/billing/credit_grant_service.rbi @@ -0,0 +1,191 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class CreditGrantService < StripeService + class ListParams < Stripe::RequestParams + # Only return credit grants for this customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + class Monetary < Stripe::RequestParams + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `value` parameter. + sig { returns(String) } + attr_accessor :currency + # A positive integer representing the amount of the credit grant. + sig { returns(Integer) } + attr_accessor :value + sig { params(currency: String, value: Integer).void } + def initialize(currency: nil, value: nil); end + end + # The monetary amount. + sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::Amount::Monetary) } + attr_accessor :monetary + # Specify the type of this amount. We currently only support `monetary` billing credits. + sig { returns(String) } + attr_accessor :type + sig { + params(monetary: ::Stripe::Billing::CreditGrantService::CreateParams::Amount::Monetary, type: String).void + } + def initialize(monetary: nil, type: nil); end + end + class ApplicabilityConfig < Stripe::RequestParams + class Scope < Stripe::RequestParams + # The price type that credit grants can apply to. We currently only support the `metered` price type. + sig { returns(String) } + attr_accessor :price_type + sig { params(price_type: String).void } + def initialize(price_type: nil); end + end + # Specify the scope of this applicability config. + sig { + returns(::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig::Scope) + } + attr_accessor :scope + sig { + params(scope: ::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig::Scope).void + } + def initialize(scope: nil); end + end + # Amount of this credit grant. + sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::Amount) } + attr_accessor :amount + # Configuration specifying what this credit grant applies to. + sig { returns(::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig) } + attr_accessor :applicability_config + # The category of this credit grant. + sig { returns(String) } + attr_accessor :category + # ID of the customer to receive the billing credits. + sig { returns(String) } + attr_accessor :customer + # The time when the billing credits become effective-when they're eligible for use. It defaults to the current timestamp if not specified. + sig { returns(Integer) } + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The time when the billing credits expire. If not specified, the billing credits don't expire. + sig { returns(Integer) } + attr_accessor :expires_at + # Set of key-value pairs that you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A descriptive name shown in the Dashboard. + sig { returns(String) } + attr_accessor :name + sig { + params(amount: ::Stripe::Billing::CreditGrantService::CreateParams::Amount, applicability_config: ::Stripe::Billing::CreditGrantService::CreateParams::ApplicabilityConfig, category: String, customer: String, effective_at: Integer, expand: T::Array[String], expires_at: Integer, metadata: T::Hash[String, String], name: String).void + } + def initialize( + amount: nil, + applicability_config: nil, + category: nil, + customer: nil, + effective_at: nil, + expand: nil, + expires_at: nil, + metadata: nil, + name: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The time when the billing credits created by this credit grant expire. If set to empty, the billing credits never expire. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # Set of key-value pairs you can attach to an object. You can use this to store additional information about the object (for example, cost basis) in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], expires_at: T.nilable(Integer), metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, expires_at: nil, metadata: nil); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class VoidGrantParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a credit grant. + sig { + params(params: T.any(::Stripe::Billing::CreditGrantService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def create(params = {}, opts = {}); end + + # Expires a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def expire(id, params = {}, opts = {}); end + + # Retrieve a list of credit grants. + sig { + params(params: T.any(::Stripe::Billing::CreditGrantService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def retrieve(id, params = {}, opts = {}); end + + # Updates a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def update(id, params = {}, opts = {}); end + + # Voids a credit grant. + sig { + params(id: String, params: T.any(::Stripe::Billing::CreditGrantService::VoidGrantParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::CreditGrant) + } + def void_grant(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/meter_event_adjustment_service.rbi b/rbi/stripe/services/billing/meter_event_adjustment_service.rbi new file mode 100644 index 000000000..a5310a5ec --- /dev/null +++ b/rbi/stripe/services/billing/meter_event_adjustment_service.rbi @@ -0,0 +1,40 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class MeterEventAdjustmentService < StripeService + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + sig { returns(String) } + attr_accessor :identifier + sig { params(identifier: String).void } + def initialize(identifier: nil); end + end + # Specifies which event to cancel. + sig { returns(::Stripe::Billing::MeterEventAdjustmentService::CreateParams::Cancel) } + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } + attr_accessor :type + sig { + params(cancel: ::Stripe::Billing::MeterEventAdjustmentService::CreateParams::Cancel, event_name: String, expand: T::Array[String], type: String).void + } + def initialize(cancel: nil, event_name: nil, expand: nil, type: nil); end + end + # Creates a billing meter event adjustment. + sig { + params(params: T.any(::Stripe::Billing::MeterEventAdjustmentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEventAdjustment) + } + def create(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/meter_event_service.rbi b/rbi/stripe/services/billing/meter_event_service.rbi new file mode 100644 index 000000000..e2dddf855 --- /dev/null +++ b/rbi/stripe/services/billing/meter_event_service.rbi @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class MeterEventService < StripeService + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A unique identifier for the event. If not provided, one is generated. We recommend using UUID-like identifiers. We will enforce uniqueness within a rolling period of at least 24 hours. The enforcement of uniqueness primarily addresses issues arising from accidental retries or other problems occurring within extremely brief time intervals. This approach helps prevent duplicate entries and ensures data integrity in high-frequency operations. + sig { returns(String) } + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter's `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and `value_settings.event_payload_key` (default is `value`). Read more about the [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } + attr_accessor :payload + # The time of the event. Measured in seconds since the Unix epoch. Must be within the past 35 calendar days or up to 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(Integer) } + attr_accessor :timestamp + sig { + params(event_name: String, expand: T::Array[String], identifier: String, payload: T::Hash[String, String], timestamp: Integer).void + } + def initialize( + event_name: nil, + expand: nil, + identifier: nil, + payload: nil, + timestamp: nil + ); end + end + # Creates a billing meter event. + sig { + params(params: T.any(::Stripe::Billing::MeterEventService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::MeterEvent) + } + def create(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/meter_event_summary_service.rbi b/rbi/stripe/services/billing/meter_event_summary_service.rbi new file mode 100644 index 000000000..062f5d0d8 --- /dev/null +++ b/rbi/stripe/services/billing/meter_event_summary_service.rbi @@ -0,0 +1,54 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class MeterEventSummaryService < StripeService + class ListParams < Stripe::RequestParams + # The customer for which to fetch event summaries. + sig { returns(String) } + attr_accessor :customer + # The timestamp from when to stop aggregating meter events (exclusive). Must be aligned with minute boundaries. + sig { returns(Integer) } + attr_accessor :end_time + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The timestamp from when to start aggregating meter events (inclusive). Must be aligned with minute boundaries. + sig { returns(Integer) } + attr_accessor :start_time + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Specifies what granularity to use when generating event summaries. If not specified, a single event summary would be returned for the specified time range. For hourly granularity, start and end times must align with hour boundaries (e.g., 00:00, 01:00, ..., 23:00). For daily granularity, start and end times must align with UTC day boundaries (00:00 UTC). + sig { returns(String) } + attr_accessor :value_grouping_window + sig { + params(customer: String, end_time: Integer, ending_before: String, expand: T::Array[String], limit: Integer, start_time: Integer, starting_after: String, value_grouping_window: String).void + } + def initialize( + customer: nil, + end_time: nil, + ending_before: nil, + expand: nil, + limit: nil, + start_time: nil, + starting_after: nil, + value_grouping_window: nil + ); end + end + # Retrieve a list of billing meter event summaries. + sig { + params(id: String, params: T.any(::Stripe::Billing::MeterEventSummaryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing/meter_service.rbi b/rbi/stripe/services/billing/meter_service.rbi new file mode 100644 index 000000000..7ae75fa12 --- /dev/null +++ b/rbi/stripe/services/billing/meter_service.rbi @@ -0,0 +1,163 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Billing + class MeterService < StripeService + attr_reader :event_summaries + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Filter results to only include meters with the given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CustomerMapping < Stripe::RequestParams + # The key in the meter event payload to use for mapping the event to a customer. + sig { returns(String) } + attr_accessor :event_payload_key + # The method for mapping a meter event to a customer. Must be `by_id`. + sig { returns(String) } + attr_accessor :type + sig { params(event_payload_key: String, type: String).void } + def initialize(event_payload_key: nil, type: nil); end + end + class DefaultAggregation < Stripe::RequestParams + # Specifies how events are aggregated. Allowed values are `count` to count the number of events and `sum` to sum each event's value. + sig { returns(String) } + attr_accessor :formula + sig { params(formula: String).void } + def initialize(formula: nil); end + end + class ValueSettings < Stripe::RequestParams + # The key in the usage event payload to use as the value for this meter. For example, if the event payload contains usage on a `bytes_used` field, then set the event_payload_key to "bytes_used". + sig { returns(String) } + attr_accessor :event_payload_key + sig { params(event_payload_key: String).void } + def initialize(event_payload_key: nil); end + end + # Fields that specify how to map a meter event to a customer. + sig { returns(::Stripe::Billing::MeterService::CreateParams::CustomerMapping) } + attr_accessor :customer_mapping + # The default settings to aggregate a meter's events with. + sig { returns(::Stripe::Billing::MeterService::CreateParams::DefaultAggregation) } + attr_accessor :default_aggregation + # The meter’s name. Not visible to the customer. + sig { returns(String) } + attr_accessor :display_name + # The name of the meter event to record usage for. Corresponds with the `event_name` field on meter events. + sig { returns(String) } + attr_accessor :event_name + # The time window to pre-aggregate meter events for, if any. + sig { returns(String) } + attr_accessor :event_time_window + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Fields that specify how to calculate a meter event's value. + sig { returns(::Stripe::Billing::MeterService::CreateParams::ValueSettings) } + attr_accessor :value_settings + sig { + params(customer_mapping: ::Stripe::Billing::MeterService::CreateParams::CustomerMapping, default_aggregation: ::Stripe::Billing::MeterService::CreateParams::DefaultAggregation, display_name: String, event_name: String, event_time_window: String, expand: T::Array[String], value_settings: ::Stripe::Billing::MeterService::CreateParams::ValueSettings).void + } + def initialize( + customer_mapping: nil, + default_aggregation: nil, + display_name: nil, + event_name: nil, + event_time_window: nil, + expand: nil, + value_settings: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # The meter’s name. Not visible to the customer. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(display_name: String, expand: T::Array[String]).void } + def initialize(display_name: nil, expand: nil); end + end + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a billing meter. + sig { + params(params: T.any(::Stripe::Billing::MeterService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def create(params = {}, opts = {}); end + + # When a meter is deactivated, no more meter events will be accepted for this meter. You can't attach a deactivated meter to a price. + sig { + params(id: String, params: T.any(::Stripe::Billing::MeterService::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def deactivate(id, params = {}, opts = {}); end + + # Retrieve a list of billing meters. + sig { + params(params: T.any(::Stripe::Billing::MeterService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # When a meter is reactivated, events for this meter can be accepted and you can attach the meter to a price. + sig { + params(id: String, params: T.any(::Stripe::Billing::MeterService::ReactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def reactivate(id, params = {}, opts = {}); end + + # Retrieves a billing meter given an ID. + sig { + params(id: String, params: T.any(::Stripe::Billing::MeterService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def retrieve(id, params = {}, opts = {}); end + + # Updates a billing meter. + sig { + params(id: String, params: T.any(::Stripe::Billing::MeterService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Billing::Meter) + } + def update(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing_portal/configuration_service.rbi b/rbi/stripe/services/billing_portal/configuration_service.rbi new file mode 100644 index 000000000..1834536fd --- /dev/null +++ b/rbi/stripe/services/billing_portal/configuration_service.rbi @@ -0,0 +1,497 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module BillingPortal + class ConfigurationService < StripeService + class ListParams < Stripe::RequestParams + # Only return configurations that are active or inactive (e.g., pass `true` to only list active configurations). + sig { returns(T::Boolean) } + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return the default or non-default configurations (e.g., pass `true` to only list the default configuration). + sig { returns(T::Boolean) } + attr_accessor :is_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, ending_before: String, expand: T::Array[String], is_default: T::Boolean, limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + ending_before: nil, + expand: nil, + is_default: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + sig { returns(T.nilable(String)) } + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + sig { returns(String) } + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + sig { returns(String) } + attr_accessor :terms_of_service_url + sig { + params(headline: T.nilable(String), privacy_policy_url: String, terms_of_service_url: String).void + } + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end + end + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean).void } + def initialize(allowed_updates: nil, enabled: nil); end + end + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :options + sig { params(enabled: T::Boolean, options: T.nilable(T::Array[String])).void } + def initialize(enabled: nil, options: nil); end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel::CancellationReason) + } + attr_accessor :cancellation_reason + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + sig { returns(String) } + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(cancellation_reason: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel::CancellationReason, enabled: T::Boolean, mode: String, proration_behavior: String).void + } + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ); end + end + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + sig { returns(T::Array[String]) } + attr_accessor :prices + # The product id. + sig { returns(String) } + attr_accessor :product + sig { params(prices: T::Array[String], product: String).void } + def initialize(prices: nil, product: nil); end + end + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + sig { + returns(T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]) + } + attr_accessor :conditions + sig { + params(conditions: T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition]).void + } + def initialize(conditions: nil); end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + sig { + returns(T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::Product])) + } + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + sig { returns(String) } + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd) + } + attr_accessor :schedule_at_period_end + sig { + params(default_allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean, products: T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::Product]), proration_behavior: String, schedule_at_period_end: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd).void + } + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ); end + end + # Information about updating the customer details in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::CustomerUpdate) + } + attr_accessor :customer_update + # Information about showing the billing history in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::InvoiceHistory) + } + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::PaymentMethodUpdate) + } + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel) + } + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate) + } + attr_accessor :subscription_update + sig { + params(customer_update: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::CustomerUpdate, invoice_history: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::InvoiceHistory, payment_method_update: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::PaymentMethodUpdate, subscription_cancel: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionCancel, subscription_update: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features::SubscriptionUpdate).void + } + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ); end + end + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # The business information shown to customers in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::BusinessProfile) + } + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + sig { returns(T.nilable(String)) } + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the features available in the portal. + sig { returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::Features) } + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + sig { returns(::Stripe::BillingPortal::ConfigurationService::CreateParams::LoginPage) } + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(business_profile: ::Stripe::BillingPortal::ConfigurationService::CreateParams::BusinessProfile, default_return_url: T.nilable(String), expand: T::Array[String], features: ::Stripe::BillingPortal::ConfigurationService::CreateParams::Features, login_page: ::Stripe::BillingPortal::ConfigurationService::CreateParams::LoginPage, metadata: T::Hash[String, String]).void + } + def initialize( + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BusinessProfile < Stripe::RequestParams + # The messaging shown to customers in the portal. + sig { returns(T.nilable(String)) } + attr_accessor :headline + # A link to the business’s publicly available privacy policy. + sig { returns(T.nilable(String)) } + attr_accessor :privacy_policy_url + # A link to the business’s publicly available terms of service. + sig { returns(T.nilable(String)) } + attr_accessor :terms_of_service_url + sig { + params(headline: T.nilable(String), privacy_policy_url: T.nilable(String), terms_of_service_url: T.nilable(String)).void + } + def initialize(headline: nil, privacy_policy_url: nil, terms_of_service_url: nil); end + end + class Features < Stripe::RequestParams + class CustomerUpdate < Stripe::RequestParams + # The types of customer updates that are supported. When empty, customers are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean).void } + def initialize(allowed_updates: nil, enabled: nil); end + end + class InvoiceHistory < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class PaymentMethodUpdate < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class SubscriptionCancel < Stripe::RequestParams + class CancellationReason < Stripe::RequestParams + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Which cancellation reasons will be given as options to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :options + sig { params(enabled: T::Boolean, options: T.nilable(T::Array[String])).void } + def initialize(enabled: nil, options: nil); end + end + # Whether the cancellation reasons will be collected in the portal and which options are exposed to the customer + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel::CancellationReason) + } + attr_accessor :cancellation_reason + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Whether to cancel subscriptions immediately or at the end of the billing period. + sig { returns(String) } + attr_accessor :mode + # Whether to create prorations when canceling subscriptions. Possible values are `none` and `create_prorations`, which is only compatible with `mode=immediately`. No prorations are generated when canceling a subscription at the end of its natural billing period. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(cancellation_reason: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel::CancellationReason, enabled: T::Boolean, mode: String, proration_behavior: String).void + } + def initialize( + cancellation_reason: nil, + enabled: nil, + mode: nil, + proration_behavior: nil + ); end + end + class SubscriptionUpdate < Stripe::RequestParams + class Product < Stripe::RequestParams + # The list of price IDs for the product that a subscription can be updated to. + sig { returns(T::Array[String]) } + attr_accessor :prices + # The product id. + sig { returns(String) } + attr_accessor :product + sig { params(prices: T::Array[String], product: String).void } + def initialize(prices: nil, product: nil); end + end + class ScheduleAtPeriodEnd < Stripe::RequestParams + class Condition < Stripe::RequestParams + # The type of condition. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # List of conditions. When any condition is true, the update will be scheduled at the end of the current period. + sig { + returns(T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])) + } + attr_accessor :conditions + sig { + params(conditions: T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd::Condition])).void + } + def initialize(conditions: nil); end + end + # The types of subscription updates that are supported. When empty, subscriptions are not updateable. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_allowed_updates + # Whether the feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The list of up to 10 products that support subscription updates. + sig { + returns(T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::Product])) + } + attr_accessor :products + # Determines how to handle prorations resulting from subscription updates. Valid values are `none`, `create_prorations`, and `always_invoice`. + sig { returns(String) } + attr_accessor :proration_behavior + # Setting to control when an update should be scheduled at the end of the period instead of applying immediately. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd) + } + attr_accessor :schedule_at_period_end + sig { + params(default_allowed_updates: T.nilable(T::Array[String]), enabled: T::Boolean, products: T.nilable(T::Array[::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::Product]), proration_behavior: String, schedule_at_period_end: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate::ScheduleAtPeriodEnd).void + } + def initialize( + default_allowed_updates: nil, + enabled: nil, + products: nil, + proration_behavior: nil, + schedule_at_period_end: nil + ); end + end + # Information about updating the customer details in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::CustomerUpdate) + } + attr_accessor :customer_update + # Information about showing the billing history in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::InvoiceHistory) + } + attr_accessor :invoice_history + # Information about updating payment methods in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::PaymentMethodUpdate) + } + attr_accessor :payment_method_update + # Information about canceling subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel) + } + attr_accessor :subscription_cancel + # Information about updating subscriptions in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate) + } + attr_accessor :subscription_update + sig { + params(customer_update: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::CustomerUpdate, invoice_history: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::InvoiceHistory, payment_method_update: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::PaymentMethodUpdate, subscription_cancel: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionCancel, subscription_update: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features::SubscriptionUpdate).void + } + def initialize( + customer_update: nil, + invoice_history: nil, + payment_method_update: nil, + subscription_cancel: nil, + subscription_update: nil + ); end + end + class LoginPage < Stripe::RequestParams + # Set to `true` to generate a shareable URL [`login_page.url`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-login_page-url) that will take your customers to a hosted login page for the customer portal. + # + # Set to `false` to deactivate the `login_page.url`. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # Whether the configuration is active and can be used to create portal sessions. + sig { returns(T::Boolean) } + attr_accessor :active + # The business information shown to customers in the portal. + sig { + returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::BusinessProfile) + } + attr_accessor :business_profile + # The default URL to redirect customers to when they click on the portal's link to return to your website. This can be [overriden](https://stripe.com/docs/api/customer_portal/sessions/create#create_portal_session-return_url) when creating the session. + sig { returns(T.nilable(String)) } + attr_accessor :default_return_url + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the features available in the portal. + sig { returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features) } + attr_accessor :features + # The hosted login page for this configuration. Learn more about the portal login page in our [integration docs](https://stripe.com/docs/billing/subscriptions/integrating-customer-portal#share). + sig { returns(::Stripe::BillingPortal::ConfigurationService::UpdateParams::LoginPage) } + attr_accessor :login_page + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(active: T::Boolean, business_profile: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::BusinessProfile, default_return_url: T.nilable(String), expand: T::Array[String], features: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::Features, login_page: ::Stripe::BillingPortal::ConfigurationService::UpdateParams::LoginPage, metadata: T.nilable(T::Hash[String, String])).void + } + def initialize( + active: nil, + business_profile: nil, + default_return_url: nil, + expand: nil, + features: nil, + login_page: nil, + metadata: nil + ); end + end + # Creates a configuration that describes the functionality and behavior of a PortalSession + sig { + params(params: T.any(::Stripe::BillingPortal::ConfigurationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration) + } + def create(params = {}, opts = {}); end + + # Returns a list of configurations that describe the functionality of the customer portal. + sig { + params(params: T.any(::Stripe::BillingPortal::ConfigurationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a configuration that describes the functionality of the customer portal. + sig { + params(configuration: String, params: T.any(::Stripe::BillingPortal::ConfigurationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration) + } + def retrieve(configuration, params = {}, opts = {}); end + + # Updates a configuration that describes the functionality of the customer portal. + sig { + params(configuration: String, params: T.any(::Stripe::BillingPortal::ConfigurationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Configuration) + } + def update(configuration, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing_portal/session_service.rbi b/rbi/stripe/services/billing_portal/session_service.rbi new file mode 100644 index 000000000..91e255790 --- /dev/null +++ b/rbi/stripe/services/billing_portal/session_service.rbi @@ -0,0 +1,202 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module BillingPortal + class SessionService < StripeService + class CreateParams < Stripe::RequestParams + class FlowData < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the flow is completed. + sig { returns(String) } + attr_accessor :custom_message + sig { params(custom_message: String).void } + def initialize(custom_message: nil); end + end + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the flow is completed. + sig { returns(String) } + attr_accessor :return_url + sig { params(return_url: String).void } + def initialize(return_url: nil); end + end + # Configuration when `after_completion.type=hosted_confirmation`. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::HostedConfirmation) + } + attr_accessor :hosted_confirmation + # Configuration when `after_completion.type=redirect`. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::Redirect) + } + attr_accessor :redirect + # The specified behavior after the flow is completed. + sig { returns(String) } + attr_accessor :type + sig { + params(hosted_confirmation: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::HostedConfirmation, redirect: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion::Redirect, type: String).void + } + def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end + end + class SubscriptionCancel < Stripe::RequestParams + class Retention < Stripe::RequestParams + class CouponOffer < Stripe::RequestParams + # The ID of the coupon to be offered. + sig { returns(String) } + attr_accessor :coupon + sig { params(coupon: String).void } + def initialize(coupon: nil); end + end + # Configuration when `retention.type=coupon_offer`. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer) + } + attr_accessor :coupon_offer + # Type of retention strategy to use with the customer. + sig { returns(String) } + attr_accessor :type + sig { + params(coupon_offer: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention::CouponOffer, type: String).void + } + def initialize(coupon_offer: nil, type: nil); end + end + # Specify a retention strategy to be used in the cancellation flow. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention) + } + attr_accessor :retention + # The ID of the subscription to be canceled. + sig { returns(String) } + attr_accessor :subscription + sig { + params(retention: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel::Retention, subscription: String).void + } + def initialize(retention: nil, subscription: nil); end + end + class SubscriptionUpdate < Stripe::RequestParams + # The ID of the subscription to be updated. + sig { returns(String) } + attr_accessor :subscription + sig { params(subscription: String).void } + def initialize(subscription: nil); end + end + class SubscriptionUpdateConfirm < Stripe::RequestParams + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this subscription update. + sig { returns(String) } + attr_accessor :coupon + # The ID of a promotion code to apply to this subscription update. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, promotion_code: String).void } + def initialize(coupon: nil, promotion_code: nil); end + end + class Item < Stripe::RequestParams + # The ID of the [subscription item](https://stripe.com/docs/api/subscriptions/object#subscription_object-items-data-id) to be updated. + sig { returns(String) } + attr_accessor :id + # The price the customer should subscribe to through this flow. The price must also be included in the configuration's [`features.subscription_update.products`](https://stripe.com/docs/api/customer_portal/configuration#portal_configuration_object-features-subscription_update-products). + sig { returns(String) } + attr_accessor :price + # [Quantity](https://stripe.com/docs/subscriptions/quantities) for this item that the customer should subscribe to through this flow. + sig { returns(Integer) } + attr_accessor :quantity + sig { params(id: String, price: String, quantity: Integer).void } + def initialize(id: nil, price: nil, quantity: nil); end + end + # The coupon or promotion code to apply to this subscription update. Currently, only up to one may be specified. + sig { + returns(T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount]) + } + attr_accessor :discounts + # The [subscription item](https://stripe.com/docs/api/subscription_items) to be updated through this flow. Currently, only up to one may be specified and subscriptions with multiple items are not updatable. + sig { + returns(T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Item]) + } + attr_accessor :items + # The ID of the subscription to be updated. + sig { returns(String) } + attr_accessor :subscription + sig { + params(discounts: T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Discount], items: T::Array[::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm::Item], subscription: String).void + } + def initialize(discounts: nil, items: nil, subscription: nil); end + end + # Behavior after the flow is completed. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion) + } + attr_accessor :after_completion + # Configuration when `flow_data.type=subscription_cancel`. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel) + } + attr_accessor :subscription_cancel + # Configuration when `flow_data.type=subscription_update`. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdate) + } + attr_accessor :subscription_update + # Configuration when `flow_data.type=subscription_update_confirm`. + sig { + returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm) + } + attr_accessor :subscription_update_confirm + # Type of flow that the customer will go through. + sig { returns(String) } + attr_accessor :type + sig { + params(after_completion: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::AfterCompletion, subscription_cancel: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionCancel, subscription_update: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdate, subscription_update_confirm: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData::SubscriptionUpdateConfirm, type: String).void + } + def initialize( + after_completion: nil, + subscription_cancel: nil, + subscription_update: nil, + subscription_update_confirm: nil, + type: nil + ); end + end + # The ID of an existing [configuration](https://stripe.com/docs/api/customer_portal/configuration) to use for this session, describing its functionality and features. If not specified, the session uses the default configuration. + sig { returns(String) } + attr_accessor :configuration + # The ID of an existing customer. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about a specific flow for the customer to go through. See the [docs](https://stripe.com/docs/customer-management/portal-deep-links) to learn more about using customer portal deep links and flows. + sig { returns(::Stripe::BillingPortal::SessionService::CreateParams::FlowData) } + attr_accessor :flow_data + # The IETF language tag of the locale customer portal is displayed in. If blank or auto, the customer’s `preferred_locales` or browser’s locale is used. + sig { returns(String) } + attr_accessor :locale + # The `on_behalf_of` account to use for this session. When specified, only subscriptions and invoices with this `on_behalf_of` account appear in the portal. For more information, see the [docs](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). Use the [Accounts API](https://stripe.com/docs/api/accounts/object#account_object-settings-branding) to modify the `on_behalf_of` account's branding settings, which the portal displays. + sig { returns(String) } + attr_accessor :on_behalf_of + # The default URL to redirect customers to when they click on the portal's link to return to your website. + sig { returns(String) } + attr_accessor :return_url + sig { + params(configuration: String, customer: String, expand: T::Array[String], flow_data: ::Stripe::BillingPortal::SessionService::CreateParams::FlowData, locale: String, on_behalf_of: String, return_url: String).void + } + def initialize( + configuration: nil, + customer: nil, + expand: nil, + flow_data: nil, + locale: nil, + on_behalf_of: nil, + return_url: nil + ); end + end + # Creates a session of the customer portal. + sig { + params(params: T.any(::Stripe::BillingPortal::SessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BillingPortal::Session) + } + def create(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing_portal_service.rbi b/rbi/stripe/services/billing_portal_service.rbi new file mode 100644 index 000000000..2517d4b4a --- /dev/null +++ b/rbi/stripe/services/billing_portal_service.rbi @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class BillingPortalService < StripeService + attr_reader :configurations + attr_reader :sessions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/billing_service.rbi b/rbi/stripe/services/billing_service.rbi new file mode 100644 index 000000000..69563c493 --- /dev/null +++ b/rbi/stripe/services/billing_service.rbi @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class BillingService < StripeService + attr_reader :alerts + attr_reader :credit_balance_summary + attr_reader :credit_balance_transactions + attr_reader :credit_grants + attr_reader :meters + attr_reader :meter_events + attr_reader :meter_event_adjustments + end +end \ No newline at end of file diff --git a/rbi/stripe/services/capital/financing_offer_service.rbi b/rbi/stripe/services/capital/financing_offer_service.rbi new file mode 100644 index 000000000..685cd75d5 --- /dev/null +++ b/rbi/stripe/services/capital/financing_offer_service.rbi @@ -0,0 +1,95 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Capital + class FinancingOfferService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # limit list to offers belonging to given connected account + sig { returns(String) } + attr_accessor :connected_account + # Only return offers that were created during the given date interval. + sig { + returns(T.any(::Stripe::Capital::FinancingOfferService::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # limit list to offers with given status + sig { returns(String) } + attr_accessor :status + sig { + params(connected_account: String, created: T.any(::Stripe::Capital::FinancingOfferService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + connected_account: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class MarkDeliveredParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves the financing offers available for Connected accounts that belong to your platform. + sig { + params(params: T.any(::Stripe::Capital::FinancingOfferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Acknowledges that platform has received and delivered the financing_offer to + # the intended merchant recipient. + sig { + params(financing_offer: String, params: T.any(::Stripe::Capital::FinancingOfferService::MarkDeliveredParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capital::FinancingOffer) + } + def mark_delivered(financing_offer, params = {}, opts = {}); end + + # Get the details of the financing offer + sig { + params(financing_offer: String, params: T.any(::Stripe::Capital::FinancingOfferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capital::FinancingOffer) + } + def retrieve(financing_offer, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/capital/financing_summary_service.rbi b/rbi/stripe/services/capital/financing_summary_service.rbi new file mode 100644 index 000000000..cad9fcf63 --- /dev/null +++ b/rbi/stripe/services/capital/financing_summary_service.rbi @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Capital + class FinancingSummaryService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieve the financing state for the account that was authenticated in the request. + sig { + params(params: T.any(::Stripe::Capital::FinancingSummaryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capital::FinancingSummary) + } + def retrieve(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/capital/financing_transaction_service.rbi b/rbi/stripe/services/capital/financing_transaction_service.rbi new file mode 100644 index 000000000..be38f1c17 --- /dev/null +++ b/rbi/stripe/services/capital/financing_transaction_service.rbi @@ -0,0 +1,68 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Capital + class FinancingTransactionService < StripeService + class ListParams < Stripe::RequestParams + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this charge. + sig { returns(String) } + attr_accessor :charge + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns transactions that were created that apply to this financing offer ID. + sig { returns(String) } + attr_accessor :financing_offer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only returns transactions that are responsible for reversing this financing transaction ID. + sig { returns(String) } + attr_accessor :reversed_transaction + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # For transactions of type `paydown` and reason `automatic_withholding` only, only returns transactions that were created as a result of this Treasury Transaction. + sig { returns(String) } + attr_accessor :treasury_transaction + sig { + params(charge: String, ending_before: String, expand: T::Array[String], financing_offer: String, limit: Integer, reversed_transaction: String, starting_after: String, treasury_transaction: String).void + } + def initialize( + charge: nil, + ending_before: nil, + expand: nil, + financing_offer: nil, + limit: nil, + reversed_transaction: nil, + starting_after: nil, + treasury_transaction: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of financing transactions. The transactions are returned in sorted order, + # with the most recent transactions appearing first. + sig { + params(params: T.any(::Stripe::Capital::FinancingTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a financing transaction for a financing offer. + sig { + params(financing_transaction: String, params: T.any(::Stripe::Capital::FinancingTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Capital::FinancingTransaction) + } + def retrieve(financing_transaction, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/capital_service.rbi b/rbi/stripe/services/capital_service.rbi new file mode 100644 index 000000000..5a257da42 --- /dev/null +++ b/rbi/stripe/services/capital_service.rbi @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CapitalService < StripeService + attr_reader :financing_offers + attr_reader :financing_summary + attr_reader :financing_transactions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/charge_service.rbi b/rbi/stripe/services/charge_service.rbi new file mode 100644 index 000000000..cefdf5512 --- /dev/null +++ b/rbi/stripe/services/charge_service.rbi @@ -0,0 +1,1816 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ChargeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return charges that were created during the given date interval. + sig { returns(T.any(::Stripe::ChargeService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return charges for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return charges that were created by the PaymentIntent specified by this PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return charges for this transfer group, limited to 100. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(created: T.any(::Stripe::ChargeService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String, transfer_group: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil, + transfer_group: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Destination < Stripe::RequestParams + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :account + # The amount to transfer to the destination account without creating an `Application Fee` object. Cannot be combined with the `application_fee` parameter. Must be less than or equal to the charge amount. + sig { returns(Integer) } + attr_accessor :amount + sig { params(account: String, amount: Integer).void } + def initialize(account: nil, amount: nil); end + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::ChargeService::CreateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::ChargeService::CreateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + sig { returns(Integer) } + attr_accessor :amount + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # Amount intended to be collected by this payment. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field application_fee + sig { returns(Integer) } + attr_accessor :application_fee + # A fee in cents (or local equivalent) that will be applied to the charge and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the `Stripe-Account` header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/connect/direct-charges#collect-fees). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Whether to immediately capture the charge. Defaults to `true`. When `false`, the charge issues an authorization (or pre-authorization), and will need to be [captured](https://stripe.com/docs/api#capture_charge) later. Uncaptured charges expire after a set number of days (7 by default). For more information, see the [authorizing charges and settling later](https://stripe.com/docs/charges/placing-a-hold) documentation. + sig { returns(T::Boolean) } + attr_accessor :capture + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of an existing customer that will be charged in this request. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string which you can attach to a `Charge` object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + sig { returns(String) } + attr_accessor :description + # Attribute for param field destination + sig { returns(::Stripe::ChargeService::CreateParams::Destination) } + attr_accessor :destination + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. Automatically set if you use the `destination` parameter. For details, see [Creating Separate Charges and Transfers](https://stripe.com/docs/connect/separate-charges-and-transfers#settlement-merchant). + sig { returns(String) } + attr_accessor :on_behalf_of + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::ChargeService::CreateParams::RadarOptions) } + attr_accessor :radar_options + # The email address to which this charge's [receipt](https://stripe.com/docs/dashboard/receipts) will be sent. The receipt will not be sent until the charge is paid, and no receipts will be sent for test mode charges. If this charge is for a [Customer](https://stripe.com/docs/api/customers/object), the email address specified here will override the customer's email address. If `receipt_email` is specified for a charge in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(String) } + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + sig { returns(::Stripe::ChargeService::CreateParams::Shipping) } + attr_accessor :shipping + # A payment source to be charged. This can be the ID of a [card](https://stripe.com/docs/api#cards) (i.e., credit or debit card), a [bank account](https://stripe.com/docs/api#bank_accounts), a [source](https://stripe.com/docs/api#sources), a [token](https://stripe.com/docs/api#tokens), or a [connected account](https://stripe.com/docs/connect/account-debits#charging-a-connected-account). For certain sources---namely, [cards](https://stripe.com/docs/api#cards), [bank accounts](https://stripe.com/docs/api#bank_accounts), and attached [sources](https://stripe.com/docs/api#sources)---you must also pass the ID of the associated customer. + sig { returns(String) } + attr_accessor :source + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + sig { returns(::Stripe::ChargeService::CreateParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. For details, see [Grouping transactions](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options). + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, application_fee: Integer, application_fee_amount: Integer, capture: T::Boolean, currency: String, customer: String, description: String, destination: ::Stripe::ChargeService::CreateParams::Destination, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), on_behalf_of: String, radar_options: ::Stripe::ChargeService::CreateParams::RadarOptions, receipt_email: String, shipping: ::Stripe::ChargeService::CreateParams::Shipping, source: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::ChargeService::CreateParams::TransferData, transfer_group: String).void + } + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + capture: nil, + currency: nil, + customer: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + on_behalf_of: nil, + radar_options: nil, + receipt_email: nil, + shipping: nil, + source: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class FraudDetails < Stripe::RequestParams + # Either `safe` or `fraudulent`. + sig { returns(T.nilable(String)) } + attr_accessor :user_report + sig { params(user_report: T.nilable(String)).void } + def initialize(user_report: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Affiliate) } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::ChargeService::UpdateParams::PaymentDetails::CarRental, event_details: ::Stripe::ChargeService::UpdateParams::PaymentDetails::EventDetails, flight: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Flight, lodging: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Lodging, subscription: ::Stripe::ChargeService::UpdateParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::ChargeService::UpdateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::ChargeService::UpdateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + # The ID of an existing customer that will be associated with this request. This field may only be updated if there is no existing associated customer with this charge. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string which you can attach to a charge object. It is displayed when in the web interface alongside the charge. Note that if you use Stripe to send automatic email receipts to your customers, your receipt emails will include the `description` of the charge(s) that they are describing. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A set of key-value pairs you can attach to a charge giving information about its riskiness. If you believe a charge is fraudulent, include a `user_report` key with a value of `fraudulent`. If you believe a charge is safe, include a `user_report` key with a value of `safe`. Stripe will use the information you send to improve our fraud detection algorithms. + sig { returns(::Stripe::ChargeService::UpdateParams::FraudDetails) } + attr_accessor :fraud_details + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { returns(::Stripe::ChargeService::UpdateParams::PaymentDetails) } + attr_accessor :payment_details + # This is the email address that the receipt for this charge will be sent to. If this field is updated, then a new email receipt will be sent to the updated address. + sig { returns(String) } + attr_accessor :receipt_email + # Shipping information for the charge. Helps prevent fraud on charges for physical goods. + sig { returns(::Stripe::ChargeService::UpdateParams::Shipping) } + attr_accessor :shipping + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(customer: String, description: String, expand: T::Array[String], fraud_details: ::Stripe::ChargeService::UpdateParams::FraudDetails, metadata: T.nilable(T::Hash[String, String]), payment_details: ::Stripe::ChargeService::UpdateParams::PaymentDetails, receipt_email: String, shipping: ::Stripe::ChargeService::UpdateParams::Shipping, transfer_group: String).void + } + def initialize( + customer: nil, + description: nil, + expand: nil, + fraud_details: nil, + metadata: nil, + payment_details: nil, + receipt_email: nil, + shipping: nil, + transfer_group: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for charges](https://stripe.com/docs/search#query-fields-for-charges). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class CaptureParams < Stripe::RequestParams + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Affiliate) } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Delivery) } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Address) } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Delivery) } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::ChargeService::CaptureParams::PaymentDetails::CarRental, event_details: ::Stripe::ChargeService::CaptureParams::PaymentDetails::EventDetails, flight: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Flight, lodging: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Lodging, subscription: ::Stripe::ChargeService::CaptureParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount transferred to the destination account, if specified. By default, the entire charge amount is transferred to the destination account. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The amount to capture, which must be less than or equal to the original amount. Any additional amount will be automatically refunded. + sig { returns(Integer) } + attr_accessor :amount + # An application fee to add on to this charge. + sig { returns(Integer) } + attr_accessor :application_fee + # An application fee amount to add on to this charge, which must be less than or equal to the original amount. + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Provides industry-specific information about the charge. + sig { returns(::Stripe::ChargeService::CaptureParams::PaymentDetails) } + attr_accessor :payment_details + # The email address to send this charge's receipt to. This will override the previously-specified email address for this charge, if one was set. Receipts will not be sent in test mode. + sig { returns(String) } + attr_accessor :receipt_email + # For a non-card charge, text that appears on the customer's statement as the statement descriptor. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # For a card charge, this value is ignored unless you don't specify a `statement_descriptor_suffix`, in which case this value is used as the suffix. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. If the account has no prefix value, the suffix is concatenated to the account's statement descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # An optional dictionary including the account to automatically transfer to as part of a destination charge. [See the Connect documentation](https://stripe.com/docs/connect/destination-charges) for details. + sig { returns(::Stripe::ChargeService::CaptureParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies this transaction as part of a group. `transfer_group` may only be provided if it has not been set. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, application_fee: Integer, application_fee_amount: Integer, expand: T::Array[String], payment_details: ::Stripe::ChargeService::CaptureParams::PaymentDetails, receipt_email: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::ChargeService::CaptureParams::TransferData, transfer_group: String).void + } + def initialize( + amount: nil, + application_fee: nil, + application_fee_amount: nil, + expand: nil, + payment_details: nil, + receipt_email: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + # Capture the payment of an existing, uncaptured charge that was created with the capture option set to false. + # + # Uncaptured payments expire a set number of days after they are created ([7 by default](https://stripe.com/docs/charges/placing-a-hold)), after which they are marked as refunded and capture attempts will fail. + # + # Don't use this method to capture a PaymentIntent-initiated charge. Use [Capture a PaymentIntent](https://stripe.com/docs/api/payment_intents/capture). + sig { + params(charge: String, params: T.any(::Stripe::ChargeService::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def capture(charge, params = {}, opts = {}); end + + # This method is no longer recommended—use the [Payment Intents API](https://stripe.com/docs/api/payment_intents) + # to initiate a new payment instead. Confirmation of the PaymentIntent creates the Charge + # object used to request payment. + sig { + params(params: T.any(::Stripe::ChargeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def create(params = {}, opts = {}); end + + # Returns a list of charges you've previously created. The charges are returned in sorted order, with the most recent charges appearing first. + sig { + params(params: T.any(::Stripe::ChargeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a charge that has previously been created. Supply the unique charge ID that was returned from your previous request, and Stripe will return the corresponding charge information. The same information is returned when creating or refunding the charge. + sig { + params(charge: String, params: T.any(::Stripe::ChargeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def retrieve(charge, params = {}, opts = {}); end + + # Search for charges you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::ChargeService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Updates the specified charge by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(charge: String, params: T.any(::Stripe::ChargeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Charge) + } + def update(charge, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/checkout/session_line_item_service.rbi b/rbi/stripe/services/checkout/session_line_item_service.rbi new file mode 100644 index 000000000..985ea1d6f --- /dev/null +++ b/rbi/stripe/services/checkout/session_line_item_service.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Checkout + class SessionLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # When retrieving a Checkout Session, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(session: String, params: T.any(::Stripe::Checkout::SessionLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(session, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/checkout/session_service.rbi b/rbi/stripe/services/checkout/session_service.rbi new file mode 100644 index 000000000..131ebaaa2 --- /dev/null +++ b/rbi/stripe/services/checkout/session_service.rbi @@ -0,0 +1,2580 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Checkout + class SessionService < StripeService + attr_reader :line_items + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CustomerDetails < Stripe::RequestParams + # Customer's email address. + sig { returns(String) } + attr_accessor :email + sig { params(email: String).void } + def initialize(email: nil); end + end + # Only return Checkout Sessions that were created during the given date interval. + sig { returns(T.any(::Stripe::Checkout::SessionService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return the Checkout Sessions for the Customer specified. + sig { returns(String) } + attr_accessor :customer + # Only return the Checkout Sessions for the Customer details specified. + sig { returns(::Stripe::Checkout::SessionService::ListParams::CustomerDetails) } + attr_accessor :customer_details + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return the Checkout Session for the PaymentIntent specified. + sig { returns(String) } + attr_accessor :payment_intent + # Only return the Checkout Sessions for the Payment Link specified. + sig { returns(String) } + attr_accessor :payment_link + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return the Checkout Sessions matching the given status. + sig { returns(String) } + attr_accessor :status + # Only return the Checkout Session for the subscription specified. + sig { returns(String) } + attr_accessor :subscription + sig { + params(created: T.any(::Stripe::Checkout::SessionService::ListParams::Created, Integer), customer: String, customer_details: ::Stripe::Checkout::SessionService::ListParams::CustomerDetails, ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, payment_link: String, starting_after: String, status: String, subscription: String).void + } + def initialize( + created: nil, + customer: nil, + customer_details: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + payment_link: nil, + starting_after: nil, + status: nil, + subscription: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AdaptivePricing < Stripe::RequestParams + # Set to `true` to enable [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). Defaults to your [dashboard setting](https://dashboard.stripe.com/settings/adaptive-pricing). + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class AfterExpiration < Stripe::RequestParams + class Recovery < Stripe::RequestParams + # Enables user redeemable promotion codes on the recovered Checkout Sessions. Defaults to `false` + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # If `true`, a recovery URL will be generated to recover this Checkout Session if it + # expires before a successful transaction is completed. It will be attached to the + # Checkout Session object upon expiration. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allow_promotion_codes: T::Boolean, enabled: T::Boolean).void } + def initialize(allow_promotion_codes: nil, enabled: nil); end + end + # Configure a Checkout Session that can be used to recover an expired session. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::AfterExpiration::Recovery) + } + attr_accessor :recovery + sig { + params(recovery: ::Stripe::Checkout::SessionService::CreateParams::AfterExpiration::Recovery).void + } + def initialize(recovery: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes Checkout to collect any billing address information necessary for tax calculation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::Checkout::SessionService::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + sig { returns(String) } + attr_accessor :position + sig { params(position: String).void } + def initialize(position: nil); end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement) + } + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + sig { returns(String) } + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + sig { returns(String) } + attr_accessor :terms_of_service + sig { + params(payment_method_reuse_agreement: ::Stripe::Checkout::SessionService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement, promotions: String, terms_of_service: String).void + } + def initialize( + payment_method_reuse_agreement: nil, + promotions: nil, + terms_of_service: nil + ); end + end + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + sig { returns(String) } + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + sig { returns(String) } + attr_accessor :value + sig { params(label: String, value: String).void } + def initialize(label: nil, value: nil); end + end + # The value that will pre-fill the field on the payment page.Must match a `value` in the `options` array. + sig { returns(String) } + attr_accessor :default_value + # The options available for the customer to select. Up to 200 options allowed. + sig { + returns(T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown::Option]) + } + attr_accessor :options + sig { + params(default_value: String, options: T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown::Option]).void + } + def initialize(default_value: nil, options: nil); end + end + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + sig { returns(String) } + attr_accessor :custom + # The type of the label. + sig { returns(String) } + attr_accessor :type + sig { params(custom: String, type: String).void } + def initialize(custom: nil, type: nil); end + end + class Numeric < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + sig { returns(String) } + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { + params(default_value: String, maximum_length: Integer, minimum_length: Integer).void + } + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end + end + class Text < Stripe::RequestParams + # The value that will pre-fill the field on the payment page. + sig { returns(String) } + attr_accessor :default_value + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { + params(default_value: String, maximum_length: Integer, minimum_length: Integer).void + } + def initialize(default_value: nil, maximum_length: nil, minimum_length: nil); end + end + # Configuration for `type=dropdown` fields. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown) } + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + sig { returns(String) } + attr_accessor :key + # The label for the field, displayed to the customer. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomField::Label) } + attr_accessor :label + # Configuration for `type=numeric` fields. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomField::Numeric) } + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :optional + # Configuration for `type=text` fields. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomField::Text) } + attr_accessor :text + # The type of the field. + sig { returns(String) } + attr_accessor :type + sig { + params(dropdown: ::Stripe::Checkout::SessionService::CreateParams::CustomField::Dropdown, key: String, label: ::Stripe::Checkout::SessionService::CreateParams::CustomField::Label, numeric: ::Stripe::Checkout::SessionService::CreateParams::CustomField::Numeric, optional: T::Boolean, text: ::Stripe::Checkout::SessionService::CreateParams::CustomField::Text, type: String).void + } + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ); end + end + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + # Custom text that should be displayed after the payment confirmation button. + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::AfterSubmit)) + } + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::ShippingAddress)) + } + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::Submit)) + } + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::TermsOfServiceAcceptance)) + } + attr_accessor :terms_of_service_acceptance + sig { + params(after_submit: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::AfterSubmit), shipping_address: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::ShippingAddress), submit: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::Submit), terms_of_service_acceptance: T.nilable(::Stripe::Checkout::SessionService::CreateParams::CustomText::TermsOfServiceAcceptance)).void + } + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ); end + end + class CustomerUpdate < Stripe::RequestParams + # Describes whether Checkout saves the billing address onto `customer.address`. + # To always collect a full billing address, use `billing_address_collection`. Defaults to `never`. + sig { returns(String) } + attr_accessor :address + # Describes whether Checkout saves the name onto `customer.name`. Defaults to `never`. + sig { returns(String) } + attr_accessor :name + # Describes whether Checkout saves shipping information onto `customer.shipping`. + # To collect shipping information, use `shipping_address_collection`. Defaults to `never`. + sig { returns(String) } + attr_accessor :shipping + sig { params(address: String, name: String, shipping: String).void } + def initialize(address: nil, name: nil, shipping: nil); end + end + class Discount < Stripe::RequestParams + # The ID of the coupon to apply to this Session. + sig { returns(String) } + attr_accessor :coupon + # The ID of a promotion code to apply to this Session. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, promotion_code: String).void } + def initialize(coupon: nil, promotion_code: nil); end + end + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + sig { params(amount_tax_display: T.nilable(String)).void } + def initialize(amount_tax_display: nil); end + end + # The account tax IDs associated with the invoice. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + sig { + returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::CustomField])) + } + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::Issuer) + } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(account_tax_ids: T.nilable(T::Array[String]), custom_fields: T.nilable(T::Array[::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::CustomField]), description: String, footer: String, issuer: ::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::Issuer, metadata: T::Hash[String, String], rendering_options: T.nilable(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)).void + } + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ); end + end + # Set to `true` to enable invoice creation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Parameters passed when creating invoices for payment-mode Checkout Sessions. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData) + } + attr_accessor :invoice_data + sig { + params(enabled: T::Boolean, invoice_data: ::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation::InvoiceData).void + } + def initialize(enabled: nil, invoice_data: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative integer. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::ProductData) + } + attr_accessor :product_data + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::ProductData, recurring: ::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::LineItem::AdjustableQuantity) + } + attr_accessor :adjustable_quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) that will be applied to this line item depending on the customer's billing/shipping address. We currently support the following countries: US, GB, AU, and all countries in the EU. + sig { returns(T::Array[String]) } + attr_accessor :dynamic_tax_rates + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData) } + attr_accessor :price_data + # The quantity of the line item being purchased. Quantity should not be defined when `recurring.usage_type=metered`. + sig { returns(Integer) } + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + sig { + params(adjustable_quantity: ::Stripe::Checkout::SessionService::CreateParams::LineItem::AdjustableQuantity, dynamic_tax_rates: T::Array[String], metadata: T::Hash[String, String], price: String, price_data: ::Stripe::Checkout::SessionService::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T::Array[String]).void + } + def initialize( + adjustable_quantity: nil, + dynamic_tax_rates: nil, + metadata: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class PaymentIntentData < Stripe::RequestParams + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping::Address) + } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize( + address: nil, + carrier: nil, + name: nil, + phone: nil, + tracking_number: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Stripe account ID for which these funds are intended. For details, + # see the PaymentIntents [use case for connected + # accounts](/docs/payments/connected-accounts). + sig { returns(String) } + attr_accessor :on_behalf_of + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(String) } + attr_accessor :receipt_email + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment + # method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the + # customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the + # customer that their payment details will be saved and used for future + # payments. + # + # If a Customer has been provided or Checkout creates a new Customer, + # Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached + # to a Customer. To reuse the payment method, you can retrieve it from the + # Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` + # to dynamically optimize your payment flow and comply with regional + # legislation and network rules, such as SCA. + sig { returns(String) } + attr_accessor :setup_future_usage + # Shipping information for this payment. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping) + } + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # The parameters used to automatically create a Transfer when the payment succeeds. + # For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::TransferData) + } + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(application_fee_amount: Integer, capture_method: String, description: String, metadata: T::Hash[String, String], on_behalf_of: String, receipt_email: String, setup_future_usage: String, shipping: ::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::Shipping, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData::TransferData, transfer_group: String).void + } + def initialize( + application_fee_amount: nil, + capture_method: nil, + description: nil, + metadata: nil, + on_behalf_of: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + # Allow redisplay will be set on the payment method on confirmation and indicates whether this payment method can be shown again to the customer in a checkout flow. Only set this field if you wish to override the allow_redisplay value determined by Checkout. + sig { returns(String) } + attr_accessor :allow_redisplay + sig { params(allow_redisplay: String).void } + def initialize(allow_redisplay: nil); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. Only usable in `setup` mode. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). This is only accepted for Checkout Sessions in `setup` mode. + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: String, verification_method: String).void + } + def initialize( + currency: nil, + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class AmazonPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: String).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + # Setting to true enables installments for this Checkout Session. + # Setting to false will prevent any installment plan from applying to a payment. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # Installment options for card payments + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](/payments/extended-authorization) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](/payments/incremental-authorization) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](/payments/multicapture) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](/payments/overcapture) for this CheckoutSession. + sig { returns(String) } + attr_accessor :request_overcapture + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix_kanji + sig { + params(installments: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card::Installments, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_three_d_secure: String, setup_future_usage: String, statement_descriptor_suffix_kana: String, statement_descriptor_suffix_kanji: String).void + } + def initialize( + installments: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_three_d_secure: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + sig { params(capture_method: String).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: String).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + sig { params(expires_after_seconds: Integer).void } + def initialize(expires_after_seconds: nil); end + end + class RevolutPay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + sig { params(capture_method: String).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: String).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # The order reference that will be displayed to customers in the Swish application. Defaults to the `id` of the Payment Intent. + sig { returns(String) } + attr_accessor :reference + sig { params(reference: String).void } + def initialize(reference: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { params(permissions: T::Array[String], prefetch: T::Array[String]).void } + def initialize(permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, setup_future_usage: String, verification_method: String).void + } + def initialize( + financial_connections: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + # contains details about the ACSS Debit payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit) + } + attr_accessor :acss_debit + # contains details about the Affirm payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Affirm) + } + attr_accessor :affirm + # contains details about the Afterpay Clearpay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # contains details about the Alipay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Alipay) + } + attr_accessor :alipay + # contains details about the AmazonPay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AmazonPay) + } + attr_accessor :amazon_pay + # contains details about the AU Becs Debit payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AuBecsDebit) + } + attr_accessor :au_becs_debit + # contains details about the Bacs Debit payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit) + } + attr_accessor :bacs_debit + # contains details about the Bancontact payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Bancontact) + } + attr_accessor :bancontact + # contains details about the Boleto payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Boleto) + } + attr_accessor :boleto + # contains details about the Card payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card) + } + attr_accessor :card + # contains details about the Cashapp Pay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Cashapp) + } + attr_accessor :cashapp + # contains details about the Customer Balance payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance) + } + attr_accessor :customer_balance + # contains details about the EPS payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Eps) + } + attr_accessor :eps + # contains details about the FPX payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Fpx) + } + attr_accessor :fpx + # contains details about the Giropay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Giropay) + } + attr_accessor :giropay + # contains details about the Grabpay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Grabpay) + } + attr_accessor :grabpay + # contains details about the Ideal payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Ideal) + } + attr_accessor :ideal + # contains details about the Kakao Pay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KakaoPay) + } + attr_accessor :kakao_pay + # contains details about the Klarna payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna) + } + attr_accessor :klarna + # contains details about the Konbini payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Konbini) + } + attr_accessor :konbini + # contains details about the Korean card payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KrCard) + } + attr_accessor :kr_card + # contains details about the Link payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Link) + } + attr_accessor :link + # contains details about the Mobilepay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Mobilepay) + } + attr_accessor :mobilepay + # contains details about the Multibanco payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Multibanco) + } + attr_accessor :multibanco + # contains details about the Naver Pay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::NaverPay) + } + attr_accessor :naver_pay + # contains details about the OXXO payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Oxxo) + } + attr_accessor :oxxo + # contains details about the P24 payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::P24) + } + attr_accessor :p24 + # contains details about the PAYCO payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payco) + } + attr_accessor :payco + # contains details about the PayNow payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paynow) + } + attr_accessor :paynow + # contains details about the PayPal payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paypal) + } + attr_accessor :paypal + # contains details about the PayTo payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payto) + } + attr_accessor :payto + # contains details about the Pix payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Pix) + } + attr_accessor :pix + # contains details about the RevolutPay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::RevolutPay) + } + attr_accessor :revolut_pay + # contains details about the Samsung Pay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SamsungPay) + } + attr_accessor :samsung_pay + # contains details about the Sepa Debit payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit) + } + attr_accessor :sepa_debit + # contains details about the Sofort payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Sofort) + } + attr_accessor :sofort + # contains details about the Swish payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Swish) + } + attr_accessor :swish + # contains details about the Us Bank Account payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount) + } + attr_accessor :us_bank_account + # contains details about the WeChat Pay payment method options. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::WechatPay) + } + attr_accessor :wechat_pay + sig { + params(acss_debit: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AcssDebit, affirm: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Affirm, afterpay_clearpay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AfterpayClearpay, alipay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Alipay, amazon_pay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AmazonPay, au_becs_debit: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::AuBecsDebit, bacs_debit: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::BacsDebit, bancontact: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Bancontact, boleto: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Boleto, card: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Card, cashapp: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Cashapp, customer_balance: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::CustomerBalance, eps: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Eps, fpx: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Fpx, giropay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Giropay, grabpay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Grabpay, ideal: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Ideal, kakao_pay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KakaoPay, klarna: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Klarna, konbini: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Konbini, kr_card: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::KrCard, link: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Link, mobilepay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Mobilepay, multibanco: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Multibanco, naver_pay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::NaverPay, oxxo: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Oxxo, p24: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::P24, payco: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payco, paynow: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paynow, paypal: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Paypal, payto: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Payto, pix: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Pix, revolut_pay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::RevolutPay, samsung_pay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SamsungPay, sepa_debit: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::SepaDebit, sofort: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Sofort, swish: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::Swish, us_bank_account: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::UsBankAccount, wechat_pay: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions::WechatPay).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + grabpay: nil, + ideal: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + sofort: nil, + swish: nil, + us_bank_account: nil, + wechat_pay: nil + ); end + end + class Permissions < Stripe::RequestParams + class Update < Stripe::RequestParams + # Determines which entity is allowed to update the line items. + # + # Default is `client_only`. Stripe Checkout client will automatically update the line items. If set to `server_only`, only your server is allowed to update the line items. + # + # When set to `server_only`, you must add the onLineItemsChange event handler when initializing the Stripe Checkout client and manually update the line items from your server using the Stripe API. + sig { returns(String) } + attr_accessor :line_items + # Determines which entity is allowed to update the shipping details. + # + # Default is `client_only`. Stripe Checkout client will automatically update the shipping details. If set to `server_only`, only your server is allowed to update the shipping details. + # + # When set to `server_only`, you must add the onShippingDetailsChange event handler when initializing the Stripe Checkout client and manually update the shipping details from your server using the Stripe API. + sig { returns(String) } + attr_accessor :shipping_details + sig { params(line_items: String, shipping_details: String).void } + def initialize(line_items: nil, shipping_details: nil); end + end + # Permissions for updating the Checkout Session. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::Permissions::Update) } + attr_accessor :update + sig { + params(update: ::Stripe::Checkout::SessionService::CreateParams::Permissions::Update).void + } + def initialize(update: nil); end + end + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class SavedPaymentMethodOptions < Stripe::RequestParams + # Uses the `allow_redisplay` value of each saved payment method to filter the set presented to a returning customer. By default, only saved payment methods with ’allow_redisplay: ‘always’ are shown in Checkout. + sig { returns(T::Array[String]) } + attr_accessor :allow_redisplay_filters + # Enable customers to choose if they wish to save their payment method for future use. Disabled by default. + sig { returns(String) } + attr_accessor :payment_method_save + sig { + params(allow_redisplay_filters: T::Array[String], payment_method_save: String).void + } + def initialize(allow_redisplay_filters: nil, payment_method_save: nil); end + end + class SetupIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Stripe account for which the setup is intended. + sig { returns(String) } + attr_accessor :on_behalf_of + sig { + params(description: String, metadata: T::Hash[String, String], on_behalf_of: String).void + } + def initialize(description: nil, metadata: nil, on_behalf_of: nil); end + end + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + sig { returns(T::Array[String]) } + attr_accessor :allowed_countries + sig { params(allowed_countries: T::Array[String]).void } + def initialize(allowed_countries: nil); end + end + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the Shipping Rate to use for this shipping option. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData) + } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Checkout::SessionService::CreateParams::ShippingOption::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(issuer: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings::Issuer).void + } + def initialize(issuer: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. To use an application fee percent, the request must be made on behalf of another account, using the `Stripe-Account` header or an OAuth key. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # A future timestamp to anchor the subscription's billing cycle for new subscriptions. + sig { returns(Integer) } + attr_accessor :billing_cycle_anchor + # The tax rates that will apply to any subscription item that does not have + # `tax_rates` set. Invoices created will have their `default_tax_rates` populated + # from the subscription. + sig { returns(T::Array[String]) } + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. + # Use this field to optionally store an explanation of the subscription + # for rendering in the [customer portal](https://stripe.com/docs/customer-management). + sig { returns(String) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings) + } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # Determines how to handle prorations resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData) + } + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer + # will get before being charged for the first time. Has to be at least + # 48 hours in the future. + sig { returns(Integer) } + attr_accessor :trial_end + # Integer representing the number of trial period days before the + # customer is charged for the first time. Has to be at least 1. + sig { returns(Integer) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { + returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(application_fee_percent: Float, billing_cycle_anchor: Integer, default_tax_rates: T::Array[String], description: String, invoice_settings: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::InvoiceSettings, metadata: T::Hash[String, String], on_behalf_of: String, proration_behavior: String, transfer_data: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TransferData, trial_end: Integer, trial_period_days: Integer, trial_settings: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData::TrialSettings).void + } + def initialize( + application_fee_percent: nil, + billing_cycle_anchor: nil, + default_tax_rates: nil, + description: nil, + invoice_settings: nil, + metadata: nil, + on_behalf_of: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + sig { returns(String) } + attr_accessor :required + sig { params(enabled: T::Boolean, required: String).void } + def initialize(enabled: nil, required: nil); end + end + # Settings for price localization with [Adaptive Pricing](https://docs.stripe.com/payments/checkout/adaptive-pricing). + sig { returns(::Stripe::Checkout::SessionService::CreateParams::AdaptivePricing) } + attr_accessor :adaptive_pricing + # Configure actions after a Checkout Session has expired. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::AfterExpiration) } + attr_accessor :after_expiration + # Enables user redeemable promotion codes. + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # Settings for automatic tax lookup for this session and resulting payments, invoices, and subscriptions. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Specify whether Checkout should collect the customer's billing address. Defaults to `auto`. + sig { returns(String) } + attr_accessor :billing_address_collection + # If set, Checkout displays a back button and customers will be directed to this URL if they decide to cancel payment and return to your website. This parameter is not allowed if ui_mode is `embedded` or `custom`. + sig { returns(String) } + attr_accessor :cancel_url + # A unique string to reference the Checkout Session. This can be a + # customer ID, a cart ID, or similar, and can be used to reconcile the + # session with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Configure fields for the Checkout Session to gather active consent from customers. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::ConsentCollection) } + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Required in `setup` mode when `payment_method_types` is not set. + sig { returns(String) } + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField]) } + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomText) } + attr_accessor :custom_text + # ID of an existing Customer, if one exists. In `payment` mode, the customer’s most recently saved card + # payment method will be used to prefill the email, name, card details, and billing address + # on the Checkout page. In `subscription` mode, the customer’s [default payment method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) + # will be used if it’s a card, otherwise the most recently saved card will be used. A valid billing address, billing name and billing email are required on the payment method for Checkout to prefill the customer's card details. + # + # If the Customer already has a valid [email](https://stripe.com/docs/api/customers/object#customer_object-email) set, the email will be prefilled and not editable in Checkout. + # If the Customer does not have a valid `email`, Checkout will set the email entered during the session on the Customer. + # + # If blank for Checkout Sessions in `subscription` mode or with `customer_creation` set as `always` in `payment` mode, Checkout will create a new Customer object based on information provided during the payment flow. + # + # You can set [`payment_intent_data.setup_future_usage`](https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage) to have Checkout automatically attach the payment method to the Customer you pass in for future reuse. + sig { returns(String) } + attr_accessor :customer + # Configure whether a Checkout Session creates a [Customer](https://stripe.com/docs/api/customers) during Session confirmation. + # + # When a Customer is not created, you can still retrieve email, address, and other customer data entered in Checkout + # with [customer_details](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-customer_details). + # + # Sessions that don't create Customers instead are grouped by [guest customers](https://stripe.com/docs/payments/checkout/guest-customers) + # in the Dashboard. Promotion codes limited to first time customers will return invalid for these Sessions. + # + # Can only be set in `payment` and `setup` mode. + sig { returns(String) } + attr_accessor :customer_creation + # If provided, this value will be used when the Customer object is created. + # If not provided, customers will be asked to enter their email address. + # Use this parameter to prefill customer data if you already have an email + # on file. To access information about the customer once a session is + # complete, use the `customer` field. + sig { returns(String) } + attr_accessor :customer_email + # Controls what fields on Customer can be updated by the Checkout Session. Can only be provided when `customer` is provided. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::CustomerUpdate) } + attr_accessor :customer_update + # The coupon or promotion code to apply to this Session. Currently, only up to one may be specified. + sig { returns(T::Array[::Stripe::Checkout::SessionService::CreateParams::Discount]) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The Epoch time in seconds at which the Checkout Session will expire. It can be anywhere from 30 minutes to 24 hours after Checkout Session creation. By default, this value is 24 hours from creation. + sig { returns(Integer) } + attr_accessor :expires_at + # Generate a post-purchase Invoice for one-time payments. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation) } + attr_accessor :invoice_creation + # A list of items the customer is purchasing. Use this parameter to pass one-time or recurring [Prices](https://stripe.com/docs/api/prices). + # + # For `payment` mode, there is a maximum of 100 line items, however it is recommended to consolidate line items if there are more than a few dozen. + # + # For `subscription` mode, there is a maximum of 20 line items with recurring Prices and 20 line items with one-time Prices. Line items with one-time Prices will be on the initial invoice only. + sig { returns(T::Array[::Stripe::Checkout::SessionService::CreateParams::LineItem]) } + attr_accessor :line_items + # The IETF language tag of the locale Checkout is displayed in. If blank or `auto`, the browser's locale is used. + sig { returns(String) } + attr_accessor :locale + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The mode of the Checkout Session. Pass `subscription` if the Checkout Session includes at least one recurring item. + sig { returns(String) } + attr_accessor :mode + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData) } + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0. + # This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on configuring [subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + sig { returns(String) } + attr_accessor :payment_method_collection + # The ID of the payment method configuration to use with this Checkout session. + sig { returns(String) } + attr_accessor :payment_method_configuration + # This parameter allows you to set some attributes on the payment method created during a Checkout session. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment-method-specific configuration. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # A list of the types of payment methods (e.g., `card`) this Checkout Session can accept. + # + # You can omit this attribute to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + # See [Dynamic Payment Methods](https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods) for more details. + # + # Read more about the supported payment methods and their requirements in our [payment + # method details guide](/docs/payments/checkout/payment-methods). + # + # If multiple payment methods are passed, Checkout will dynamically reorder them to + # prioritize the most relevant payment methods based on the customer's location and + # other characteristics. + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # This property is used to set up permissions for various actions (e.g., update) on the CheckoutSession object. + # + # For specific permissions, please refer to their dedicated subsections, such as `permissions.update.shipping_details`. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::Permissions) } + attr_accessor :permissions + # Controls phone number collection settings for the session. + # + # We recommend that you review your privacy policy and check with your legal contacts + # before using this feature. Learn more about [collecting phone numbers with Checkout](https://stripe.com/docs/payments/checkout/phone-numbers). + sig { returns(::Stripe::Checkout::SessionService::CreateParams::PhoneNumberCollection) } + attr_accessor :phone_number_collection + # This parameter applies to `ui_mode: embedded`. Learn more about the [redirect behavior](https://stripe.com/docs/payments/checkout/custom-success-page?payment-ui=embedded-form) of embedded sessions. Defaults to `always`. + sig { returns(String) } + attr_accessor :redirect_on_completion + # The URL to redirect your customer back to after they authenticate or cancel their payment on the + # payment method's app or site. This parameter is required if `ui_mode` is `embedded` or `custom` + # and redirect-based payment methods are enabled on the session. + sig { returns(String) } + attr_accessor :return_url + # Controls saved payment method settings for the session. Only available in `payment` and `subscription` mode. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::SavedPaymentMethodOptions) } + attr_accessor :saved_payment_method_options + # A subset of parameters to be passed to SetupIntent creation for Checkout Sessions in `setup` mode. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::SetupIntentData) } + attr_accessor :setup_intent_data + # When set, provides configuration for Checkout to collect a shipping address from a customer. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::ShippingAddressCollection) } + attr_accessor :shipping_address_collection + # The shipping rate options to apply to this Session. Up to a maximum of 5. + sig { returns(T::Array[::Stripe::Checkout::SessionService::CreateParams::ShippingOption]) } + attr_accessor :shipping_options + # Describes the type of transaction being performed by Checkout in order to customize + # relevant text on the page, such as the submit button. `submit_type` can only be + # specified on Checkout Sessions in `payment` mode. If blank or `auto`, `pay` is used. + sig { returns(String) } + attr_accessor :submit_type + # A subset of parameters to be passed to subscription creation for Checkout Sessions in `subscription` mode. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::SubscriptionData) } + attr_accessor :subscription_data + # The URL to which Stripe should send customers when payment or setup + # is complete. + # This parameter is not allowed if ui_mode is `embedded` or `custom`. If you'd like to use + # information from the successful Checkout Session on your page, read the + # guide on [customizing your success page](https://stripe.com/docs/payments/checkout/custom-success-page). + sig { returns(String) } + attr_accessor :success_url + # Controls tax ID collection during checkout. + sig { returns(::Stripe::Checkout::SessionService::CreateParams::TaxIdCollection) } + attr_accessor :tax_id_collection + # The UI mode of the Session. Defaults to `hosted`. + sig { returns(String) } + attr_accessor :ui_mode + sig { + params(adaptive_pricing: ::Stripe::Checkout::SessionService::CreateParams::AdaptivePricing, after_expiration: ::Stripe::Checkout::SessionService::CreateParams::AfterExpiration, allow_promotion_codes: T::Boolean, automatic_tax: ::Stripe::Checkout::SessionService::CreateParams::AutomaticTax, billing_address_collection: String, cancel_url: String, client_reference_id: String, consent_collection: ::Stripe::Checkout::SessionService::CreateParams::ConsentCollection, currency: String, custom_fields: T::Array[::Stripe::Checkout::SessionService::CreateParams::CustomField], custom_text: ::Stripe::Checkout::SessionService::CreateParams::CustomText, customer: String, customer_creation: String, customer_email: String, customer_update: ::Stripe::Checkout::SessionService::CreateParams::CustomerUpdate, discounts: T::Array[::Stripe::Checkout::SessionService::CreateParams::Discount], expand: T::Array[String], expires_at: Integer, invoice_creation: ::Stripe::Checkout::SessionService::CreateParams::InvoiceCreation, line_items: T::Array[::Stripe::Checkout::SessionService::CreateParams::LineItem], locale: String, metadata: T::Hash[String, String], mode: String, payment_intent_data: ::Stripe::Checkout::SessionService::CreateParams::PaymentIntentData, payment_method_collection: String, payment_method_configuration: String, payment_method_data: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodData, payment_method_options: ::Stripe::Checkout::SessionService::CreateParams::PaymentMethodOptions, payment_method_types: T::Array[String], permissions: ::Stripe::Checkout::SessionService::CreateParams::Permissions, phone_number_collection: ::Stripe::Checkout::SessionService::CreateParams::PhoneNumberCollection, redirect_on_completion: String, return_url: String, saved_payment_method_options: ::Stripe::Checkout::SessionService::CreateParams::SavedPaymentMethodOptions, setup_intent_data: ::Stripe::Checkout::SessionService::CreateParams::SetupIntentData, shipping_address_collection: ::Stripe::Checkout::SessionService::CreateParams::ShippingAddressCollection, shipping_options: T::Array[::Stripe::Checkout::SessionService::CreateParams::ShippingOption], submit_type: String, subscription_data: ::Stripe::Checkout::SessionService::CreateParams::SubscriptionData, success_url: String, tax_id_collection: ::Stripe::Checkout::SessionService::CreateParams::TaxIdCollection, ui_mode: String).void + } + def initialize( + adaptive_pricing: nil, + after_expiration: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + cancel_url: nil, + client_reference_id: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer: nil, + customer_creation: nil, + customer_email: nil, + customer_update: nil, + discounts: nil, + expand: nil, + expires_at: nil, + invoice_creation: nil, + line_items: nil, + locale: nil, + metadata: nil, + mode: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + permissions: nil, + phone_number_collection: nil, + redirect_on_completion: nil, + return_url: nil, + saved_payment_method_options: nil, + setup_intent_data: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + success_url: nil, + tax_id_collection: nil, + ui_mode: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CollectedInformation < Stripe::RequestParams + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The address of the customer + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails::Address) + } + attr_accessor :address + # The name of customer + sig { returns(String) } + attr_accessor :name + sig { + params(address: ::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails::Address, name: String).void + } + def initialize(address: nil, name: nil); end + end + # The shipping details to apply to this Session. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails) + } + attr_accessor :shipping_details + sig { + params(shipping_details: ::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation::ShippingDetails).void + } + def initialize(shipping_details: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any positive integer. Setting to false will remove any previously specified constraints on quantity. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase for the Checkout Session. By default this value is 99. You can specify a value up to 999999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer must purchase for the Checkout Session. By default this value is 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during Checkout. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::LineItem::AdjustableQuantity) + } + attr_accessor :adjustable_quantity + # ID of an existing line item. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The ID of the [Price](https://stripe.com/docs/api/prices). + sig { returns(String) } + attr_accessor :price + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + # The [tax rates](https://stripe.com/docs/api/tax_rates) which apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(adjustable_quantity: ::Stripe::Checkout::SessionService::UpdateParams::LineItem::AdjustableQuantity, id: String, metadata: T.nilable(T::Hash[String, String]), price: String, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + adjustable_quantity: nil, + id: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil + ); end + end + class ShippingOption < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the Shipping Rate to use for this shipping option. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to be passed to Shipping Rate creation for this shipping option. + sig { + returns(::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData) + } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::Checkout::SessionService::UpdateParams::ShippingOption::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + # Information about the customer collected within the Checkout Session. + sig { returns(::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation) } + attr_accessor :collected_information + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A list of items the customer is purchasing. + # + # When updating line items, you must retransmit the entire array of line items. + # + # To retain an existing line item, specify its `id`. + # + # To update an existing line item, specify its `id` along with the new values of the fields to update. + # + # To add a new line item, specify a `price` and `quantity`. We don't currently support recurring prices. + # + # To remove an existing line item, omit the line item's ID from the retransmitted array. + # + # To reorder a line item, specify it at the desired position in the retransmitted array. + sig { returns(T::Array[::Stripe::Checkout::SessionService::UpdateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The shipping rate options to apply to this Session. Up to a maximum of 5. + sig { + returns(T.nilable(T::Array[::Stripe::Checkout::SessionService::UpdateParams::ShippingOption])) + } + attr_accessor :shipping_options + sig { + params(collected_information: ::Stripe::Checkout::SessionService::UpdateParams::CollectedInformation, expand: T::Array[String], line_items: T::Array[::Stripe::Checkout::SessionService::UpdateParams::LineItem], metadata: T.nilable(T::Hash[String, String]), shipping_options: T.nilable(T::Array[::Stripe::Checkout::SessionService::UpdateParams::ShippingOption])).void + } + def initialize( + collected_information: nil, + expand: nil, + line_items: nil, + metadata: nil, + shipping_options: nil + ); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a Session object. + sig { + params(params: T.any(::Stripe::Checkout::SessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def create(params = {}, opts = {}); end + + # A Session can be expired when it is in one of these statuses: open + # + # After it expires, a customer can't complete a Session and customers loading the Session see a message saying the Session is expired. + sig { + params(session: String, params: T.any(::Stripe::Checkout::SessionService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def expire(session, params = {}, opts = {}); end + + # Returns a list of Checkout Sessions. + sig { + params(params: T.any(::Stripe::Checkout::SessionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Session object. + sig { + params(session: String, params: T.any(::Stripe::Checkout::SessionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def retrieve(session, params = {}, opts = {}); end + + # Updates a Session object. + sig { + params(session: String, params: T.any(::Stripe::Checkout::SessionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Checkout::Session) + } + def update(session, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/checkout_service.rbi b/rbi/stripe/services/checkout_service.rbi new file mode 100644 index 000000000..ad2207a87 --- /dev/null +++ b/rbi/stripe/services/checkout_service.rbi @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CheckoutService < StripeService + attr_reader :sessions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/climate/order_service.rbi b/rbi/stripe/services/climate/order_service.rbi new file mode 100644 index 000000000..186b7e997 --- /dev/null +++ b/rbi/stripe/services/climate/order_service.rbi @@ -0,0 +1,140 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Climate + class OrderService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + sig { returns(String) } + attr_accessor :public_name + sig { params(public_name: String).void } + def initialize(public_name: nil); end + end + # Requested amount of carbon removal units. Either this or `metric_tons` must be specified. + sig { returns(Integer) } + attr_accessor :amount + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + sig { returns(::Stripe::Climate::OrderService::CreateParams::Beneficiary) } + attr_accessor :beneficiary + # Request currency for the order as a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a supported [settlement currency for your account](https://stripe.com/docs/currencies). If omitted, the account's default currency will be used. + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Requested number of tons for the order. Either this or `amount` must be specified. + sig { returns(String) } + attr_accessor :metric_tons + # Unique identifier of the Climate product. + sig { returns(String) } + attr_accessor :product + sig { + params(amount: Integer, beneficiary: ::Stripe::Climate::OrderService::CreateParams::Beneficiary, currency: String, expand: T::Array[String], metadata: T::Hash[String, String], metric_tons: String, product: String).void + } + def initialize( + amount: nil, + beneficiary: nil, + currency: nil, + expand: nil, + metadata: nil, + metric_tons: nil, + product: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Beneficiary < Stripe::RequestParams + # Publicly displayable name for the end beneficiary of carbon removal. + sig { returns(T.nilable(String)) } + attr_accessor :public_name + sig { params(public_name: T.nilable(String)).void } + def initialize(public_name: nil); end + end + # Publicly sharable reference for the end beneficiary of carbon removal. Assumed to be the Stripe account if not set. + sig { returns(T.nilable(::Stripe::Climate::OrderService::UpdateParams::Beneficiary)) } + attr_accessor :beneficiary + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(beneficiary: T.nilable(::Stripe::Climate::OrderService::UpdateParams::Beneficiary), expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(beneficiary: nil, expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels a Climate order. You can cancel an order within 24 hours of creation. Stripe refunds the + # reservation amount_subtotal, but not the amount_fees for user-triggered cancellations. Frontier + # might cancel reservations if suppliers fail to deliver. If Frontier cancels the reservation, Stripe + # provides 90 days advance notice and refunds the amount_total. + sig { + params(order: String, params: T.any(::Stripe::Climate::OrderService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def cancel(order, params = {}, opts = {}); end + + # Creates a Climate order object for a given Climate product. The order will be processed immediately + # after creation and payment will be deducted your Stripe balance. + sig { + params(params: T.any(::Stripe::Climate::OrderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def create(params = {}, opts = {}); end + + # Lists all Climate order objects. The orders are returned sorted by creation date, with the + # most recently created orders appearing first. + sig { + params(params: T.any(::Stripe::Climate::OrderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a Climate order object with the given ID. + sig { + params(order: String, params: T.any(::Stripe::Climate::OrderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def retrieve(order, params = {}, opts = {}); end + + # Updates the specified order by setting the values of the parameters passed. + sig { + params(order: String, params: T.any(::Stripe::Climate::OrderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Order) + } + def update(order, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/climate/product_service.rbi b/rbi/stripe/services/climate/product_service.rbi new file mode 100644 index 000000000..08371b4a0 --- /dev/null +++ b/rbi/stripe/services/climate/product_service.rbi @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Climate + class ProductService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Lists all available Climate product objects. + sig { + params(params: T.any(::Stripe::Climate::ProductService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a Climate product with the given ID. + sig { + params(product: String, params: T.any(::Stripe::Climate::ProductService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Product) + } + def retrieve(product, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/climate/supplier_service.rbi b/rbi/stripe/services/climate/supplier_service.rbi new file mode 100644 index 000000000..cef478e27 --- /dev/null +++ b/rbi/stripe/services/climate/supplier_service.rbi @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Climate + class SupplierService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Lists all available Climate supplier objects. + sig { + params(params: T.any(::Stripe::Climate::SupplierService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Climate supplier object. + sig { + params(supplier: String, params: T.any(::Stripe::Climate::SupplierService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Climate::Supplier) + } + def retrieve(supplier, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/climate_service.rbi b/rbi/stripe/services/climate_service.rbi new file mode 100644 index 000000000..efac4d983 --- /dev/null +++ b/rbi/stripe/services/climate_service.rbi @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ClimateService < StripeService + attr_reader :orders + attr_reader :products + attr_reader :suppliers + end +end \ No newline at end of file diff --git a/rbi/stripe/services/confirmation_token_service.rbi b/rbi/stripe/services/confirmation_token_service.rbi new file mode 100644 index 000000000..fc26eeed0 --- /dev/null +++ b/rbi/stripe/services/confirmation_token_service.rbi @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ConfirmationTokenService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves an existing ConfirmationToken object + sig { + params(confirmation_token: String, params: T.any(::Stripe::ConfirmationTokenService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ConfirmationToken) + } + def retrieve(confirmation_token, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/country_spec_service.rbi b/rbi/stripe/services/country_spec_service.rbi new file mode 100644 index 000000000..e3c0636fa --- /dev/null +++ b/rbi/stripe/services/country_spec_service.rbi @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CountrySpecService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Lists all Country Spec objects available in the API. + sig { + params(params: T.any(::Stripe::CountrySpecService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Returns a Country Spec for a given Country code. + sig { + params(country: String, params: T.any(::Stripe::CountrySpecService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CountrySpec) + } + def retrieve(country, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/coupon_service.rbi b/rbi/stripe/services/coupon_service.rbi new file mode 100644 index 000000000..b33494284 --- /dev/null +++ b/rbi/stripe/services/coupon_service.rbi @@ -0,0 +1,190 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CouponService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + sig { returns(Integer) } + attr_accessor :amount_off + sig { params(amount_off: Integer).void } + def initialize(amount_off: nil); end + end + # Coupons defined in each available currency option (only supported if the coupon is amount-based). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, ::Stripe::CouponService::UpdateParams::CurrencyOptions]) } + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + sig { returns(String) } + attr_accessor :name + sig { + params(currency_options: T::Hash[String, ::Stripe::CouponService::UpdateParams::CurrencyOptions], expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), name: String).void + } + def initialize(currency_options: nil, expand: nil, metadata: nil, name: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::CouponService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::CouponService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # An array of Product IDs that this Coupon will apply to. + sig { returns(T::Array[String]) } + attr_accessor :products + sig { params(products: T::Array[String]).void } + def initialize(products: nil); end + end + class CurrencyOptions < Stripe::RequestParams + # A positive integer representing the amount to subtract from an invoice total. + sig { returns(Integer) } + attr_accessor :amount_off + sig { params(amount_off: Integer).void } + def initialize(amount_off: nil); end + end + # A positive integer representing the amount to subtract from an invoice total (required if `percent_off` is not passed). + sig { returns(Integer) } + attr_accessor :amount_off + # A hash containing directions for what this Coupon will apply discounts to. + sig { returns(::Stripe::CouponService::CreateParams::AppliesTo) } + attr_accessor :applies_to + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) of the `amount_off` parameter (required if `amount_off` is passed). + sig { returns(String) } + attr_accessor :currency + # Coupons defined in each available currency option (only supported if `amount_off` is passed). Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, ::Stripe::CouponService::CreateParams::CurrencyOptions]) } + attr_accessor :currency_options + # Specifies how long the discount will be in effect if used on a subscription. Defaults to `once`. + sig { returns(String) } + attr_accessor :duration + # Required only if `duration` is `repeating`, in which case it must be a positive integer that specifies the number of months the discount will be in effect. + sig { returns(Integer) } + attr_accessor :duration_in_months + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Unique string of your choice that will be used to identify this coupon when applying it to a customer. If you don't want to specify a particular code, you can leave the ID blank and we'll generate a random code for you. + sig { returns(String) } + attr_accessor :id + # A positive integer specifying the number of times the coupon can be redeemed before it's no longer valid. For example, you might have a 50% off coupon that the first 20 readers of your blog can use. + sig { returns(Integer) } + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Name of the coupon displayed to customers on, for instance invoices, or receipts. By default the `id` is shown if `name` is not set. + sig { returns(String) } + attr_accessor :name + # A positive float larger than 0, and smaller or equal to 100, that represents the discount the coupon will apply (required if `amount_off` is not passed). + sig { returns(Float) } + attr_accessor :percent_off + # Unix timestamp specifying the last time at which the coupon can be redeemed. After the redeem_by date, the coupon can no longer be applied to new customers. + sig { returns(Integer) } + attr_accessor :redeem_by + sig { + params(amount_off: Integer, applies_to: ::Stripe::CouponService::CreateParams::AppliesTo, currency: String, currency_options: T::Hash[String, ::Stripe::CouponService::CreateParams::CurrencyOptions], duration: String, duration_in_months: Integer, expand: T::Array[String], id: String, max_redemptions: Integer, metadata: T.nilable(T::Hash[String, String]), name: String, percent_off: Float, redeem_by: Integer).void + } + def initialize( + amount_off: nil, + applies_to: nil, + currency: nil, + currency_options: nil, + duration: nil, + duration_in_months: nil, + expand: nil, + id: nil, + max_redemptions: nil, + metadata: nil, + name: nil, + percent_off: nil, + redeem_by: nil + ); end + end + # You can create coupons easily via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. Coupon creation is also accessible via the API if you need to create coupons on the fly. + # + # A coupon has either a percent_off or an amount_off and currency. If you set an amount_off, that amount will be subtracted from any invoice's subtotal. For example, an invoice with a subtotal of 100 will have a final total of 0 if a coupon with an amount_off of 200 is applied to it and an invoice with a subtotal of 300 will have a final total of 100 if a coupon with an amount_off of 200 is applied to it. + sig { + params(params: T.any(::Stripe::CouponService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def create(params = {}, opts = {}); end + + # You can delete coupons via the [coupon management](https://dashboard.stripe.com/coupons) page of the Stripe dashboard. However, deleting a coupon does not affect any customers who have already applied the coupon; it means that new customers can't redeem the coupon. You can also delete coupons via the API. + sig { + params(coupon: String, params: T.any(::Stripe::CouponService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def delete(coupon, params = {}, opts = {}); end + + # Returns a list of your coupons. + sig { + params(params: T.any(::Stripe::CouponService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the coupon with the given ID. + sig { + params(coupon: String, params: T.any(::Stripe::CouponService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def retrieve(coupon, params = {}, opts = {}); end + + # Updates the metadata of a coupon. Other coupon details (currency, duration, amount_off) are, by design, not editable. + sig { + params(coupon: String, params: T.any(::Stripe::CouponService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Coupon) + } + def update(coupon, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/credit_note_line_item_service.rbi b/rbi/stripe/services/credit_note_line_item_service.rbi new file mode 100644 index 000000000..7341f9511 --- /dev/null +++ b/rbi/stripe/services/credit_note_line_item_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CreditNoteLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # When retrieving a credit note, you'll get a lines property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(credit_note: String, params: T.any(::Stripe::CreditNoteLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(credit_note, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/credit_note_preview_lines_service.rbi b/rbi/stripe/services/credit_note_preview_lines_service.rbi new file mode 100644 index 000000000..22aaba8f7 --- /dev/null +++ b/rbi/stripe/services/credit_note_preview_lines_service.rbi @@ -0,0 +1,167 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CreditNotePreviewLinesService < StripeService + class ListParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + sig { returns(String) } + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void } + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + sig { returns(Integer) } + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + sig { returns(String) } + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + sig { returns(String) } + attr_accessor :invoice_line_item + # The line item quantity to credit. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + sig { + returns(T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + sig { returns(String) } + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, invoice_line_item: String, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String]), type: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + sig { returns(Integer) } + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + sig { params(amount_refunded: Integer, refund: String).void } + def initialize(amount_refunded: nil, refund: nil); end + end + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + sig { returns(Integer) } + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + sig { returns(Integer) } + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(Integer) } + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + sig { returns(String) } + attr_accessor :email_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the invoice. + sig { returns(String) } + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Line items that make up the credit note. + sig { returns(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line]) } + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + sig { returns(Integer) } + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(String) } + attr_accessor :reason + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + sig { returns(Integer) } + attr_accessor :refund_amount + # Refunds to link to this credit note. + sig { returns(T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Refund]) } + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + sig { returns(::Stripe::CreditNotePreviewLinesService::ListParams::ShippingCost) } + attr_accessor :shipping_cost + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(amount: Integer, credit_amount: Integer, effective_at: Integer, email_type: String, ending_before: String, expand: T::Array[String], invoice: String, limit: Integer, lines: T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Line], memo: String, metadata: T::Hash[String, String], out_of_band_amount: Integer, reason: String, refund: String, refund_amount: Integer, refunds: T::Array[::Stripe::CreditNotePreviewLinesService::ListParams::Refund], shipping_cost: ::Stripe::CreditNotePreviewLinesService::ListParams::ShippingCost, starting_after: String).void + } + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil, + starting_after: nil + ); end + end + # When retrieving a credit note preview, you'll get a lines property containing the first handful of those items. This URL you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::CreditNotePreviewLinesService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/credit_note_service.rbi b/rbi/stripe/services/credit_note_service.rbi new file mode 100644 index 000000000..0c20c4b59 --- /dev/null +++ b/rbi/stripe/services/credit_note_service.rbi @@ -0,0 +1,420 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CreditNoteService < StripeService + attr_reader :line_items + attr_reader :preview_lines + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return credit notes that were created during the given date interval. + sig { returns(T.any(::Stripe::CreditNoteService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return credit notes for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return credit notes for the invoice specified by this invoice ID. + sig { returns(String) } + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::CreditNoteService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], invoice: String, limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + sig { returns(String) } + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void } + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + sig { returns(Integer) } + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + sig { returns(String) } + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + sig { returns(String) } + attr_accessor :invoice_line_item + # The line item quantity to credit. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + sig { + returns(T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Line::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + sig { returns(String) } + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, invoice_line_item: String, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::CreditNoteService::CreateParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String]), type: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + sig { returns(Integer) } + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + sig { params(amount_refunded: Integer, refund: String).void } + def initialize(amount_refunded: nil, refund: nil); end + end + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + sig { returns(Integer) } + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + sig { returns(Integer) } + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(Integer) } + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + sig { returns(String) } + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the invoice. + sig { returns(String) } + attr_accessor :invoice + # Line items that make up the credit note. + sig { returns(T::Array[::Stripe::CreditNoteService::CreateParams::Line]) } + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + sig { returns(Integer) } + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(String) } + attr_accessor :reason + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + sig { returns(Integer) } + attr_accessor :refund_amount + # Refunds to link to this credit note. + sig { returns(T::Array[::Stripe::CreditNoteService::CreateParams::Refund]) } + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + sig { returns(::Stripe::CreditNoteService::CreateParams::ShippingCost) } + attr_accessor :shipping_cost + sig { + params(amount: Integer, credit_amount: Integer, effective_at: Integer, email_type: String, expand: T::Array[String], invoice: String, lines: T::Array[::Stripe::CreditNoteService::CreateParams::Line], memo: String, metadata: T::Hash[String, String], out_of_band_amount: Integer, reason: String, refund: String, refund_amount: Integer, refunds: T::Array[::Stripe::CreditNoteService::CreateParams::Refund], shipping_cost: ::Stripe::CreditNoteService::CreateParams::ShippingCost).void + } + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Credit note memo. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { params(expand: T::Array[String], memo: String, metadata: T::Hash[String, String]).void } + def initialize(expand: nil, memo: nil, metadata: nil); end + end + class PreviewParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class TaxAmount < Stripe::RequestParams + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # The id of the tax rate for this tax amount. The tax rate must have been automatically created by Stripe. + sig { returns(String) } + attr_accessor :tax_rate + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { params(amount: Integer, tax_rate: String, taxable_amount: Integer).void } + def initialize(amount: nil, tax_rate: nil, taxable_amount: nil); end + end + # The line item amount to credit. Only valid when `type` is `invoice_line_item`. If invoice is set up with `automatic_tax[enabled]=true`, this amount is tax exclusive + sig { returns(Integer) } + attr_accessor :amount + # The description of the credit note line item. Only valid when the `type` is `custom_line_item`. + sig { returns(String) } + attr_accessor :description + # The invoice line item to credit. Only valid when the `type` is `invoice_line_item`. + sig { returns(String) } + attr_accessor :invoice_line_item + # The line item quantity to credit. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for the credit note line item. Cannot be mixed with `tax_rates`. + sig { + returns(T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Line::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the credit note line item. Only valid when the `type` is `custom_line_item` and cannot be mixed with `tax_amounts`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Type of the credit note line item, one of `invoice_line_item` or `custom_line_item` + sig { returns(String) } + attr_accessor :type + # The integer unit amount in cents (or local equivalent) of the credit note line item. This `unit_amount` will be multiplied by the quantity to get the full amount to credit for this line item. Only valid when `type` is `custom_line_item`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, invoice_line_item: String, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::CreditNoteService::PreviewParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String]), type: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + invoice_line_item: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil, + type: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Refund < Stripe::RequestParams + # Amount of the refund that applies to this credit note, in cents (or local equivalent). Defaults to the entire refund amount. + sig { returns(Integer) } + attr_accessor :amount_refunded + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + sig { params(amount_refunded: Integer, refund: String).void } + def initialize(amount_refunded: nil, refund: nil); end + end + class ShippingCost < Stripe::RequestParams + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + # The integer amount in cents (or local equivalent) representing the total amount of the credit note. + sig { returns(Integer) } + attr_accessor :amount + # The integer amount in cents (or local equivalent) representing the amount to credit the customer's balance, which will be automatically applied to their next invoice. + sig { returns(Integer) } + attr_accessor :credit_amount + # The date when this credit note is in effect. Same as `created` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the credit note PDF. + sig { returns(Integer) } + attr_accessor :effective_at + # Type of email to send to the customer, one of `credit_note` or `none` and the default is `credit_note`. + sig { returns(String) } + attr_accessor :email_type + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the invoice. + sig { returns(String) } + attr_accessor :invoice + # Line items that make up the credit note. + sig { returns(T::Array[::Stripe::CreditNoteService::PreviewParams::Line]) } + attr_accessor :lines + # The credit note's memo appears on the credit note PDF. + sig { returns(String) } + attr_accessor :memo + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The integer amount in cents (or local equivalent) representing the amount that is credited outside of Stripe. + sig { returns(Integer) } + attr_accessor :out_of_band_amount + # Reason for issuing this credit note, one of `duplicate`, `fraudulent`, `order_change`, or `product_unsatisfactory` + sig { returns(String) } + attr_accessor :reason + # ID of an existing refund to link this credit note to. + sig { returns(String) } + attr_accessor :refund + # The integer amount in cents (or local equivalent) representing the amount to refund. If set, a refund will be created for the charge associated with the invoice. + sig { returns(Integer) } + attr_accessor :refund_amount + # Refunds to link to this credit note. + sig { returns(T::Array[::Stripe::CreditNoteService::PreviewParams::Refund]) } + attr_accessor :refunds + # When shipping_cost contains the shipping_rate from the invoice, the shipping_cost is included in the credit note. + sig { returns(::Stripe::CreditNoteService::PreviewParams::ShippingCost) } + attr_accessor :shipping_cost + sig { + params(amount: Integer, credit_amount: Integer, effective_at: Integer, email_type: String, expand: T::Array[String], invoice: String, lines: T::Array[::Stripe::CreditNoteService::PreviewParams::Line], memo: String, metadata: T::Hash[String, String], out_of_band_amount: Integer, reason: String, refund: String, refund_amount: Integer, refunds: T::Array[::Stripe::CreditNoteService::PreviewParams::Refund], shipping_cost: ::Stripe::CreditNoteService::PreviewParams::ShippingCost).void + } + def initialize( + amount: nil, + credit_amount: nil, + effective_at: nil, + email_type: nil, + expand: nil, + invoice: nil, + lines: nil, + memo: nil, + metadata: nil, + out_of_band_amount: nil, + reason: nil, + refund: nil, + refund_amount: nil, + refunds: nil, + shipping_cost: nil + ); end + end + class VoidCreditNoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Issue a credit note to adjust the amount of a finalized invoice. For a status=open invoice, a credit note reduces + # its amount_due. For a status=paid invoice, a credit note does not affect its amount_due. Instead, it can result + # in any combination of the following: + # + # + # Refund: create a new refund (using refund_amount) or link an existing refund (using refund). + # Customer balance credit: credit the customer's balance (using credit_amount) which will be automatically applied to their next invoice when it's finalized. + # Outside of Stripe credit: record the amount that is or will be credited outside of Stripe (using out_of_band_amount). + # + # + # For post-payment credit notes the sum of the refund, credit and outside of Stripe amounts must equal the credit note total. + # + # You may issue multiple credit notes for an invoice. Each credit note will increment the invoice's pre_payment_credit_notes_amount + # or post_payment_credit_notes_amount depending on its status at the time of credit note creation. + sig { + params(params: T.any(::Stripe::CreditNoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def create(params = {}, opts = {}); end + + # Returns a list of credit notes. + sig { + params(params: T.any(::Stripe::CreditNoteService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Get a preview of a credit note without creating it. + sig { + params(params: T.any(::Stripe::CreditNoteService::PreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def preview(params = {}, opts = {}); end + + # Retrieves the credit note object with the given identifier. + sig { + params(id: String, params: T.any(::Stripe::CreditNoteService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def retrieve(id, params = {}, opts = {}); end + + # Updates an existing credit note. + sig { + params(id: String, params: T.any(::Stripe::CreditNoteService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def update(id, params = {}, opts = {}); end + + # Marks a credit note as void. Learn more about [voiding credit notes](https://stripe.com/docs/billing/invoices/credit-notes#voiding). + sig { + params(id: String, params: T.any(::Stripe::CreditNoteService::VoidCreditNoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CreditNote) + } + def void_credit_note(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_balance_transaction_service.rbi b/rbi/stripe/services/customer_balance_transaction_service.rbi new file mode 100644 index 000000000..ee40b14b6 --- /dev/null +++ b/rbi/stripe/services/customer_balance_transaction_service.rbi @@ -0,0 +1,92 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerBalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # The integer amount in **cents (or local equivalent)** to apply to the customer's credit balance. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Specifies the [`invoice_credit_balance`](https://stripe.com/docs/api/customers/object#customer_object-invoice_credit_balance) that this transaction will apply to. If the customer's `currency` is not set, it will be updated to this value. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(amount: nil, currency: nil, description: nil, expand: nil, metadata: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + # Creates an immutable transaction that updates the customer's credit [balance](https://stripe.com/docs/billing/customer/balance). + sig { + params(customer: String, params: T.any(::Stripe::CustomerBalanceTransactionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerBalanceTransaction) + } + def create(customer, params = {}, opts = {}); end + + # Returns a list of transactions that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). + sig { + params(customer: String, params: T.any(::Stripe::CustomerBalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(customer, params = {}, opts = {}); end + + # Retrieves a specific customer balance transaction that updated the customer's [balances](https://stripe.com/docs/billing/customer/balance). + sig { + params(customer: String, transaction: String, params: T.any(::Stripe::CustomerBalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerBalanceTransaction) + } + def retrieve(customer, transaction, params = {}, opts = {}); end + + # Most credit balance transaction fields are immutable, but you may update its description and metadata. + sig { + params(customer: String, transaction: String, params: T.any(::Stripe::CustomerBalanceTransactionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerBalanceTransaction) + } + def update(customer, transaction, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_cash_balance_service.rbi b/rbi/stripe/services/customer_cash_balance_service.rbi new file mode 100644 index 000000000..78fac2e4f --- /dev/null +++ b/rbi/stripe/services/customer_cash_balance_service.rbi @@ -0,0 +1,45 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerCashBalanceService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + sig { returns(String) } + attr_accessor :reconciliation_mode + sig { params(reconciliation_mode: String).void } + def initialize(reconciliation_mode: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A hash of settings for this cash balance. + sig { returns(::Stripe::CustomerCashBalanceService::UpdateParams::Settings) } + attr_accessor :settings + sig { + params(expand: T::Array[String], settings: ::Stripe::CustomerCashBalanceService::UpdateParams::Settings).void + } + def initialize(expand: nil, settings: nil); end + end + # Retrieves a customer's cash balance. + sig { + params(customer: String, params: T.any(::Stripe::CustomerCashBalanceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CashBalance) + } + def retrieve(customer, params = {}, opts = {}); end + + # Changes the settings on a customer's cash balance. + sig { + params(customer: String, params: T.any(::Stripe::CustomerCashBalanceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CashBalance) + } + def update(customer, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_cash_balance_transaction_service.rbi b/rbi/stripe/services/customer_cash_balance_transaction_service.rbi new file mode 100644 index 000000000..1d2933fba --- /dev/null +++ b/rbi/stripe/services/customer_cash_balance_transaction_service.rbi @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerCashBalanceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of transactions that modified the customer's [cash balance](https://stripe.com/docs/payments/customer-balance). + sig { + params(customer: String, params: T.any(::Stripe::CustomerCashBalanceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(customer, params = {}, opts = {}); end + + # Retrieves a specific cash balance transaction, which updated the customer's [cash balance](https://stripe.com/docs/payments/customer-balance). + sig { + params(customer: String, transaction: String, params: T.any(::Stripe::CustomerCashBalanceTransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerCashBalanceTransaction) + } + def retrieve(customer, transaction, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_funding_instructions_service.rbi b/rbi/stripe/services/customer_funding_instructions_service.rbi new file mode 100644 index 000000000..b4e1c0a10 --- /dev/null +++ b/rbi/stripe/services/customer_funding_instructions_service.rbi @@ -0,0 +1,59 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerFundingInstructionsService < StripeService + class CreateParams < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The type of the `bank_transfer` + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Additional parameters for `bank_transfer` funding types + sig { returns(::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer) } + attr_accessor :bank_transfer + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The `funding_type` to get the instructions for. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::CustomerFundingInstructionsService::CreateParams::BankTransfer, currency: String, expand: T::Array[String], funding_type: String).void + } + def initialize(bank_transfer: nil, currency: nil, expand: nil, funding_type: nil); end + end + # Retrieve funding instructions for a customer cash balance. If funding instructions do not yet exist for the customer, new + # funding instructions will be created. If funding instructions have already been created for a given customer, the same + # funding instructions will be retrieved. In other words, we will return the same funding instructions each time. + sig { + params(customer: String, params: T.any(::Stripe::CustomerFundingInstructionsService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FundingInstructions) + } + def create(customer, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_payment_method_service.rbi b/rbi/stripe/services/customer_payment_method_service.rbi new file mode 100644 index 000000000..6411fc806 --- /dev/null +++ b/rbi/stripe/services/customer_payment_method_service.rbi @@ -0,0 +1,57 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerPaymentMethodService < StripeService + class ListParams < Stripe::RequestParams + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + sig { returns(String) } + attr_accessor :type + sig { + params(allow_redisplay: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String).void + } + def initialize( + allow_redisplay: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of PaymentMethods for a given Customer + sig { + params(customer: String, params: T.any(::Stripe::CustomerPaymentMethodService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(customer, params = {}, opts = {}); end + + # Retrieves a PaymentMethod object for a given Customer. + sig { + params(customer: String, payment_method: String, params: T.any(::Stripe::CustomerPaymentMethodService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def retrieve(customer, payment_method, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_payment_source_service.rbi b/rbi/stripe/services/customer_payment_source_service.rbi new file mode 100644 index 000000000..b9a5b1cdc --- /dev/null +++ b/rbi/stripe/services/customer_payment_source_service.rbi @@ -0,0 +1,228 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerPaymentSourceService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filter sources according to a particular object type. + sig { returns(String) } + attr_accessor :object + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, object: String, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + object: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Please refer to full [documentation](https://stripe.com/docs/api) instead. + sig { returns(String) } + attr_accessor :source + # Attribute for param field validate + sig { returns(T::Boolean) } + attr_accessor :validate + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], source: String, validate: T::Boolean).void + } + def initialize(expand: nil, metadata: nil, source: nil, validate: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Owner's address. + sig { returns(::Stripe::CustomerPaymentSourceService::UpdateParams::Owner::Address) } + attr_accessor :address + # Owner's email address. + sig { returns(String) } + attr_accessor :email + # Owner's full name. + sig { returns(String) } + attr_accessor :name + # Owner's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::CustomerPaymentSourceService::UpdateParams::Owner::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + # The name of the person or business that owns the bank account. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. This can be either `individual` or `company`. + sig { returns(String) } + attr_accessor :account_holder_type + # City/District/Suburb/Town/Village. + sig { returns(String) } + attr_accessor :address_city + # Billing address country, if provided when creating card. + sig { returns(String) } + attr_accessor :address_country + # Address line 1 (Street address/PO Box/Company name). + sig { returns(String) } + attr_accessor :address_line1 + # Address line 2 (Apartment/Suite/Unit/Building). + sig { returns(String) } + attr_accessor :address_line2 + # State/County/Province/Region. + sig { returns(String) } + attr_accessor :address_state + # ZIP or postal code. + sig { returns(String) } + attr_accessor :address_zip + # Two digit number representing the card’s expiration month. + sig { returns(String) } + attr_accessor :exp_month + # Four digit number representing the card’s expiration year. + sig { returns(String) } + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Cardholder name. + sig { returns(String) } + attr_accessor :name + # Attribute for param field owner + sig { returns(::Stripe::CustomerPaymentSourceService::UpdateParams::Owner) } + attr_accessor :owner + sig { + params(account_holder_name: String, account_holder_type: String, address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, exp_month: String, exp_year: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), name: String, owner: ::Stripe::CustomerPaymentSourceService::UpdateParams::Owner).void + } + def initialize( + account_holder_name: nil, + account_holder_type: nil, + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + metadata: nil, + name: nil, + owner: nil + ); end + end + class DeleteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class VerifyParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + sig { returns(T::Array[Integer]) } + attr_accessor :amounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(amounts: T::Array[Integer], expand: T::Array[String]).void } + def initialize(amounts: nil, expand: nil); end + end + # When you create a new credit card, you must specify a customer or recipient on which to create it. + # + # If the card's owner has no default card, then the new card will become the default. + # However, if the owner already has a default, then it will not change. + # To change the default, you should [update the customer](https://stripe.com/docs/api#update_customer) to have a new default_source. + sig { + params(customer: String, params: T.any(::Stripe::CustomerPaymentSourceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) + } + def create(customer, params = {}, opts = {}); end + + # Delete a specified source for a given customer. + sig { + params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) + } + def delete(customer, id, params = {}, opts = {}); end + + # List sources for a specified customer. + sig { + params(customer: String, params: T.any(::Stripe::CustomerPaymentSourceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(customer, params = {}, opts = {}); end + + # Retrieve a specified source for a given customer. + sig { + params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) + } + def retrieve(customer, id, params = {}, opts = {}); end + + # Update a specified source for a given customer. + sig { + params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) + } + def update(customer, id, params = {}, opts = {}); end + + # Verify a specified bank account for a given customer. + sig { + params(customer: String, id: String, params: T.any(::Stripe::CustomerPaymentSourceService::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::BankAccount) + } + def verify(customer, id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_service.rbi b/rbi/stripe/services/customer_service.rbi new file mode 100644 index 000000000..3fdfadb74 --- /dev/null +++ b/rbi/stripe/services/customer_service.rbi @@ -0,0 +1,647 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerService < StripeService + attr_reader :cash_balance + attr_reader :balance_transactions + attr_reader :cash_balance_transactions + attr_reader :payment_sources + attr_reader :tax_ids + attr_reader :payment_methods + attr_reader :funding_instructions + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + sig { returns(String) } + attr_accessor :reconciliation_mode + sig { params(reconciliation_mode: String).void } + def initialize(reconciliation_mode: nil); end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + sig { returns(::Stripe::CustomerService::UpdateParams::CashBalance::Settings) } + attr_accessor :settings + sig { + params(settings: ::Stripe::CustomerService::UpdateParams::CashBalance::Settings).void + } + def initialize(settings: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + sig { returns(String) } + attr_accessor :template + sig { params(amount_tax_display: T.nilable(String), template: String).void } + def initialize(amount_tax_display: nil, template: nil); end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + sig { + returns(T.nilable(T::Array[::Stripe::CustomerService::UpdateParams::InvoiceSettings::CustomField])) + } + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + sig { returns(String) } + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::CustomerService::UpdateParams::InvoiceSettings::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(custom_fields: T.nilable(T::Array[::Stripe::CustomerService::UpdateParams::InvoiceSettings::CustomField]), default_payment_method: String, footer: String, rendering_options: T.nilable(::Stripe::CustomerService::UpdateParams::InvoiceSettings::RenderingOptions)).void + } + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { returns(::Stripe::CustomerService::UpdateParams::Shipping::Address) } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::CustomerService::UpdateParams::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `auto`. + sig { returns(String) } + attr_accessor :validate_location + sig { params(ip_address: T.nilable(String), validate_location: String).void } + def initialize(ip_address: nil, validate_location: nil); end + end + # The customer's address. + sig { returns(T.nilable(::Stripe::CustomerService::UpdateParams::Address)) } + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + sig { returns(Integer) } + attr_accessor :balance + # Balance information and default balance settings for this customer. + sig { returns(::Stripe::CustomerService::UpdateParams::CashBalance) } + attr_accessor :cash_balance + # Attribute for param field coupon + sig { returns(String) } + attr_accessor :coupon + # If you are using payment methods created via the PaymentMethods API, see the [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method) parameter. + # + # Provide the ID of a payment source already attached to this customer to make it this customer's default payment source. + # + # If you want to add a new payment source and make it the default, see the [source](https://stripe.com/docs/api/customers/update#update_customer-source) property. + sig { returns(String) } + attr_accessor :default_source + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + sig { returns(String) } + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + sig { returns(String) } + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + sig { returns(::Stripe::CustomerService::UpdateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The customer's full name or business name. + sig { returns(String) } + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + sig { returns(Integer) } + attr_accessor :next_invoice_sequence + # The customer's phone number. + sig { returns(String) } + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + sig { returns(String) } + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { returns(T.nilable(::Stripe::CustomerService::UpdateParams::Shipping)) } + attr_accessor :shipping + # Attribute for param field source + sig { returns(String) } + attr_accessor :source + # Tax details about the customer. + sig { returns(::Stripe::CustomerService::UpdateParams::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # Attribute for param field validate + sig { returns(T::Boolean) } + attr_accessor :validate + sig { + params(address: T.nilable(::Stripe::CustomerService::UpdateParams::Address), balance: Integer, cash_balance: ::Stripe::CustomerService::UpdateParams::CashBalance, coupon: String, default_source: String, description: String, email: String, expand: T::Array[String], invoice_prefix: String, invoice_settings: ::Stripe::CustomerService::UpdateParams::InvoiceSettings, metadata: T.nilable(T::Hash[String, String]), name: String, next_invoice_sequence: Integer, phone: String, preferred_locales: T::Array[String], promotion_code: String, shipping: T.nilable(::Stripe::CustomerService::UpdateParams::Shipping), source: String, tax: ::Stripe::CustomerService::UpdateParams::Tax, tax_exempt: T.nilable(String), validate: T::Boolean).void + } + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + default_source: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + validate: nil + ); end + end + class DeleteDiscountParams < Stripe::RequestParams + + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return customers that were created during the given date interval. + sig { returns(T.any(::Stripe::CustomerService::ListParams::Created, Integer)) } + attr_accessor :created + # A case-sensitive filter on the list based on the customer's `email` field. The value must be a string. + sig { returns(String) } + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Provides a list of customers that are associated with the specified test clock. The response will not include customers with test clocks if this parameter is not set. + sig { returns(String) } + attr_accessor :test_clock + sig { + params(created: T.any(::Stripe::CustomerService::ListParams::Created, Integer), email: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, test_clock: String).void + } + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + test_clock: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class CashBalance < Stripe::RequestParams + class Settings < Stripe::RequestParams + # Controls how funds transferred by the customer are applied to payment intents and invoices. Valid options are `automatic`, `manual`, or `merchant_default`. For more information about these reconciliation modes, see [Reconciliation](https://stripe.com/docs/payments/customer-balance/reconciliation). + sig { returns(String) } + attr_accessor :reconciliation_mode + sig { params(reconciliation_mode: String).void } + def initialize(reconciliation_mode: nil); end + end + # Settings controlling the behavior of the customer's cash balance, + # such as reconciliation of funds received. + sig { returns(::Stripe::CustomerService::CreateParams::CashBalance::Settings) } + attr_accessor :settings + sig { + params(settings: ::Stripe::CustomerService::CreateParams::CashBalance::Settings).void + } + def initialize(settings: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # ID of the invoice rendering template to use for future invoices. + sig { returns(String) } + attr_accessor :template + sig { params(amount_tax_display: T.nilable(String), template: String).void } + def initialize(amount_tax_display: nil, template: nil); end + end + # The list of up to 4 default custom fields to be displayed on invoices for this customer. When updating, pass an empty string to remove previously-defined fields. + sig { + returns(T.nilable(T::Array[::Stripe::CustomerService::CreateParams::InvoiceSettings::CustomField])) + } + attr_accessor :custom_fields + # ID of a payment method that's attached to the customer, to be used as the customer's default payment method for subscriptions and invoices. + sig { returns(String) } + attr_accessor :default_payment_method + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::CustomerService::CreateParams::InvoiceSettings::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(custom_fields: T.nilable(T::Array[::Stripe::CustomerService::CreateParams::InvoiceSettings::CustomField]), default_payment_method: String, footer: String, rendering_options: T.nilable(::Stripe::CustomerService::CreateParams::InvoiceSettings::RenderingOptions)).void + } + def initialize( + custom_fields: nil, + default_payment_method: nil, + footer: nil, + rendering_options: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { returns(::Stripe::CustomerService::CreateParams::Shipping::Address) } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::CustomerService::CreateParams::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + # A flag that indicates when Stripe should validate the customer tax location. Defaults to `deferred`. + sig { returns(String) } + attr_accessor :validate_location + sig { params(ip_address: T.nilable(String), validate_location: String).void } + def initialize(ip_address: nil, validate_location: nil); end + end + class TaxIdDatum < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { returns(T.nilable(::Stripe::CustomerService::CreateParams::Address)) } + attr_accessor :address + # An integer amount in cents (or local equivalent) that represents the customer's current balance, which affect the customer's future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice. + sig { returns(Integer) } + attr_accessor :balance + # Balance information and default balance settings for this customer. + sig { returns(::Stripe::CustomerService::CreateParams::CashBalance) } + attr_accessor :cash_balance + # Attribute for param field coupon + sig { returns(String) } + attr_accessor :coupon + # An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard. + sig { returns(String) } + attr_accessor :description + # Customer's email address. It's displayed alongside the customer in your dashboard and can be useful for searching and tracking. This may be up to *512 characters*. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The prefix for the customer used to generate unique invoice numbers. Must be 3–12 uppercase letters or numbers. + sig { returns(String) } + attr_accessor :invoice_prefix + # Default invoice settings for this customer. + sig { returns(::Stripe::CustomerService::CreateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The customer's full name or business name. + sig { returns(String) } + attr_accessor :name + # The sequence to be used on the customer's next invoice. Defaults to 1. + sig { returns(Integer) } + attr_accessor :next_invoice_sequence + # Attribute for param field payment_method + sig { returns(String) } + attr_accessor :payment_method + # The customer's phone number. + sig { returns(String) } + attr_accessor :phone + # Customer's preferred languages, ordered by preference. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # The ID of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount. + sig { returns(String) } + attr_accessor :promotion_code + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { returns(T.nilable(::Stripe::CustomerService::CreateParams::Shipping)) } + attr_accessor :shipping + # Attribute for param field source + sig { returns(String) } + attr_accessor :source + # Tax details about the customer. + sig { returns(::Stripe::CustomerService::CreateParams::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { returns(T::Array[::Stripe::CustomerService::CreateParams::TaxIdDatum]) } + attr_accessor :tax_id_data + # ID of the test clock to attach to the customer. + sig { returns(String) } + attr_accessor :test_clock + # Attribute for param field validate + sig { returns(T::Boolean) } + attr_accessor :validate + sig { + params(address: T.nilable(::Stripe::CustomerService::CreateParams::Address), balance: Integer, cash_balance: ::Stripe::CustomerService::CreateParams::CashBalance, coupon: String, description: String, email: String, expand: T::Array[String], invoice_prefix: String, invoice_settings: ::Stripe::CustomerService::CreateParams::InvoiceSettings, metadata: T.nilable(T::Hash[String, String]), name: String, next_invoice_sequence: Integer, payment_method: String, phone: String, preferred_locales: T::Array[String], promotion_code: String, shipping: T.nilable(::Stripe::CustomerService::CreateParams::Shipping), source: String, tax: ::Stripe::CustomerService::CreateParams::Tax, tax_exempt: T.nilable(String), tax_id_data: T::Array[::Stripe::CustomerService::CreateParams::TaxIdDatum], test_clock: String, validate: T::Boolean).void + } + def initialize( + address: nil, + balance: nil, + cash_balance: nil, + coupon: nil, + description: nil, + email: nil, + expand: nil, + invoice_prefix: nil, + invoice_settings: nil, + metadata: nil, + name: nil, + next_invoice_sequence: nil, + payment_method: nil, + phone: nil, + preferred_locales: nil, + promotion_code: nil, + shipping: nil, + source: nil, + tax: nil, + tax_exempt: nil, + tax_id_data: nil, + test_clock: nil, + validate: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for customers](https://stripe.com/docs/search#query-fields-for-customers). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + # Creates a new customer object. + sig { + params(params: T.any(::Stripe::CustomerService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def create(params = {}, opts = {}); end + + # Permanently deletes a customer. It cannot be undone. Also immediately cancels any active subscriptions on the customer. + sig { + params(customer: String, params: T.any(::Stripe::CustomerService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def delete(customer, params = {}, opts = {}); end + + # Removes the currently applied discount on a customer. + sig { + params(customer: String, params: T.any(::Stripe::CustomerService::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount) + } + def delete_discount(customer, params = {}, opts = {}); end + + # Returns a list of your customers. The customers are returned sorted by creation date, with the most recent customers appearing first. + sig { + params(params: T.any(::Stripe::CustomerService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Customer object. + sig { + params(customer: String, params: T.any(::Stripe::CustomerService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def retrieve(customer, params = {}, opts = {}); end + + # Search for customers you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::CustomerService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Updates the specified customer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. For example, if you pass the source parameter, that becomes the customer's active source (e.g., a card) to be used for all charges in the future. When you update a customer to a new valid card source by passing the source parameter: for each of the customer's current subscriptions, if the subscription bills automatically and is in the past_due state, then the latest open invoice for the subscription with automatic collection enabled will be retried. This retry will not count as an automatic retry, and will not affect the next regularly scheduled payment for the invoice. Changing the default_source for a customer will not trigger this behavior. + # + # This request accepts mostly the same arguments as the customer creation call. + sig { + params(customer: String, params: T.any(::Stripe::CustomerService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Customer) + } + def update(customer, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_session_service.rbi b/rbi/stripe/services/customer_session_service.rbi new file mode 100644 index 000000000..cfe41cae5 --- /dev/null +++ b/rbi/stripe/services/customer_session_service.rbi @@ -0,0 +1,110 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerSessionService < StripeService + class CreateParams < Stripe::RequestParams + class Components < Stripe::RequestParams + class BuyButton < Stripe::RequestParams + # Whether the buy button is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class PaymentElement < Stripe::RequestParams + class Features < Stripe::RequestParams + # A list of [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) values that controls which saved payment methods the Payment Element displays by filtering to only show payment methods with an `allow_redisplay` value that is present in this list. + # + # If not specified, defaults to ["always"]. In order to display all saved payment methods, specify ["always", "limited", "unspecified"]. + sig { returns(T::Array[String]) } + attr_accessor :payment_method_allow_redisplay_filters + # Controls whether or not the Payment Element shows saved payment methods. This parameter defaults to `disabled`. + sig { returns(String) } + attr_accessor :payment_method_redisplay + # Determines the max number of saved payment methods for the Payment Element to display. This parameter defaults to `3`. + sig { returns(Integer) } + attr_accessor :payment_method_redisplay_limit + # Controls whether the Payment Element displays the option to remove a saved payment method. This parameter defaults to `disabled`. + # + # Allowing buyers to remove their saved payment methods impacts subscriptions that depend on that payment method. Removing the payment method detaches the [`customer` object](https://docs.stripe.com/api/payment_methods/object#payment_method_object-customer) from that [PaymentMethod](https://docs.stripe.com/api/payment_methods). + sig { returns(String) } + attr_accessor :payment_method_remove + # Controls whether the Payment Element displays a checkbox offering to save a new payment method. This parameter defaults to `disabled`. + # + # If a customer checks the box, the [`allow_redisplay`](https://docs.stripe.com/api/payment_methods/object#payment_method_object-allow_redisplay) value on the PaymentMethod is set to `'always'` at confirmation time. For PaymentIntents, the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value is also set to the value defined in `payment_method_save_usage`. + sig { returns(String) } + attr_accessor :payment_method_save + # When using PaymentIntents and the customer checks the save checkbox, this field determines the [`setup_future_usage`](https://docs.stripe.com/api/payment_intents/object#payment_intent_object-setup_future_usage) value used to confirm the PaymentIntent. + # + # When using SetupIntents, directly configure the [`usage`](https://docs.stripe.com/api/setup_intents/object#setup_intent_object-usage) value on SetupIntent creation. + sig { returns(String) } + attr_accessor :payment_method_save_usage + sig { + params(payment_method_allow_redisplay_filters: T::Array[String], payment_method_redisplay: String, payment_method_redisplay_limit: Integer, payment_method_remove: String, payment_method_save: String, payment_method_save_usage: String).void + } + def initialize( + payment_method_allow_redisplay_filters: nil, + payment_method_redisplay: nil, + payment_method_redisplay_limit: nil, + payment_method_remove: nil, + payment_method_save: nil, + payment_method_save_usage: nil + ); end + end + # Whether the Payment Element is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + # This hash defines whether the Payment Element supports certain features. + sig { + returns(::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement::Features) + } + attr_accessor :features + sig { + params(enabled: T::Boolean, features: ::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement::Features).void + } + def initialize(enabled: nil, features: nil); end + end + class PricingTable < Stripe::RequestParams + # Whether the pricing table is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + # Configuration for buy button. + sig { returns(::Stripe::CustomerSessionService::CreateParams::Components::BuyButton) } + attr_accessor :buy_button + # Configuration for the Payment Element. + sig { returns(::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement) } + attr_accessor :payment_element + # Configuration for the pricing table. + sig { returns(::Stripe::CustomerSessionService::CreateParams::Components::PricingTable) } + attr_accessor :pricing_table + sig { + params(buy_button: ::Stripe::CustomerSessionService::CreateParams::Components::BuyButton, payment_element: ::Stripe::CustomerSessionService::CreateParams::Components::PaymentElement, pricing_table: ::Stripe::CustomerSessionService::CreateParams::Components::PricingTable).void + } + def initialize(buy_button: nil, payment_element: nil, pricing_table: nil); end + end + # Configuration for each component. Exactly 1 component must be enabled. + sig { returns(::Stripe::CustomerSessionService::CreateParams::Components) } + attr_accessor :components + # The ID of an existing customer for which to create the Customer Session. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(components: ::Stripe::CustomerSessionService::CreateParams::Components, customer: String, expand: T::Array[String]).void + } + def initialize(components: nil, customer: nil, expand: nil); end + end + # Creates a Customer Session object that includes a single-use client secret that you can use on your front-end to grant client-side API access for certain customer resources. + sig { + params(params: T.any(::Stripe::CustomerSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerSession) + } + def create(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/customer_tax_id_service.rbi b/rbi/stripe/services/customer_tax_id_service.rbi new file mode 100644 index 000000000..a94ee6d35 --- /dev/null +++ b/rbi/stripe/services/customer_tax_id_service.rbi @@ -0,0 +1,72 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class CustomerTaxIdService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(expand: T::Array[String], type: String, value: String).void } + def initialize(expand: nil, type: nil, value: nil); end + end + # Creates a new tax_id object for a customer. + sig { + params(customer: String, params: T.any(::Stripe::CustomerTaxIdService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def create(customer, params = {}, opts = {}); end + + # Deletes an existing tax_id object. + sig { + params(customer: String, id: String, params: T.any(::Stripe::CustomerTaxIdService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def delete(customer, id, params = {}, opts = {}); end + + # Returns a list of tax IDs for a customer. + sig { + params(customer: String, params: T.any(::Stripe::CustomerTaxIdService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(customer, params = {}, opts = {}); end + + # Retrieves the tax_id object with the given identifier. + sig { + params(customer: String, id: String, params: T.any(::Stripe::CustomerTaxIdService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def retrieve(customer, id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/dispute_service.rbi b/rbi/stripe/services/dispute_service.rbi new file mode 100644 index 000000000..e46ed6a80 --- /dev/null +++ b/rbi/stripe/services/dispute_service.rbi @@ -0,0 +1,422 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class DisputeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return disputes associated to the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return disputes that were created during the given date interval. + sig { returns(T.any(::Stripe::DisputeService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return disputes associated to the PaymentIntent specified by this PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::DisputeService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class EnhancedEvidence < Stripe::RequestParams + class VisaCompellingEvidence3 < Stripe::RequestParams + class DisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # User Account ID used to log into business platform. Must be recognizable by the user. + sig { returns(T.nilable(String)) } + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_id + # The email address of the customer. + sig { returns(T.nilable(String)) } + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + sig { returns(T.nilable(String)) } + attr_accessor :customer_purchase_ip + # Categorization of disputed payment. + sig { returns(String) } + attr_accessor :merchandise_or_services + # A description of the product or service that was sold. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress) + } + attr_accessor :shipping_address + sig { + params(customer_account_id: T.nilable(String), customer_device_fingerprint: T.nilable(String), customer_device_id: T.nilable(String), customer_email_address: T.nilable(String), customer_purchase_ip: T.nilable(String), merchandise_or_services: String, product_description: T.nilable(String), shipping_address: ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction::ShippingAddress).void + } + def initialize( + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + merchandise_or_services: nil, + product_description: nil, + shipping_address: nil + ); end + end + class PriorUndisputedTransaction < Stripe::RequestParams + class ShippingAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(T.nilable(String)) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: T.nilable(String), line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Stripe charge ID for the Visa Compelling Evidence 3.0 eligible prior charge. + sig { returns(String) } + attr_accessor :charge + # User Account ID used to log into business platform. Must be recognizable by the user. + sig { returns(T.nilable(String)) } + attr_accessor :customer_account_id + # Unique identifier of the cardholder’s device derived from a combination of at least two hardware and software attributes. Must be at least 20 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_fingerprint + # Unique identifier of the cardholder’s device such as a device serial number (e.g., International Mobile Equipment Identity [IMEI]). Must be at least 15 characters. + sig { returns(T.nilable(String)) } + attr_accessor :customer_device_id + # The email address of the customer. + sig { returns(T.nilable(String)) } + attr_accessor :customer_email_address + # The IP address that the customer used when making the purchase. + sig { returns(T.nilable(String)) } + attr_accessor :customer_purchase_ip + # A description of the product or service that was sold. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # The address to which a physical product was shipped. All fields are required for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress) + } + attr_accessor :shipping_address + sig { + params(charge: String, customer_account_id: T.nilable(String), customer_device_fingerprint: T.nilable(String), customer_device_id: T.nilable(String), customer_email_address: T.nilable(String), customer_purchase_ip: T.nilable(String), product_description: T.nilable(String), shipping_address: ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction::ShippingAddress).void + } + def initialize( + charge: nil, + customer_account_id: nil, + customer_device_fingerprint: nil, + customer_device_id: nil, + customer_email_address: nil, + customer_purchase_ip: nil, + product_description: nil, + shipping_address: nil + ); end + end + # Disputed transaction details for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction) + } + attr_accessor :disputed_transaction + # List of exactly two prior undisputed transaction objects for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(T::Array[::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction]) + } + attr_accessor :prior_undisputed_transactions + sig { + params(disputed_transaction: ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::DisputedTransaction, prior_undisputed_transactions: T::Array[::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3::PriorUndisputedTransaction]).void + } + def initialize(disputed_transaction: nil, prior_undisputed_transactions: nil); end + end + class VisaCompliance < Stripe::RequestParams + # A field acknowledging the fee incurred when countering a Visa Compliance dispute. If this field is set to true, evidence can be submitted for the compliance dispute, and you may incur a $500 fee if the case is lost. + sig { returns(T::Boolean) } + attr_accessor :fee_acknowledged + sig { params(fee_acknowledged: T::Boolean).void } + def initialize(fee_acknowledged: nil); end + end + # Evidence provided for Visa Compelling Evidence 3.0 evidence submission. + sig { + returns(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3) + } + attr_accessor :visa_compelling_evidence_3 + # Evidence provided for Visa Compliance evidence submission. + sig { + returns(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance) + } + attr_accessor :visa_compliance + sig { + params(visa_compelling_evidence_3: ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompellingEvidence3, visa_compliance: ::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence::VisaCompliance).void + } + def initialize(visa_compelling_evidence_3: nil, visa_compliance: nil); end + end + # Any server or activity logs showing proof that the customer accessed or downloaded the purchased digital product. This information should include IP addresses, corresponding timestamps, and any detailed recorded activity. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :access_activity_log + # The billing address provided by the customer. + sig { returns(String) } + attr_accessor :billing_address + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your subscription cancellation policy, as shown to the customer. + sig { returns(String) } + attr_accessor :cancellation_policy + # An explanation of how and when the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :cancellation_policy_disclosure + # A justification for why the customer's subscription was not canceled. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :cancellation_rebuttal + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any communication with the customer that you feel is relevant to your case. Examples include emails proving that the customer received the product or service, or demonstrating their use of or satisfaction with the product or service. + sig { returns(String) } + attr_accessor :customer_communication + # The email address of the customer. + sig { returns(String) } + attr_accessor :customer_email_address + # The name of the customer. + sig { returns(String) } + attr_accessor :customer_name + # The IP address that the customer used when making the purchase. + sig { returns(String) } + attr_accessor :customer_purchase_ip + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) A relevant document or contract showing the customer's signature. + sig { returns(String) } + attr_accessor :customer_signature + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation for the prior charge that can uniquely identify the charge, such as a receipt, shipping label, work order, etc. This document should be paired with a similar document from the disputed payment that proves the two payments are separate. + sig { returns(String) } + attr_accessor :duplicate_charge_documentation + # An explanation of the difference between the disputed charge versus the prior charge that appears to be a duplicate. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :duplicate_charge_explanation + # The Stripe ID for the prior charge which appears to be a duplicate of the disputed charge. + sig { returns(String) } + attr_accessor :duplicate_charge_id + # Additional evidence for qualifying evidence programs. + sig { + returns(T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence)) + } + attr_accessor :enhanced_evidence + # A description of the product or service that was sold. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :product_description + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any receipt or message sent to the customer notifying them of the charge. + sig { returns(String) } + attr_accessor :receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Your refund policy, as shown to the customer. + sig { returns(String) } + attr_accessor :refund_policy + # Documentation demonstrating that the customer was shown your refund policy prior to purchase. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :refund_policy_disclosure + # A justification for why the customer is not entitled to a refund. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :refund_refusal_explanation + # The date on which the customer received or began receiving the purchased service, in a clear human-readable format. + sig { returns(String) } + attr_accessor :service_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a service was provided to the customer. This could include a copy of a signed contract, work order, or other form of written agreement. + sig { returns(String) } + attr_accessor :service_documentation + # The address to which a physical product was shipped. You should try to include as complete address information as possible. + sig { returns(String) } + attr_accessor :shipping_address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. If multiple carriers were used for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :shipping_carrier + # The date on which a physical product began its route to the shipping address, in a clear human-readable format. + sig { returns(String) } + attr_accessor :shipping_date + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Documentation showing proof that a product was shipped to the customer at the same address the customer provided to you. This could include a copy of the shipment receipt, shipping label, etc. It should show the customer's full shipping address, if possible. + sig { returns(String) } + attr_accessor :shipping_documentation + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :shipping_tracking_number + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Any additional evidence or statements. + sig { returns(String) } + attr_accessor :uncategorized_file + # Any additional evidence or statements. Has a maximum character count of 20,000. + sig { returns(String) } + attr_accessor :uncategorized_text + sig { + params(access_activity_log: String, billing_address: String, cancellation_policy: String, cancellation_policy_disclosure: String, cancellation_rebuttal: String, customer_communication: String, customer_email_address: String, customer_name: String, customer_purchase_ip: String, customer_signature: String, duplicate_charge_documentation: String, duplicate_charge_explanation: String, duplicate_charge_id: String, enhanced_evidence: T.nilable(::Stripe::DisputeService::UpdateParams::Evidence::EnhancedEvidence), product_description: String, receipt: String, refund_policy: String, refund_policy_disclosure: String, refund_refusal_explanation: String, service_date: String, service_documentation: String, shipping_address: String, shipping_carrier: String, shipping_date: String, shipping_documentation: String, shipping_tracking_number: String, uncategorized_file: String, uncategorized_text: String).void + } + def initialize( + access_activity_log: nil, + billing_address: nil, + cancellation_policy: nil, + cancellation_policy_disclosure: nil, + cancellation_rebuttal: nil, + customer_communication: nil, + customer_email_address: nil, + customer_name: nil, + customer_purchase_ip: nil, + customer_signature: nil, + duplicate_charge_documentation: nil, + duplicate_charge_explanation: nil, + duplicate_charge_id: nil, + enhanced_evidence: nil, + product_description: nil, + receipt: nil, + refund_policy: nil, + refund_policy_disclosure: nil, + refund_refusal_explanation: nil, + service_date: nil, + service_documentation: nil, + shipping_address: nil, + shipping_carrier: nil, + shipping_date: nil, + shipping_documentation: nil, + shipping_tracking_number: nil, + uncategorized_file: nil, + uncategorized_text: nil + ); end + end + # Evidence to upload, to respond to a dispute. Updating any field in the hash will submit all fields in the hash for review. The combined character count of all fields is limited to 150,000. + sig { returns(::Stripe::DisputeService::UpdateParams::Evidence) } + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Whether to immediately submit evidence to the bank. If `false`, evidence is staged on the dispute. Staged evidence is visible in the API and Dashboard, and can be submitted to the bank by making another request with this attribute set to `true` (the default). + sig { returns(T::Boolean) } + attr_accessor :submit + sig { + params(evidence: ::Stripe::DisputeService::UpdateParams::Evidence, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), submit: T::Boolean).void + } + def initialize(evidence: nil, expand: nil, metadata: nil, submit: nil); end + end + class CloseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Closing the dispute for a charge indicates that you do not have any evidence to submit and are essentially dismissing the dispute, acknowledging it as lost. + # + # The status of the dispute will change from needs_response to lost. Closing a dispute is irreversible. + sig { + params(dispute: String, params: T.any(::Stripe::DisputeService::CloseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute) + } + def close(dispute, params = {}, opts = {}); end + + # Returns a list of your disputes. + sig { + params(params: T.any(::Stripe::DisputeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the dispute with the given ID. + sig { + params(dispute: String, params: T.any(::Stripe::DisputeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute) + } + def retrieve(dispute, params = {}, opts = {}); end + + # When you get a dispute, contacting your customer is always the best first step. If that doesn't work, you can submit evidence to help us resolve the dispute in your favor. You can do this in your [dashboard](https://dashboard.stripe.com/disputes), but if you prefer, you can use the API to submit evidence programmatically. + # + # Depending on your dispute type, different evidence fields will give you a better chance of winning your dispute. To figure out which evidence fields to provide, see our [guide to dispute types](https://stripe.com/docs/disputes/categories). + sig { + params(dispute: String, params: T.any(::Stripe::DisputeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Dispute) + } + def update(dispute, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/entitlements/active_entitlement_service.rbi b/rbi/stripe/services/entitlements/active_entitlement_service.rbi new file mode 100644 index 000000000..d1c519c4c --- /dev/null +++ b/rbi/stripe/services/entitlements/active_entitlement_service.rbi @@ -0,0 +1,55 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Entitlements + class ActiveEntitlementService < StripeService + class ListParams < Stripe::RequestParams + # The ID of the customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieve a list of active entitlements for a customer + sig { + params(params: T.any(::Stripe::Entitlements::ActiveEntitlementService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieve an active entitlement + sig { + params(id: String, params: T.any(::Stripe::Entitlements::ActiveEntitlementService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::ActiveEntitlement) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/entitlements/feature_service.rbi b/rbi/stripe/services/entitlements/feature_service.rbi new file mode 100644 index 000000000..3038d6192 --- /dev/null +++ b/rbi/stripe/services/entitlements/feature_service.rbi @@ -0,0 +1,107 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Entitlements + class FeatureService < StripeService + class ListParams < Stripe::RequestParams + # If set, filter results to only include features with the given archive status. + sig { returns(T::Boolean) } + attr_accessor :archived + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # If set, filter results to only include features with the given lookup_key. + sig { returns(String) } + attr_accessor :lookup_key + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(archived: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, lookup_key: String, starting_after: String).void + } + def initialize( + archived: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_key: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A unique key you provide as your own system identifier. This may be up to 80 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + sig { + params(expand: T::Array[String], lookup_key: String, metadata: T::Hash[String, String], name: String).void + } + def initialize(expand: nil, lookup_key: nil, metadata: nil, name: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Inactive features cannot be attached to new products and will not be returned from the features list endpoint. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The feature's name, for your own purpose, not meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), name: String).void + } + def initialize(active: nil, expand: nil, metadata: nil, name: nil); end + end + # Creates a feature + sig { + params(params: T.any(::Stripe::Entitlements::FeatureService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature) + } + def create(params = {}, opts = {}); end + + # Retrieve a list of features + sig { + params(params: T.any(::Stripe::Entitlements::FeatureService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a feature + sig { + params(id: String, params: T.any(::Stripe::Entitlements::FeatureService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature) + } + def retrieve(id, params = {}, opts = {}); end + + # Update a feature's metadata or permanently deactivate it. + sig { + params(id: String, params: T.any(::Stripe::Entitlements::FeatureService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Entitlements::Feature) + } + def update(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/entitlements_service.rbi b/rbi/stripe/services/entitlements_service.rbi new file mode 100644 index 000000000..24228dd5d --- /dev/null +++ b/rbi/stripe/services/entitlements_service.rbi @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class EntitlementsService < StripeService + attr_reader :active_entitlements + attr_reader :features + end +end \ No newline at end of file diff --git a/rbi/stripe/services/ephemeral_key_service.rbi b/rbi/stripe/services/ephemeral_key_service.rbi new file mode 100644 index 000000000..5bf3b2ea4 --- /dev/null +++ b/rbi/stripe/services/ephemeral_key_service.rbi @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class EphemeralKeyService < StripeService + class DeleteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + # The ID of the Customer you'd like to modify using the resulting ephemeral key. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the Issuing Card you'd like to access using the resulting ephemeral key. + sig { returns(String) } + attr_accessor :issuing_card + # A single-use token, created by Stripe.js, used for creating ephemeral keys for Issuing Cards without exchanging sensitive information. + sig { returns(String) } + attr_accessor :nonce + # The ID of the Identity VerificationSession you'd like to access using the resulting ephemeral key + sig { returns(String) } + attr_accessor :verification_session + sig { + params(customer: String, expand: T::Array[String], issuing_card: String, nonce: String, verification_session: String).void + } + def initialize( + customer: nil, + expand: nil, + issuing_card: nil, + nonce: nil, + verification_session: nil + ); end + end + # Creates a short-lived API key for a given resource. + sig { + params(params: T.any(::Stripe::EphemeralKeyService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey) + } + def create(params = {}, opts = {}); end + + # Invalidates a short-lived API key for a given resource. + sig { + params(key: String, params: T.any(::Stripe::EphemeralKeyService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::EphemeralKey) + } + def delete(key, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/event_service.rbi b/rbi/stripe/services/event_service.rbi new file mode 100644 index 000000000..385697172 --- /dev/null +++ b/rbi/stripe/services/event_service.rbi @@ -0,0 +1,81 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class EventService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return events that were created during the given date interval. + sig { returns(T.any(::Stripe::EventService::ListParams::Created, Integer)) } + attr_accessor :created + # Filter events by whether all webhooks were successfully delivered. If false, events which are still pending or have failed all delivery attempts to a webhook endpoint will be returned. + sig { returns(T::Boolean) } + attr_accessor :delivery_success + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A string containing a specific event name, or group of events using * as a wildcard. The list will be filtered to include only events with a matching event property. + sig { returns(String) } + attr_accessor :type + # An array of up to 20 strings containing specific event names. The list will be filtered to include only events with a matching event property. You may pass either `type` or `types`, but not both. + sig { returns(T::Array[String]) } + attr_accessor :types + sig { + params(created: T.any(::Stripe::EventService::ListParams::Created, Integer), delivery_success: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String, types: T::Array[String]).void + } + def initialize( + created: nil, + delivery_success: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + types: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # List events, going back up to 30 days. Each event data is rendered according to Stripe API version at its creation time, specified in [event object](https://docs.stripe.com/api/events/object) api_version attribute (not according to your current Stripe API version or Stripe-Version header). + sig { + params(params: T.any(::Stripe::EventService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an event if it was created in the last 30 days. Supply the unique identifier of the event, which you might have received in a webhook. + sig { + params(id: String, params: T.any(::Stripe::EventService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Event) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/exchange_rate_service.rbi b/rbi/stripe/services/exchange_rate_service.rbi new file mode 100644 index 000000000..3d0c3d3c5 --- /dev/null +++ b/rbi/stripe/services/exchange_rate_service.rbi @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ExchangeRateService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with the exchange rate for currency X your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and total number of supported payout currencies, and the default is the max. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is the currency that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with the exchange rate for currency X, your subsequent call can include `starting_after=X` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of objects that contain the rates at which foreign currencies are converted to one another. Only shows the currencies for which Stripe supports. + sig { + params(params: T.any(::Stripe::ExchangeRateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the exchange rates from the given currency to every supported currency. + sig { + params(rate_id: String, params: T.any(::Stripe::ExchangeRateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ExchangeRate) + } + def retrieve(rate_id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/file_link_service.rbi b/rbi/stripe/services/file_link_service.rbi new file mode 100644 index 000000000..930b0d463 --- /dev/null +++ b/rbi/stripe/services/file_link_service.rbi @@ -0,0 +1,122 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class FileLinkService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return links that were created during the given date interval. + sig { returns(T.any(::Stripe::FileLinkService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Filter links by their expiration status. By default, Stripe returns all links. + sig { returns(T::Boolean) } + attr_accessor :expired + # Only return links for the given file. + sig { returns(String) } + attr_accessor :file + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::FileLinkService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], expired: T::Boolean, file: String, limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + expired: nil, + file: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The link isn't usable after this future timestamp. + sig { returns(Integer) } + attr_accessor :expires_at + # The ID of the file. The file's `purpose` must be one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `finance_report_run`, `financial_account_statement`, `identity_document_downloadable`, `issuing_regulatory_reporting`, `pci_document`, `selfie`, `sigma_scheduled_query`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + sig { returns(String) } + attr_accessor :file + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], expires_at: Integer, file: String, metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(expand: nil, expires_at: nil, file: nil, metadata: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp after which the link will no longer be usable, or `now` to expire the link immediately. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], expires_at: T.nilable(T.any(String, Integer)), metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(expand: nil, expires_at: nil, metadata: nil); end + end + # Creates a new file link object. + sig { + params(params: T.any(::Stripe::FileLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink) + } + def create(params = {}, opts = {}); end + + # Returns a list of file links. + sig { + params(params: T.any(::Stripe::FileLinkService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the file link with the given ID. + sig { + params(link: String, params: T.any(::Stripe::FileLinkService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink) + } + def retrieve(link, params = {}, opts = {}); end + + # Updates an existing file link object. Expired links can no longer be updated. + sig { + params(link: String, params: T.any(::Stripe::FileLinkService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FileLink) + } + def update(link, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/file_service.rbi b/rbi/stripe/services/file_service.rbi new file mode 100644 index 000000000..d4ce04664 --- /dev/null +++ b/rbi/stripe/services/file_service.rbi @@ -0,0 +1,114 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class FileService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return files that were created during the given date interval. + sig { returns(T.any(::Stripe::FileService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Filter queries by the file purpose. If you don't provide a purpose, the queries return unfiltered files. + sig { returns(String) } + attr_accessor :purpose + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::FileService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, purpose: String, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + purpose: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class FileLinkData < Stripe::RequestParams + # Set this to `true` to create a file link for the newly created file. Creating a link is only possible when the file's `purpose` is one of the following: `business_icon`, `business_logo`, `customer_signature`, `dispute_evidence`, `issuing_regulatory_reporting`, `pci_document`, `tax_document_user_upload`, or `terminal_reader_splashscreen`. + sig { returns(T::Boolean) } + attr_accessor :create + # The link isn't available after this future timestamp. + sig { returns(Integer) } + attr_accessor :expires_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(create: T::Boolean, expires_at: Integer, metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(create: nil, expires_at: nil, metadata: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A file to upload. Make sure that the specifications follow RFC 2388, which defines file transfers for the `multipart/form-data` protocol. + sig { returns(T.untyped) } + attr_accessor :file + # Optional parameters that automatically create a [file link](https://stripe.com/docs/api#file_links) for the newly created file. + sig { returns(::Stripe::FileService::CreateParams::FileLinkData) } + attr_accessor :file_link_data + # The [purpose](https://stripe.com/docs/file-upload#uploading-a-file) of the uploaded file. + sig { returns(String) } + attr_accessor :purpose + sig { + params(expand: T::Array[String], file: T.untyped, file_link_data: ::Stripe::FileService::CreateParams::FileLinkData, purpose: String).void + } + def initialize(expand: nil, file: nil, file_link_data: nil, purpose: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # To upload a file to Stripe, you need to send a request of type multipart/form-data. Include the file you want to upload in the request, and the parameters for creating a file. + # + # All of Stripe's officially supported Client libraries support sending multipart/form-data. + sig { + params(params: T.any(::Stripe::FileService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::File) + } + def create(params = {}, opts = {}); end + + # Returns a list of the files that your account has access to. Stripe sorts and returns the files by their creation dates, placing the most recently created files at the top. + sig { + params(params: T.any(::Stripe::FileService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing file object. After you supply a unique file ID, Stripe returns the corresponding file object. Learn how to [access file contents](https://stripe.com/docs/file-upload#download-file-contents). + sig { + params(file: String, params: T.any(::Stripe::FileService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::File) + } + def retrieve(file, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi b/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi new file mode 100644 index 000000000..f8d81a3ad --- /dev/null +++ b/rbi/stripe/services/financial_connections/account_inferred_balance_service.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module FinancialConnections + class AccountInferredBalanceService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Lists the recorded inferred balances for a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountInferredBalanceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(account, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections/account_owner_service.rbi b/rbi/stripe/services/financial_connections/account_owner_service.rbi new file mode 100644 index 000000000..3d89d1eb5 --- /dev/null +++ b/rbi/stripe/services/financial_connections/account_owner_service.rbi @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module FinancialConnections + class AccountOwnerService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The ID of the ownership object to fetch owners from. + sig { returns(String) } + attr_accessor :ownership + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, ownership: String, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + ownership: nil, + starting_after: nil + ); end + end + # Lists all owners for a given Account + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountOwnerService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(account, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections/account_service.rbi b/rbi/stripe/services/financial_connections/account_service.rbi new file mode 100644 index 000000000..e3e35df2b --- /dev/null +++ b/rbi/stripe/services/financial_connections/account_service.rbi @@ -0,0 +1,132 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module FinancialConnections + class AccountService < StripeService + attr_reader :inferred_balances + attr_reader :owners + class ListParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. + sig { returns(String) } + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. + sig { returns(String) } + attr_accessor :customer + sig { params(account: String, customer: String).void } + def initialize(account: nil, customer: nil); end + end + # If present, only return accounts that belong to the specified account holder. `account_holder[customer]` and `account_holder[account]` are mutually exclusive. + sig { returns(::Stripe::FinancialConnections::AccountService::ListParams::AccountHolder) } + attr_accessor :account_holder + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # If present, only return accounts that were collected as part of the given session. + sig { returns(String) } + attr_accessor :session + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(account_holder: ::Stripe::FinancialConnections::AccountService::ListParams::AccountHolder, ending_before: String, expand: T::Array[String], limit: Integer, session: String, starting_after: String).void + } + def initialize( + account_holder: nil, + ending_before: nil, + expand: nil, + limit: nil, + session: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class DisconnectParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RefreshParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The list of account features that you would like to refresh. + sig { returns(T::Array[String]) } + attr_accessor :features + sig { params(expand: T::Array[String], features: T::Array[String]).void } + def initialize(expand: nil, features: nil); end + end + class SubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The list of account features to which you would like to subscribe. + sig { returns(T::Array[String]) } + attr_accessor :features + sig { params(expand: T::Array[String], features: T::Array[String]).void } + def initialize(expand: nil, features: nil); end + end + class UnsubscribeParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The list of account features from which you would like to unsubscribe. + sig { returns(T::Array[String]) } + attr_accessor :features + sig { params(expand: T::Array[String], features: T::Array[String]).void } + def initialize(expand: nil, features: nil); end + end + # Disables your access to a Financial Connections Account. You will no longer be able to access data associated with the account (e.g. balances, transactions). + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::DisconnectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def disconnect(account, params = {}, opts = {}); end + + # Returns a list of Financial Connections Account objects. + sig { + params(params: T.any(::Stripe::FinancialConnections::AccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Refreshes the data associated with a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::RefreshParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def refresh(account, params = {}, opts = {}); end + + # Retrieves the details of an Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def retrieve(account, params = {}, opts = {}); end + + # Subscribes to periodic refreshes of data associated with a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::SubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def subscribe(account, params = {}, opts = {}); end + + # Unsubscribes from periodic refreshes of data associated with a Financial Connections Account. + sig { + params(account: String, params: T.any(::Stripe::FinancialConnections::AccountService::UnsubscribeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Account) + } + def unsubscribe(account, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections/institution_service.rbi b/rbi/stripe/services/financial_connections/institution_service.rbi new file mode 100644 index 000000000..53f69a6b9 --- /dev/null +++ b/rbi/stripe/services/financial_connections/institution_service.rbi @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module FinancialConnections + class InstitutionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Financial Connections Institution objects. + sig { + params(params: T.any(::Stripe::FinancialConnections::InstitutionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a Financial Connections Institution. + sig { + params(institution: String, params: T.any(::Stripe::FinancialConnections::InstitutionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Institution) + } + def retrieve(institution, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections/session_service.rbi b/rbi/stripe/services/financial_connections/session_service.rbi new file mode 100644 index 000000000..9a59f0276 --- /dev/null +++ b/rbi/stripe/services/financial_connections/session_service.rbi @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module FinancialConnections + class SessionService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class AccountHolder < Stripe::RequestParams + # The ID of the Stripe account whose accounts will be retrieved. Should only be present if `type` is `account`. + sig { returns(String) } + attr_accessor :account + # The ID of the Stripe customer whose accounts will be retrieved. Should only be present if `type` is `customer`. + sig { returns(String) } + attr_accessor :customer + # Type of account holder to collect accounts for. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, customer: String, type: String).void } + def initialize(account: nil, customer: nil, type: nil); end + end + class Filters < Stripe::RequestParams + # Restricts the Session to subcategories of accounts that can be linked. Valid subcategories are: `checking`, `savings`, `mortgage`, `line_of_credit`, `credit_card`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # List of countries from which to collect accounts. + sig { returns(T::Array[String]) } + attr_accessor :countries + # Stripe ID of the institution with which the customer should be directed to log in. + sig { returns(String) } + attr_accessor :institution + sig { + params(account_subcategories: T::Array[String], countries: T::Array[String], institution: String).void + } + def initialize(account_subcategories: nil, countries: nil, institution: nil); end + end + class Limits < Stripe::RequestParams + # The number of accounts that can be linked in this Session. + sig { returns(Integer) } + attr_accessor :accounts + sig { params(accounts: Integer).void } + def initialize(accounts: nil); end + end + class ManualEntry < Stripe::RequestParams + # Whether manual entry will be handled by Stripe during the Session. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # The account holder to link accounts for. + sig { returns(::Stripe::FinancialConnections::SessionService::CreateParams::AccountHolder) } + attr_accessor :account_holder + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Filters to restrict the kinds of accounts to collect. + sig { returns(::Stripe::FinancialConnections::SessionService::CreateParams::Filters) } + attr_accessor :filters + # Settings for configuring Session-specific limits. + sig { returns(::Stripe::FinancialConnections::SessionService::CreateParams::Limits) } + attr_accessor :limits + # Settings for configuring manual entry of account details for this Session. + sig { returns(::Stripe::FinancialConnections::SessionService::CreateParams::ManualEntry) } + attr_accessor :manual_entry + # List of data features that you would like to request access to. + # + # Possible values are `balances`, `transactions`, `ownership`, and `payment_method`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(account_holder: ::Stripe::FinancialConnections::SessionService::CreateParams::AccountHolder, expand: T::Array[String], filters: ::Stripe::FinancialConnections::SessionService::CreateParams::Filters, limits: ::Stripe::FinancialConnections::SessionService::CreateParams::Limits, manual_entry: ::Stripe::FinancialConnections::SessionService::CreateParams::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + account_holder: nil, + expand: nil, + filters: nil, + limits: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + # To launch the Financial Connections authorization flow, create a Session. The session's client_secret can be used to launch the flow using Stripe.js. + sig { + params(params: T.any(::Stripe::FinancialConnections::SessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Session) + } + def create(params = {}, opts = {}); end + + # Retrieves the details of a Financial Connections Session + sig { + params(session: String, params: T.any(::Stripe::FinancialConnections::SessionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Session) + } + def retrieve(session, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections/transaction_service.rbi b/rbi/stripe/services/financial_connections/transaction_service.rbi new file mode 100644 index 000000000..2e6baf360 --- /dev/null +++ b/rbi/stripe/services/financial_connections/transaction_service.rbi @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module FinancialConnections + class TransactionService < StripeService + class ListParams < Stripe::RequestParams + class TransactedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class TransactionRefresh < Stripe::RequestParams + # Return results where the transactions were created or updated by a refresh that took place after this refresh (non-inclusive). + sig { returns(String) } + attr_accessor :after + sig { params(after: String).void } + def initialize(after: nil); end + end + # The ID of the Stripe account whose transactions will be retrieved. + sig { returns(String) } + attr_accessor :account + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A filter on the list based on the object `transacted_at` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with the following options: + sig { + returns(T.any(::Stripe::FinancialConnections::TransactionService::ListParams::TransactedAt, Integer)) + } + attr_accessor :transacted_at + # A filter on the list based on the object `transaction_refresh` field. The value can be a dictionary with the following options: + sig { + returns(::Stripe::FinancialConnections::TransactionService::ListParams::TransactionRefresh) + } + attr_accessor :transaction_refresh + sig { + params(account: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, transacted_at: T.any(::Stripe::FinancialConnections::TransactionService::ListParams::TransactedAt, Integer), transaction_refresh: ::Stripe::FinancialConnections::TransactionService::ListParams::TransactionRefresh).void + } + def initialize( + account: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transacted_at: nil, + transaction_refresh: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Financial Connections Transaction objects. + sig { + params(params: T.any(::Stripe::FinancialConnections::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a Financial Connections Transaction + sig { + params(transaction: String, params: T.any(::Stripe::FinancialConnections::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::FinancialConnections::Transaction) + } + def retrieve(transaction, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/financial_connections_service.rbi b/rbi/stripe/services/financial_connections_service.rbi new file mode 100644 index 000000000..1033daf5b --- /dev/null +++ b/rbi/stripe/services/financial_connections_service.rbi @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class FinancialConnectionsService < StripeService + attr_reader :accounts + attr_reader :institutions + attr_reader :sessions + attr_reader :transactions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/forwarding/request_service.rbi b/rbi/stripe/services/forwarding/request_service.rbi new file mode 100644 index 000000000..2ceb371f3 --- /dev/null +++ b/rbi/stripe/services/forwarding/request_service.rbi @@ -0,0 +1,132 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Forwarding + class RequestService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Return results where the `created` field is greater than this value. + sig { returns(Integer) } + attr_accessor :gt + # Return results where the `created` field is greater than or equal to this value. + sig { returns(Integer) } + attr_accessor :gte + # Return results where the `created` field is less than this value. + sig { returns(Integer) } + attr_accessor :lt + # Return results where the `created` field is less than or equal to this value. + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Similar to other List endpoints, filters results based on created timestamp. You can pass gt, gte, lt, and lte timestamp values. + sig { returns(::Stripe::Forwarding::RequestService::ListParams::Created) } + attr_accessor :created + # A pagination cursor to fetch the previous page of the list. The value must be a ForwardingRequest ID. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A pagination cursor to fetch the next page of the list. The value must be a ForwardingRequest ID. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: ::Stripe::Forwarding::RequestService::ListParams::Created, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Request < Stripe::RequestParams + class Header < Stripe::RequestParams + # The header name. + sig { returns(String) } + attr_accessor :name + # The header value. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + # The body payload to send to the destination endpoint. + sig { returns(String) } + attr_accessor :body + # The headers to include in the forwarded request. Can be omitted if no additional headers (excluding Stripe-generated ones such as the Content-Type header) should be included. + sig { + returns(T::Array[::Stripe::Forwarding::RequestService::CreateParams::Request::Header]) + } + attr_accessor :headers + sig { + params(body: String, headers: T::Array[::Stripe::Forwarding::RequestService::CreateParams::Request::Header]).void + } + def initialize(body: nil, headers: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The PaymentMethod to insert into the forwarded request. Forwarding previously consumed PaymentMethods is allowed. + sig { returns(String) } + attr_accessor :payment_method + # The field kinds to be replaced in the forwarded request. + sig { returns(T::Array[String]) } + attr_accessor :replacements + # The request body and headers to be sent to the destination endpoint. + sig { returns(::Stripe::Forwarding::RequestService::CreateParams::Request) } + attr_accessor :request + # The destination URL for the forwarded request. Must be supported by the config. + sig { returns(String) } + attr_accessor :url + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], payment_method: String, replacements: T::Array[String], request: ::Stripe::Forwarding::RequestService::CreateParams::Request, url: String).void + } + def initialize( + expand: nil, + metadata: nil, + payment_method: nil, + replacements: nil, + request: nil, + url: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a ForwardingRequest object. + sig { + params(params: T.any(::Stripe::Forwarding::RequestService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Forwarding::Request) + } + def create(params = {}, opts = {}); end + + # Lists all ForwardingRequest objects. + sig { + params(params: T.any(::Stripe::Forwarding::RequestService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a ForwardingRequest object. + sig { + params(id: String, params: T.any(::Stripe::Forwarding::RequestService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Forwarding::Request) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/forwarding_service.rbi b/rbi/stripe/services/forwarding_service.rbi new file mode 100644 index 000000000..a54c00a8d --- /dev/null +++ b/rbi/stripe/services/forwarding_service.rbi @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ForwardingService < StripeService + attr_reader :requests + end +end \ No newline at end of file diff --git a/rbi/stripe/services/gift_cards/card_service.rbi b/rbi/stripe/services/gift_cards/card_service.rbi new file mode 100644 index 000000000..1ed97d9eb --- /dev/null +++ b/rbi/stripe/services/gift_cards/card_service.rbi @@ -0,0 +1,142 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module GiftCards + class CardService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + sig { returns(String) } + attr_accessor :payment_intent + sig { params(payment_intent: String).void } + def initialize(payment_intent: nil); end + end + # The details for the payment that created this object. + sig { returns(::Stripe::GiftCards::CardService::CreateParams::CreatedBy::Payment) } + attr_accessor :payment + # The type of event that created this object. + sig { returns(String) } + attr_accessor :type + sig { + params(payment: ::Stripe::GiftCards::CardService::CreateParams::CreatedBy::Payment, type: String).void + } + def initialize(payment: nil, type: nil); end + end + # The active state for the new gift card, defaults to false. The active state can be updated after creation. + sig { returns(T::Boolean) } + attr_accessor :active + # Related objects which created this gift card. + sig { returns(::Stripe::GiftCards::CardService::CreateParams::CreatedBy) } + attr_accessor :created_by + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The initial amount to load onto the new gift card, defaults to 0. + sig { returns(Integer) } + attr_accessor :initial_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(active: T::Boolean, created_by: ::Stripe::GiftCards::CardService::CreateParams::CreatedBy, currency: String, expand: T::Array[String], initial_amount: Integer, metadata: T::Hash[String, String]).void + } + def initialize( + active: nil, + created_by: nil, + currency: nil, + expand: nil, + initial_amount: nil, + metadata: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # The new active state for the gift card. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(active: nil, expand: nil, metadata: nil); end + end + class ValidateParams < Stripe::RequestParams + # The gift card code to be validated. + sig { returns(String) } + attr_accessor :code + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The pin associated with the gift card. Not all gift cards have pins. + sig { returns(String) } + attr_accessor :giftcard_pin + sig { params(code: String, expand: T::Array[String], giftcard_pin: String).void } + def initialize(code: nil, expand: nil, giftcard_pin: nil); end + end + # Creates a new gift card object. + sig { + params(params: T.any(::Stripe::GiftCards::CardService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def create(params = {}, opts = {}); end + + # List gift cards for an account + sig { + params(params: T.any(::Stripe::GiftCards::CardService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieve a gift card by id + sig { + params(id: String, params: T.any(::Stripe::GiftCards::CardService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def retrieve(id, params = {}, opts = {}); end + + # Update a gift card + sig { + params(id: String, params: T.any(::Stripe::GiftCards::CardService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def update(id, params = {}, opts = {}); end + + # Validates a gift card code, returning the matching gift card object if it exists. + sig { + params(params: T.any(::Stripe::GiftCards::CardService::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Card) + } + def validate(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/gift_cards/transaction_service.rbi b/rbi/stripe/services/gift_cards/transaction_service.rbi new file mode 100644 index 000000000..be053180e --- /dev/null +++ b/rbi/stripe/services/gift_cards/transaction_service.rbi @@ -0,0 +1,174 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module GiftCards + class TransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The gift card to list transactions for. + sig { returns(String) } + attr_accessor :gift_card + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(ending_before: String, expand: T::Array[String], gift_card: String, limit: Integer, starting_after: String, transfer_group: String).void + } + def initialize( + ending_before: nil, + expand: nil, + gift_card: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CreatedBy < Stripe::RequestParams + class Payment < Stripe::RequestParams + # The PaymentIntent used to collect payment for this object. + sig { returns(String) } + attr_accessor :payment_intent + sig { params(payment_intent: String).void } + def initialize(payment_intent: nil); end + end + # The details for the payment that created this object. + sig { returns(::Stripe::GiftCards::TransactionService::CreateParams::CreatedBy::Payment) } + attr_accessor :payment + # The type of event that created this object. + sig { returns(String) } + attr_accessor :type + sig { + params(payment: ::Stripe::GiftCards::TransactionService::CreateParams::CreatedBy::Payment, type: String).void + } + def initialize(payment: nil, type: nil); end + end + # The amount of the transaction. A negative amount deducts funds, and a positive amount adds funds. + sig { returns(Integer) } + attr_accessor :amount + # Whether this is a confirmed transaction. A confirmed transaction immediately deducts from/adds to the `amount_available` on the gift card. Otherwise, it creates a held transaction that increments the `amount_held` on the gift card. + sig { returns(T::Boolean) } + attr_accessor :confirm + # Related objects which created this transaction. + sig { returns(::Stripe::GiftCards::TransactionService::CreateParams::CreatedBy) } + attr_accessor :created_by + # The currency of the transaction. This must match the currency of the gift card. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The gift card to create a new transaction on. + sig { returns(String) } + attr_accessor :gift_card + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, confirm: T::Boolean, created_by: ::Stripe::GiftCards::TransactionService::CreateParams::CreatedBy, currency: String, description: String, expand: T::Array[String], gift_card: String, metadata: T::Hash[String, String], transfer_group: String).void + } + def initialize( + amount: nil, + confirm: nil, + created_by: nil, + currency: nil, + description: nil, + expand: nil, + gift_card: nil, + metadata: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ConfirmParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancel a gift card transaction + sig { + params(id: String, params: T.any(::Stripe::GiftCards::TransactionService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def cancel(id, params = {}, opts = {}); end + + # Confirm a gift card transaction + sig { + params(id: String, params: T.any(::Stripe::GiftCards::TransactionService::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def confirm(id, params = {}, opts = {}); end + + # Create a gift card transaction + sig { + params(params: T.any(::Stripe::GiftCards::TransactionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def create(params = {}, opts = {}); end + + # List gift card transactions for a gift card + sig { + params(params: T.any(::Stripe::GiftCards::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the gift card transaction. + sig { + params(id: String, params: T.any(::Stripe::GiftCards::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def retrieve(id, params = {}, opts = {}); end + + # Update a gift card transaction + sig { + params(id: String, params: T.any(::Stripe::GiftCards::TransactionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::GiftCards::Transaction) + } + def update(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/gift_cards_service.rbi b/rbi/stripe/services/gift_cards_service.rbi new file mode 100644 index 000000000..8d674e6cc --- /dev/null +++ b/rbi/stripe/services/gift_cards_service.rbi @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class GiftCardsService < StripeService + attr_reader :cards + attr_reader :transactions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/identity/verification_report_service.rbi b/rbi/stripe/services/identity/verification_report_service.rbi new file mode 100644 index 000000000..26b6439c5 --- /dev/null +++ b/rbi/stripe/services/identity/verification_report_service.rbi @@ -0,0 +1,85 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Identity + class VerificationReportService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Only return VerificationReports that were created during the given date interval. + sig { + returns(T.any(::Stripe::Identity::VerificationReportService::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return VerificationReports of this type + sig { returns(String) } + attr_accessor :type + # Only return VerificationReports created by this VerificationSession ID. It is allowed to provide a VerificationIntent ID. + sig { returns(String) } + attr_accessor :verification_session + sig { + params(client_reference_id: String, created: T.any(::Stripe::Identity::VerificationReportService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String, verification_session: String).void + } + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil, + verification_session: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # List all verification reports. + sig { + params(params: T.any(::Stripe::Identity::VerificationReportService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an existing VerificationReport + sig { + params(report: String, params: T.any(::Stripe::Identity::VerificationReportService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationReport) + } + def retrieve(report, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/identity/verification_session_service.rbi b/rbi/stripe/services/identity/verification_session_service.rbi new file mode 100644 index 000000000..8f5f73eac --- /dev/null +++ b/rbi/stripe/services/identity/verification_session_service.rbi @@ -0,0 +1,317 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Identity + class VerificationSessionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Only return VerificationSessions that were created during the given date interval. + sig { + returns(T.any(::Stripe::Identity::VerificationSessionService::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Attribute for param field related_customer + sig { returns(String) } + attr_accessor :related_customer + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return VerificationSessions with this status. [Learn more about the lifecycle of sessions](https://stripe.com/docs/identity/how-sessions-work). + sig { returns(String) } + attr_accessor :status + sig { + params(client_reference_id: String, created: T.any(::Stripe::Identity::VerificationSessionService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, related_customer: String, starting_after: String, status: String).void + } + def initialize( + client_reference_id: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + related_customer: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + sig { returns(T::Array[String]) } + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + sig { returns(T::Boolean) } + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + sig { returns(T::Boolean) } + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + sig { returns(T::Boolean) } + attr_accessor :require_matching_selfie + sig { + params(allowed_types: T::Array[String], require_id_number: T::Boolean, require_live_capture: T::Boolean, require_matching_selfie: T::Boolean).void + } + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ); end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + sig { + returns(T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options::Document)) + } + attr_accessor :document + sig { + params(document: T.nilable(::Stripe::Identity::VerificationSessionService::CreateParams::Options::Document)).void + } + def initialize(document: nil); end + end + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + sig { returns(String) } + attr_accessor :email + # Phone number of user being verified + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, phone: String).void } + def initialize(email: nil, phone: nil); end + end + # A string to reference this user. This can be a customer ID, a session ID, or similar, and can be used to reconcile this verification with your internal systems. + sig { returns(String) } + attr_accessor :client_reference_id + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A set of options for the session’s verification checks. + sig { returns(::Stripe::Identity::VerificationSessionService::CreateParams::Options) } + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + sig { + returns(::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails) + } + attr_accessor :provided_details + # Token referencing a Customer resource. + sig { returns(String) } + attr_accessor :related_customer + # The URL that the user will be redirected to upon completing the verification flow. + sig { returns(String) } + attr_accessor :return_url + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. You must provide a `type` if not passing `verification_flow`. + sig { returns(String) } + attr_accessor :type + # The ID of a verification flow from the Dashboard. See https://docs.stripe.com/identity/verification-flows. + sig { returns(String) } + attr_accessor :verification_flow + sig { + params(client_reference_id: String, expand: T::Array[String], metadata: T::Hash[String, String], options: ::Stripe::Identity::VerificationSessionService::CreateParams::Options, provided_details: ::Stripe::Identity::VerificationSessionService::CreateParams::ProvidedDetails, related_customer: String, return_url: String, type: String, verification_flow: String).void + } + def initialize( + client_reference_id: nil, + expand: nil, + metadata: nil, + options: nil, + provided_details: nil, + related_customer: nil, + return_url: nil, + type: nil, + verification_flow: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Options < Stripe::RequestParams + class Document < Stripe::RequestParams + # Array of strings of allowed identity document types. If the provided identity document isn’t one of the allowed types, the verification check will fail with a document_type_not_allowed error code. + sig { returns(T::Array[String]) } + attr_accessor :allowed_types + # Collect an ID number and perform an [ID number check](https://stripe.com/docs/identity/verification-checks?type=id-number) with the document’s extracted name and date of birth. + sig { returns(T::Boolean) } + attr_accessor :require_id_number + # Disable image uploads, identity document images have to be captured using the device’s camera. + sig { returns(T::Boolean) } + attr_accessor :require_live_capture + # Capture a face image and perform a [selfie check](https://stripe.com/docs/identity/verification-checks?type=selfie) comparing a photo ID and a picture of your user’s face. [Learn more](https://stripe.com/docs/identity/selfie). + sig { returns(T::Boolean) } + attr_accessor :require_matching_selfie + sig { + params(allowed_types: T::Array[String], require_id_number: T::Boolean, require_live_capture: T::Boolean, require_matching_selfie: T::Boolean).void + } + def initialize( + allowed_types: nil, + require_id_number: nil, + require_live_capture: nil, + require_matching_selfie: nil + ); end + end + # Options that apply to the [document check](https://stripe.com/docs/identity/verification-checks?type=document). + sig { + returns(T.nilable(::Stripe::Identity::VerificationSessionService::UpdateParams::Options::Document)) + } + attr_accessor :document + sig { + params(document: T.nilable(::Stripe::Identity::VerificationSessionService::UpdateParams::Options::Document)).void + } + def initialize(document: nil); end + end + class ProvidedDetails < Stripe::RequestParams + # Email of user being verified + sig { returns(String) } + attr_accessor :email + # Phone number of user being verified + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, phone: String).void } + def initialize(email: nil, phone: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A set of options for the session’s verification checks. + sig { returns(::Stripe::Identity::VerificationSessionService::UpdateParams::Options) } + attr_accessor :options + # Details provided about the user being verified. These details may be shown to the user. + sig { + returns(::Stripe::Identity::VerificationSessionService::UpdateParams::ProvidedDetails) + } + attr_accessor :provided_details + # The type of [verification check](https://stripe.com/docs/identity/verification-checks) to be performed. + sig { returns(String) } + attr_accessor :type + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], options: ::Stripe::Identity::VerificationSessionService::UpdateParams::Options, provided_details: ::Stripe::Identity::VerificationSessionService::UpdateParams::ProvidedDetails, type: String).void + } + def initialize( + expand: nil, + metadata: nil, + options: nil, + provided_details: nil, + type: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RedactParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # A VerificationSession object can be canceled when it is in requires_input [status](https://stripe.com/docs/identity/how-sessions-work). + # + # Once canceled, future submission attempts are disabled. This cannot be undone. [Learn more](https://stripe.com/docs/identity/verification-sessions#cancel). + sig { + params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def cancel(session, params = {}, opts = {}); end + + # Creates a VerificationSession object. + # + # After the VerificationSession is created, display a verification modal using the session client_secret or send your users to the session's url. + # + # If your API key is in test mode, verification checks won't actually process, though everything else will occur as if in live mode. + # + # Related guide: [Verify your users' identity documents](https://stripe.com/docs/identity/verify-identity-documents) + sig { + params(params: T.any(::Stripe::Identity::VerificationSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def create(params = {}, opts = {}); end + + # Returns a list of VerificationSessions + sig { + params(params: T.any(::Stripe::Identity::VerificationSessionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Redact a VerificationSession to remove all collected information from Stripe. This will redact + # the VerificationSession and all objects related to it, including VerificationReports, Events, + # request logs, etc. + # + # A VerificationSession object can be redacted when it is in requires_input or verified + # [status](https://stripe.com/docs/identity/how-sessions-work). Redacting a VerificationSession in requires_action + # state will automatically cancel it. + # + # The redaction process may take up to four days. When the redaction process is in progress, the + # VerificationSession's redaction.status field will be set to processing; when the process is + # finished, it will change to redacted and an identity.verification_session.redacted event + # will be emitted. + # + # Redaction is irreversible. Redacted objects are still accessible in the Stripe API, but all the + # fields that contain personal data will be replaced by the string [redacted] or a similar + # placeholder. The metadata field will also be erased. Redacted objects cannot be updated or + # used for any purpose. + # + # [Learn more](https://stripe.com/docs/identity/verification-sessions#redact). + sig { + params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::RedactParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def redact(session, params = {}, opts = {}); end + + # Retrieves the details of a VerificationSession that was previously created. + # + # When the session status is requires_input, you can use this method to retrieve a valid + # client_secret or url to allow re-submission. + sig { + params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def retrieve(session, params = {}, opts = {}); end + + # Updates a VerificationSession object. + # + # When the session status is requires_input, you can use this method to update the + # verification check and options. + sig { + params(session: String, params: T.any(::Stripe::Identity::VerificationSessionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Identity::VerificationSession) + } + def update(session, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/identity_service.rbi b/rbi/stripe/services/identity_service.rbi new file mode 100644 index 000000000..d88f29114 --- /dev/null +++ b/rbi/stripe/services/identity_service.rbi @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class IdentityService < StripeService + attr_reader :verification_reports + attr_reader :verification_sessions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/invoice_item_service.rbi b/rbi/stripe/services/invoice_item_service.rbi new file mode 100644 index 000000000..c1ea8a023 --- /dev/null +++ b/rbi/stripe/services/invoice_item_service.rbi @@ -0,0 +1,424 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class InvoiceItemService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceItemService::UpdateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceItemService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceItemService::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceItemService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the invoice item or invoice line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceItemService::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceItemService::UpdateParams::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceItemService::UpdateParams::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceItemService::UpdateParams::Discount]), expand: T::Array[String], margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceItemService::UpdateParams::Period, price: String, price_data: ::Stripe::InvoiceItemService::UpdateParams::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return invoice items that were created during the given date interval. + sig { returns(T.any(::Stripe::InvoiceItemService::ListParams::Created, Integer)) } + attr_accessor :created + # The identifier of the customer whose invoice items to return. If none is provided, all invoice items will be returned. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return invoice items belonging to this invoice. If none is provided, all invoice items will be returned. If specifying an invoice, no customer identifier is needed. + sig { returns(String) } + attr_accessor :invoice + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Set to `true` to only show pending invoice items, which are not yet attached to any invoices. Set to `false` to only show invoice items already attached to invoices. If unspecified, no filter is applied. + sig { returns(T::Boolean) } + attr_accessor :pending + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::InvoiceItemService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], invoice: String, limit: Integer, pending: T::Boolean, starting_after: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + invoice: nil, + limit: nil, + pending: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceItemService::CreateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceItemService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceItemService::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceItemService::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. Passing in a negative `amount` will reduce the `amount_due` on the invoice. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the customer who will be billed when this invoice item is billed. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this invoice item. Defaults to false for prorations or negative invoice items, and true for all other invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons and promotion codes to redeem into discounts for the invoice item or invoice line item. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceItemService::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of an existing invoice to add this invoice item to. When left blank, the invoice item will be added to the next upcoming scheduled invoice. This is useful when adding invoice items in response to an invoice.created webhook. You can only add invoice items to draft invoices and there is a maximum of 250 items per invoice. + sig { returns(String) } + attr_accessor :invoice + # The ids of the margins to apply to the invoice item. When set, the `default_margins` on the invoice do not apply to this invoice item. + sig { returns(T::Array[String]) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceItemService::CreateParams::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceItemService::CreateParams::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # The ID of a subscription to add this invoice item to. When left blank, the invoice item is added to the next upcoming scheduled invoice. When set, scheduled invoices for subscriptions other than the specified subscription will ignore the invoice item. Use this when you want to express that an invoice item has been accrued within the context of a particular subscription. + sig { returns(String) } + attr_accessor :subscription + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates which apply to the invoice item. When set, the `default_tax_rates` on the invoice do not apply to this invoice item. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This `unit_amount` will be multiplied by the quantity to get the full amount. Passing in a negative `unit_amount` will reduce the `amount_due` on the invoice. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, customer: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceItemService::CreateParams::Discount]), expand: T::Array[String], invoice: String, margins: T::Array[String], metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceItemService::CreateParams::Period, price: String, price_data: ::Stripe::InvoiceItemService::CreateParams::PriceData, quantity: Integer, subscription: String, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T::Array[String], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + invoice: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + subscription: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Creates an item to be added to a draft invoice (up to 250 items per invoice). If no invoice is specified, the item will be on the next invoice created for the customer specified. + sig { + params(params: T.any(::Stripe::InvoiceItemService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def create(params = {}, opts = {}); end + + # Deletes an invoice item, removing it from an invoice. Deleting invoice items is only possible when they're not attached to invoices, or if it's attached to a draft invoice. + sig { + params(invoiceitem: String, params: T.any(::Stripe::InvoiceItemService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def delete(invoiceitem, params = {}, opts = {}); end + + # Returns a list of your invoice items. Invoice items are returned sorted by creation date, with the most recently created invoice items appearing first. + sig { + params(params: T.any(::Stripe::InvoiceItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the invoice item with the given ID. + sig { + params(invoiceitem: String, params: T.any(::Stripe::InvoiceItemService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def retrieve(invoiceitem, params = {}, opts = {}); end + + # Updates the amount or description of an invoice item on an upcoming invoice. Updating an invoice item is only possible before the invoice it's attached to is closed. + sig { + params(invoiceitem: String, params: T.any(::Stripe::InvoiceItemService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceItem) + } + def update(invoiceitem, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/invoice_line_item_service.rbi b/rbi/stripe/services/invoice_line_item_service.rbi new file mode 100644 index 000000000..6867d84d5 --- /dev/null +++ b/rbi/stripe/services/invoice_line_item_service.rbi @@ -0,0 +1,270 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class InvoiceLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class UpdateParams < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceLineItemService::UpdateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceLineItemService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceLineItemService::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceLineItemService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { returns(::Stripe::InvoiceLineItemService::UpdateParams::PriceData::ProductData) } + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::InvoiceLineItemService::UpdateParams::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void + } + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + sig { returns(::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount::TaxRateData) } + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { + params(amount: Integer, tax_rate_data: ::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount::TaxRateData, taxable_amount: Integer).void + } + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceLineItemService::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceLineItemService::UpdateParams::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceLineItemService::UpdateParams::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceLineItemService::UpdateParams::Discount]), expand: T::Array[String], margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceLineItemService::UpdateParams::Period, price: String, price_data: ::Stripe::InvoiceLineItemService::UpdateParams::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::InvoiceLineItemService::UpdateParams::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + expand: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ); end + end + # When retrieving an invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(invoice, params = {}, opts = {}); end + + # Updates an invoice's line item. Some fields, such as tax_amounts, only live on the invoice line item, + # so they can only be updated through this endpoint. Other fields, such as amount, live on both the invoice + # item and the invoice line item, so updates on this endpoint will propagate to the invoice item as well. + # Updating an invoice's line item is only possible before the invoice is finalized. + sig { + params(invoice: String, line_item_id: String, params: T.any(::Stripe::InvoiceLineItemService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceLineItem) + } + def update(invoice, line_item_id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/invoice_payment_service.rbi b/rbi/stripe/services/invoice_payment_service.rbi new file mode 100644 index 000000000..201a3446f --- /dev/null +++ b/rbi/stripe/services/invoice_payment_service.rbi @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class InvoicePaymentService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # When retrieving an invoice, there is an includable payments property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of payments. + sig { + params(invoice: String, params: T.any(::Stripe::InvoicePaymentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(invoice, params = {}, opts = {}); end + + # Retrieves the invoice payment with the given ID. + sig { + params(invoice: String, invoice_payment: String, params: T.any(::Stripe::InvoicePaymentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoicePayment) + } + def retrieve(invoice, invoice_payment, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/invoice_rendering_template_service.rbi b/rbi/stripe/services/invoice_rendering_template_service.rbi new file mode 100644 index 000000000..9069f6589 --- /dev/null +++ b/rbi/stripe/services/invoice_rendering_template_service.rbi @@ -0,0 +1,82 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class InvoiceRenderingTemplateService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Attribute for param field status + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field version + sig { returns(Integer) } + attr_accessor :version + sig { params(expand: T::Array[String], version: Integer).void } + def initialize(expand: nil, version: nil); end + end + class ArchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UnarchiveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Updates the status of an invoice rendering template to ‘archived' so no new Stripe objects (customers, invoices, etc.) can reference it. The template can also no longer be updated. However, if the template is already set on a Stripe object, it will continue to be applied on invoices generated by it. + sig { + params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateService::ArchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def archive(template, params = {}, opts = {}); end + + # List all templates, ordered by creation date, with the most recently created template appearing first. + sig { + params(params: T.any(::Stripe::InvoiceRenderingTemplateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an invoice rendering template with the given ID. It by default returns the latest version of the template. Optionally, specify a version to see previous versions. + sig { + params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def retrieve(template, params = {}, opts = {}); end + + # Unarchive an invoice rendering template so it can be used on new Stripe objects again. + sig { + params(template: String, params: T.any(::Stripe::InvoiceRenderingTemplateService::UnarchiveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::InvoiceRenderingTemplate) + } + def unarchive(template, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/invoice_service.rbi b/rbi/stripe/services/invoice_service.rbi new file mode 100644 index 000000000..d87e68405 --- /dev/null +++ b/rbi/stripe/services/invoice_service.rbi @@ -0,0 +1,6040 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class InvoiceService < StripeService + attr_reader :payments + attr_reader :line_items + attr_reader :upcoming_lines + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + sig { returns(Integer) } + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Date on which a payment plan’s payment is due. + sig { returns(Integer) } + attr_accessor :due_date + sig { + params(amount: Integer, days_until_due: Integer, description: String, due_date: Integer).void + } + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::InvoiceService::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceService::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::InvoiceService::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceService::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this invoice. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(installments: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::Installments, request_three_d_secure: String).void + } + def initialize(installments: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + sig { returns(T.nilable(String)) } + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + sig { + returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + sig { + params(default_mandate: T.nilable(String), payment_method_options: ::Stripe::InvoiceService::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String])).void + } + def initialize( + default_mandate: nil, + payment_method_options: nil, + payment_method_types: nil + ); end + end + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + sig { returns(String) } + attr_accessor :page_size + sig { params(page_size: String).void } + def initialize(page_size: nil); end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # Invoice pdf rendering options + sig { returns(::Stripe::InvoiceService::UpdateParams::Rendering::Pdf) } + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + sig { returns(String) } + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + sig { returns(T.nilable(Integer)) } + attr_accessor :template_version + sig { + params(amount_tax_display: T.nilable(String), pdf: ::Stripe::InvoiceService::UpdateParams::Rendering::Pdf, template: String, template_version: T.nilable(Integer)).void + } + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::InvoiceService::UpdateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address + sig { returns(::Stripe::InvoiceService::UpdateParams::ShippingDetails::Address) } + attr_accessor :address + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension) + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::InvoiceService::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + sig { returns(Integer) } + attr_accessor :amount + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::UpdateParams::AmountsDue])) } + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. + sig { returns(T::Boolean) } + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + sig { returns(::Stripe::InvoiceService::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. To turn off automatic finalization, set `auto_advance` to false. + sig { returns(Integer) } + attr_accessor :automatically_finalizes_at + # Either `charge_automatically` or `send_invoice`. This field can be updated only on `draft` invoices. + sig { returns(String) } + attr_accessor :collection_method + # A list of up to 4 custom fields to be displayed on the invoice. If a value for `custom_fields` is specified, the list specified will replace the existing custom field list on this invoice. Pass an empty string to remove previously-defined fields. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::UpdateParams::CustomField])) } + attr_accessor :custom_fields + # The number of days from which the invoice is created until it is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + sig { returns(Integer) } + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + sig { returns(T.nilable(String)) } + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(String) } + attr_accessor :description + # The discounts that will apply to the invoice. Pass an empty string to remove previously-defined discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::UpdateParams::Discount])) } + attr_accessor :discounts + # The date on which payment for this invoice is due. Only valid for invoices where `collection_method=send_invoice`. This field can only be updated on `draft` invoices. + sig { returns(Integer) } + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + sig { returns(T.nilable(Integer)) } + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Footer to be displayed on the invoice. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::InvoiceService::UpdateParams::Issuer) } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + sig { returns(T.nilable(String)) } + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + sig { returns(::Stripe::InvoiceService::UpdateParams::PaymentSettings) } + attr_accessor :payment_settings + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(::Stripe::InvoiceService::UpdateParams::Rendering) } + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost)) } + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingDetails)) } + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + sig { returns(String) } + attr_accessor :statement_descriptor + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. This will be unset if you POST an empty value. + sig { returns(T.nilable(::Stripe::InvoiceService::UpdateParams::TransferData)) } + attr_accessor :transfer_data + sig { + params(account_tax_ids: T.nilable(T::Array[String]), amounts_due: T.nilable(T::Array[::Stripe::InvoiceService::UpdateParams::AmountsDue]), application_fee_amount: Integer, auto_advance: T::Boolean, automatic_tax: ::Stripe::InvoiceService::UpdateParams::AutomaticTax, automatically_finalizes_at: Integer, collection_method: String, custom_fields: T.nilable(T::Array[::Stripe::InvoiceService::UpdateParams::CustomField]), days_until_due: Integer, default_margins: T.nilable(T::Array[String]), default_payment_method: String, default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: String, discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpdateParams::Discount]), due_date: Integer, effective_at: T.nilable(Integer), expand: T::Array[String], footer: String, issuer: ::Stripe::InvoiceService::UpdateParams::Issuer, metadata: T.nilable(T::Hash[String, String]), number: T.nilable(String), on_behalf_of: T.nilable(String), payment_settings: ::Stripe::InvoiceService::UpdateParams::PaymentSettings, rendering: ::Stripe::InvoiceService::UpdateParams::Rendering, shipping_cost: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingCost), shipping_details: T.nilable(::Stripe::InvoiceService::UpdateParams::ShippingDetails), statement_descriptor: String, transfer_data: T.nilable(::Stripe::InvoiceService::UpdateParams::TransferData)).void + } + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + custom_fields: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + transfer_data: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class DueDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # The collection method of the invoice to retrieve. Either `charge_automatically` or `send_invoice`. + sig { returns(String) } + attr_accessor :collection_method + # Only return invoices that were created during the given date interval. + sig { returns(T.any(::Stripe::InvoiceService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return invoices for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # Attribute for param field due_date + sig { returns(T.any(::Stripe::InvoiceService::ListParams::DueDate, Integer)) } + attr_accessor :due_date + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the invoice, one of `draft`, `open`, `paid`, `uncollectible`, or `void`. [Learn more](https://stripe.com/docs/billing/invoices/workflow#workflow-overview) + sig { returns(String) } + attr_accessor :status + # Only return invoices for the subscription specified by this subscription ID. + sig { returns(String) } + attr_accessor :subscription + sig { + params(collection_method: String, created: T.any(::Stripe::InvoiceService::ListParams::Created, Integer), customer: String, due_date: T.any(::Stripe::InvoiceService::ListParams::DueDate, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String, subscription: String).void + } + def initialize( + collection_method: nil, + created: nil, + customer: nil, + due_date: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + subscription: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AmountsDue < Stripe::RequestParams + # The amount in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :amount + # Number of days from when invoice is finalized until the payment is due. + sig { returns(Integer) } + attr_accessor :days_until_due + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Date on which a payment plan’s payment is due. + sig { returns(Integer) } + attr_accessor :due_date + sig { + params(amount: Integer, days_until_due: Integer, description: String, due_date: Integer).void + } + def initialize(amount: nil, days_until_due: nil, description: nil, due_date: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::InvoiceService::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceService::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::InvoiceService::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceService::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class FromInvoice < Stripe::RequestParams + # The relation between the new invoice and the original invoice. Currently, only 'revision' is permitted + sig { returns(String) } + attr_accessor :action + # The `id` of the invoice that will be cloned. + sig { returns(String) } + attr_accessor :invoice + sig { params(action: String, invoice: String).void } + def initialize(action: nil, invoice: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this invoice. + # Setting to false will prevent any selected plan from applying to a payment. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this invoice. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + # Installment configuration for payments attempted on this invoice (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(installments: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::Installments, request_three_d_secure: String).void + } + def initialize(installments: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If paying by `id_bank_transfer`, this sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If paying by `konbini`, this sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If paying by `us_bank_account`, this sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the invoice's default_payment_method or default_source, if set. + sig { returns(T.nilable(String)) } + attr_accessor :default_mandate + # Payment-method-specific configuration to provide to the invoice’s PaymentIntent. + sig { + returns(::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + sig { + params(default_mandate: T.nilable(String), payment_method_options: ::Stripe::InvoiceService::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String])).void + } + def initialize( + default_mandate: nil, + payment_method_options: nil, + payment_method_types: nil + ); end + end + class Rendering < Stripe::RequestParams + class Pdf < Stripe::RequestParams + # Page size for invoice PDF. Can be set to `a4`, `letter`, or `auto`. + # If set to `auto`, invoice PDF page size defaults to `a4` for customers with + # Japanese locale and `letter` for customers with other locales. + sig { returns(String) } + attr_accessor :page_size + sig { params(page_size: String).void } + def initialize(page_size: nil); end + end + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + # Invoice pdf rendering options + sig { returns(::Stripe::InvoiceService::CreateParams::Rendering::Pdf) } + attr_accessor :pdf + # ID of the invoice rendering template to use for this invoice. + sig { returns(String) } + attr_accessor :template + # The specific version of invoice rendering template to use for this invoice. + sig { returns(T.nilable(Integer)) } + attr_accessor :template_version + sig { + params(amount_tax_display: T.nilable(String), pdf: ::Stripe::InvoiceService::CreateParams::Rendering::Pdf, template: String, template_version: T.nilable(Integer)).void + } + def initialize(amount_tax_display: nil, pdf: nil, template: nil, template_version: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::InvoiceService::CreateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address + sig { returns(::Stripe::InvoiceService::CreateParams::ShippingDetails::Address) } + attr_accessor :address + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension) + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::InvoiceService::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. + sig { returns(Integer) } + attr_accessor :amount + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The account tax IDs associated with the invoice. Only editable when the invoice is a draft. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # List of expected payments and corresponding due dates. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::CreateParams::AmountsDue])) } + attr_accessor :amounts_due + # A fee in cents (or local equivalent) that will be applied to the invoice and transferred to the application owner's Stripe account. The request must be made with an OAuth key or the Stripe-Account header in order to take an application fee. For more information, see the application fees [documentation](https://stripe.com/docs/billing/invoices/connect#collecting-fees). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + sig { returns(T::Boolean) } + attr_accessor :auto_advance + # Settings for automatic tax lookup for this invoice. + sig { returns(::Stripe::InvoiceService::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # The time when this invoice should be scheduled to finalize. The invoice will be finalized at this time if it is still in draft state. + sig { returns(Integer) } + attr_accessor :automatically_finalizes_at + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this invoice using the default source attached to the customer. When sending an invoice, Stripe will email this invoice to the customer with payment instructions. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The currency to create this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # A list of up to 4 custom fields to be displayed on the invoice. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::CreateParams::CustomField])) } + attr_accessor :custom_fields + # The ID of the customer who will be billed. + sig { returns(String) } + attr_accessor :customer + # The number of days from when the invoice is created until it is due. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The ids of the margins to apply to the invoice. Can be overridden by line item `margins`. + sig { returns(T::Array[String]) } + attr_accessor :default_margins + # ID of the default payment method for the invoice. It must belong to the customer associated with the invoice. If not set, defaults to the subscription's default payment method, if any, or to the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the invoice. It must belong to the customer associated with the invoice and be in a chargeable state. If not set, defaults to the subscription's default source, if any, or to the customer's default source. + sig { returns(String) } + attr_accessor :default_source + # The tax rates that will apply to any line item that does not have `tax_rates` set. + sig { returns(T::Array[String]) } + attr_accessor :default_tax_rates + # An arbitrary string attached to the object. Often useful for displaying to users. Referenced as 'memo' in the Dashboard. + sig { returns(String) } + attr_accessor :description + # The coupons and promotion codes to redeem into discounts for the invoice. If not specified, inherits the discount from the invoice's customer. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::CreateParams::Discount])) } + attr_accessor :discounts + # The date on which payment for this invoice is due. Valid only for invoices where `collection_method=send_invoice`. + sig { returns(Integer) } + attr_accessor :due_date + # The date when this invoice is in effect. Same as `finalized_at` unless overwritten. When defined, this value replaces the system-generated 'Date of issue' printed on the invoice PDF and receipt. + sig { returns(Integer) } + attr_accessor :effective_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Footer to be displayed on the invoice. + sig { returns(String) } + attr_accessor :footer + # Revise an existing invoice. The new invoice will be created in `status=draft`. See the [revision documentation](https://stripe.com/docs/invoicing/invoice-revisions) for more details. + sig { returns(::Stripe::InvoiceService::CreateParams::FromInvoice) } + attr_accessor :from_invoice + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::InvoiceService::CreateParams::Issuer) } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Set the number for this invoice. If no number is present then a number will be assigned automatically when the invoice is finalized. In many markets, regulations require invoices to be unique, sequential and / or gapless. You are responsible for ensuring this is true across all your different invoicing systems in the event that you edit the invoice number using our API. If you use only Stripe for your invoices and do not change invoice numbers, Stripe handles this aspect of compliance for you automatically. + sig { returns(String) } + attr_accessor :number + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(String) } + attr_accessor :on_behalf_of + # Configuration settings for the PaymentIntent that is generated when the invoice is finalized. + sig { returns(::Stripe::InvoiceService::CreateParams::PaymentSettings) } + attr_accessor :payment_settings + # How to handle pending invoice items on invoice creation. Defaults to `exclude` if the parameter is omitted. + sig { returns(String) } + attr_accessor :pending_invoice_items_behavior + # The rendering-related settings that control how the invoice is displayed on customer-facing surfaces such as PDF and Hosted Invoice Page. + sig { returns(::Stripe::InvoiceService::CreateParams::Rendering) } + attr_accessor :rendering + # Settings for the cost of shipping for this invoice. + sig { returns(::Stripe::InvoiceService::CreateParams::ShippingCost) } + attr_accessor :shipping_cost + # Shipping details for the invoice. The Invoice PDF will use the `shipping_details` value if it is set, otherwise the PDF will render the shipping address from the customer. + sig { returns(::Stripe::InvoiceService::CreateParams::ShippingDetails) } + attr_accessor :shipping_details + # Extra information about a charge for the customer's credit card statement. It must contain at least one letter. If not specified and this invoice is part of a subscription, the default `statement_descriptor` will be set to the first subscription item's product's `statement_descriptor`. + sig { returns(String) } + attr_accessor :statement_descriptor + # The ID of the subscription to invoice, if any. If set, the created invoice will only include pending invoice items for that subscription. The subscription's billing cycle and regular subscription events won't be affected. + sig { returns(String) } + attr_accessor :subscription + # If specified, the funds from the invoice will be transferred to the destination and the ID of the resulting transfer will be found on the invoice's charge. + sig { returns(::Stripe::InvoiceService::CreateParams::TransferData) } + attr_accessor :transfer_data + sig { + params(account_tax_ids: T.nilable(T::Array[String]), amounts_due: T.nilable(T::Array[::Stripe::InvoiceService::CreateParams::AmountsDue]), application_fee_amount: Integer, auto_advance: T::Boolean, automatic_tax: ::Stripe::InvoiceService::CreateParams::AutomaticTax, automatically_finalizes_at: Integer, collection_method: String, currency: String, custom_fields: T.nilable(T::Array[::Stripe::InvoiceService::CreateParams::CustomField]), customer: String, days_until_due: Integer, default_margins: T::Array[String], default_payment_method: String, default_source: String, default_tax_rates: T::Array[String], description: String, discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreateParams::Discount]), due_date: Integer, effective_at: Integer, expand: T::Array[String], footer: String, from_invoice: ::Stripe::InvoiceService::CreateParams::FromInvoice, issuer: ::Stripe::InvoiceService::CreateParams::Issuer, metadata: T.nilable(T::Hash[String, String]), number: String, on_behalf_of: String, payment_settings: ::Stripe::InvoiceService::CreateParams::PaymentSettings, pending_invoice_items_behavior: String, rendering: ::Stripe::InvoiceService::CreateParams::Rendering, shipping_cost: ::Stripe::InvoiceService::CreateParams::ShippingCost, shipping_details: ::Stripe::InvoiceService::CreateParams::ShippingDetails, statement_descriptor: String, subscription: String, transfer_data: ::Stripe::InvoiceService::CreateParams::TransferData).void + } + def initialize( + account_tax_ids: nil, + amounts_due: nil, + application_fee_amount: nil, + auto_advance: nil, + automatic_tax: nil, + automatically_finalizes_at: nil, + collection_method: nil, + currency: nil, + custom_fields: nil, + customer: nil, + days_until_due: nil, + default_margins: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + due_date: nil, + effective_at: nil, + expand: nil, + footer: nil, + from_invoice: nil, + issuer: nil, + metadata: nil, + number: nil, + on_behalf_of: nil, + payment_settings: nil, + pending_invoice_items_behavior: nil, + rendering: nil, + shipping_cost: nil, + shipping_details: nil, + statement_descriptor: nil, + subscription: nil, + transfer_data: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for invoices](https://stripe.com/docs/search#query-fields-for-invoices). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class UpcomingParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::InvoiceService::UpcomingParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceService::UpcomingParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Shipping::Address) + } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + sig { params(ip_address: T.nilable(String)).void } + def initialize(ip_address: nil); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Address)) + } + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Shipping)) + } + attr_accessor :shipping + # Tax details about the customer. + sig { returns(::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { returns(T::Array[::Stripe::InvoiceService::UpcomingParams::CustomerDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(address: T.nilable(::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Shipping), tax: ::Stripe::InvoiceService::UpcomingParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::InvoiceService::UpcomingParams::CustomerDetails::TaxId]).void + } + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::InvoiceService::UpcomingParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceService::UpcomingParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Discount])) + } + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + sig { returns(String) } + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceService::UpcomingParams::InvoiceItem::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceService::UpcomingParams::InvoiceItem::Period, price: String, price_data: ::Stripe::InvoiceService::UpcomingParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd) + } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Trial) + } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings) + } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item]) + } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::PauseCollection) + } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::TransferData) + } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The end of the prebilled time period. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling::BillUntil) + } + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { + params(bill_until: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void + } + def initialize(bill_until: nil, iterations: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment]) + } + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { returns(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase]) } + attr_accessor :phases + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling])) + } + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(amendments: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::ScheduleDetails::Prebilling]), proration_behavior: String).void + } + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::PriceData) + } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + sig { returns(T.any(String, Integer)) } + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + sig { returns(T::Boolean) } + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + sig { + returns(T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item]) + } + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + sig { returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Prebilling) } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + sig { returns(Integer) } + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + sig { returns(String) } + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + sig { returns(Integer) } + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + sig { + params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Item], prebilling: ::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void + } + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ); end + end + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceService::UpcomingParams::SubscriptionItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Settings for automatic tax lookup for this invoice preview. + sig { returns(::Stripe::InvoiceService::UpcomingParams::AutomaticTax) } + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(String) } + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(::Stripe::InvoiceService::UpcomingParams::CustomerDetails) } + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + sig { returns(T::Array[::Stripe::InvoiceService::UpcomingParams::InvoiceItem]) } + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::InvoiceService::UpcomingParams::Issuer) } + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + sig { returns(String) } + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + sig { returns(String) } + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + sig { returns(::Stripe::InvoiceService::UpcomingParams::ScheduleDetails) } + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + sig { returns(String) } + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + sig { returns(T.nilable(Integer)) } + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + sig { returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails) } + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + sig { returns(T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionItem]) } + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + sig { returns(::Stripe::InvoiceService::UpcomingParams::SubscriptionPrebilling) } + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + sig { returns(String) } + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + sig { returns(String) } + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :subscription_trial_from_plan + sig { + params(automatic_tax: ::Stripe::InvoiceService::UpcomingParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::InvoiceService::UpcomingParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpcomingParams::Discount]), expand: T::Array[String], invoice_items: T::Array[::Stripe::InvoiceService::UpcomingParams::InvoiceItem], issuer: ::Stripe::InvoiceService::UpcomingParams::Issuer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::InvoiceService::UpcomingParams::ScheduleDetails, subscription: String, subscription_billing_cycle_anchor: T.any(String, Integer), subscription_cancel_at: T.nilable(Integer), subscription_cancel_at_period_end: T::Boolean, subscription_cancel_now: T::Boolean, subscription_default_tax_rates: T.nilable(T::Array[String]), subscription_details: ::Stripe::InvoiceService::UpcomingParams::SubscriptionDetails, subscription_items: T::Array[::Stripe::InvoiceService::UpcomingParams::SubscriptionItem], subscription_prebilling: ::Stripe::InvoiceService::UpcomingParams::SubscriptionPrebilling, subscription_proration_behavior: String, subscription_proration_date: Integer, subscription_resume_at: String, subscription_start_date: Integer, subscription_trial_end: T.any(String, Integer), subscription_trial_from_plan: T::Boolean).void + } + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ); end + end + class AddLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::AddLinesParams::Line::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::AddLinesParams::Line::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::AddLinesParams::Line::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::PriceData::ProductData) } + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::InvoiceService::AddLinesParams::Line::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void + } + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount::TaxRateData) } + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { + params(amount: Integer, tax_rate_data: ::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount::TaxRateData, taxable_amount: Integer).void + } + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::AddLinesParams::Line::Discount])) + } + attr_accessor :discounts + # ID of an unassigned invoice item to assign to this invoice. If not provided, a new item will be created. + sig { returns(String) } + attr_accessor :invoice_item + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceService::AddLinesParams::Line::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::AddLinesParams::Line::Discount]), invoice_item: String, margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceService::AddLinesParams::Line::Period, price: String, price_data: ::Stripe::InvoiceService::AddLinesParams::Line::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::InvoiceService::AddLinesParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + invoice_item: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :invoice_metadata + # The line items to add. + sig { returns(T::Array[::Stripe::InvoiceService::AddLinesParams::Line]) } + attr_accessor :lines + sig { + params(expand: T::Array[String], invoice_metadata: T.nilable(T::Hash[String, String]), lines: T::Array[::Stripe::InvoiceService::AddLinesParams::Line]).void + } + def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + end + class AttachPaymentParams < Stripe::RequestParams + class PaymentRecordData < Stripe::RequestParams + # The amount that was paid out of band. + sig { returns(Integer) } + attr_accessor :amount + # The currency that was paid out of band. + sig { returns(String) } + attr_accessor :currency + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The type of money movement for this out of band payment record. + sig { returns(String) } + attr_accessor :money_movement_type + # The timestamp when this out of band payment was paid. + sig { returns(Integer) } + attr_accessor :paid_at + # The reference for this out of band payment record. + sig { returns(String) } + attr_accessor :payment_reference + sig { + params(amount: Integer, currency: String, metadata: T.nilable(T::Hash[String, String]), money_movement_type: String, paid_at: Integer, payment_reference: String).void + } + def initialize( + amount: nil, + currency: nil, + metadata: nil, + money_movement_type: nil, + paid_at: nil, + payment_reference: nil + ); end + end + # The portion of the `amount` on the PaymentIntent or out of band payment to apply to this invoice. It defaults to the entire amount. + sig { returns(Integer) } + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + sig { returns(String) } + attr_accessor :payment_intent + # The ID of the PaymentRecord to detach from the invoice. + sig { returns(String) } + attr_accessor :payment_record + # The PaymentRecord data for attaching an out of band payment to the invoice. + sig { returns(::Stripe::InvoiceService::AttachPaymentParams::PaymentRecordData) } + attr_accessor :payment_record_data + sig { + params(amount_requested: Integer, expand: T::Array[String], payment_intent: String, payment_record: String, payment_record_data: ::Stripe::InvoiceService::AttachPaymentParams::PaymentRecordData).void + } + def initialize( + amount_requested: nil, + expand: nil, + payment_intent: nil, + payment_record: nil, + payment_record_data: nil + ); end + end + class AttachPaymentIntentParams < Stripe::RequestParams + # The portion of the PaymentIntent’s `amount` that should be applied to thisinvoice. Defaults to the entire amount. + sig { returns(Integer) } + attr_accessor :amount_requested + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the PaymentIntent to attach to the invoice. + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(amount_requested: Integer, expand: T::Array[String], payment_intent: String).void + } + def initialize(amount_requested: nil, expand: nil, payment_intent: nil); end + end + class FinalizeInvoiceParams < Stripe::RequestParams + # Controls whether Stripe performs [automatic collection](https://stripe.com/docs/invoicing/integration/automatic-advancement-collection) of the invoice. If `false`, the invoice's state doesn't automatically advance without an explicit action. + sig { returns(T::Boolean) } + attr_accessor :auto_advance + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(auto_advance: T::Boolean, expand: T::Array[String]).void } + def initialize(auto_advance: nil, expand: nil); end + end + class MarkUncollectibleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PayParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # In cases where the source used to pay the invoice has insufficient funds, passing `forgive=true` controls whether a charge should be attempted for the full amount available on the source, up to the amount to fully pay the invoice. This effectively forgives the difference between the amount available on the source and the amount due. + # + # Passing `forgive=false` will fail the charge if the source hasn't been pre-funded with the right amount. An example for this case is with ACH Credit Transfers and wires: if the amount wired is less than the amount due by a small amount, you might want to forgive the difference. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :forgive + # ID of the mandate to be used for this invoice. It must correspond to the payment method used to pay the invoice, including the payment_method param or the invoice's default_payment_method or default_source, if set. + sig { returns(T.nilable(String)) } + attr_accessor :mandate + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `true` (off-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # Boolean representing whether an invoice is paid outside of Stripe. This will result in no charge being made. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :paid_out_of_band + # A PaymentMethod to be charged. The PaymentMethod must be the ID of a PaymentMethod belonging to the customer associated with the invoice being paid. + sig { returns(String) } + attr_accessor :payment_method + # A payment source to be charged. The source must be the ID of a source belonging to the customer associated with the invoice being paid. + sig { returns(String) } + attr_accessor :source + sig { + params(expand: T::Array[String], forgive: T::Boolean, mandate: T.nilable(String), off_session: T::Boolean, paid_out_of_band: T::Boolean, payment_method: String, source: String).void + } + def initialize( + expand: nil, + forgive: nil, + mandate: nil, + off_session: nil, + paid_out_of_band: nil, + payment_method: nil, + source: nil + ); end + end + class RemoveLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + # Either `delete` or `unassign`. Deleted line items are permanently deleted. Unassigned line items can be reassigned to an invoice. + sig { returns(String) } + attr_accessor :behavior + # ID of an existing line item to remove from this invoice. + sig { returns(String) } + attr_accessor :id + sig { params(behavior: String, id: String).void } + def initialize(behavior: nil, id: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :invoice_metadata + # The line items to remove. + sig { returns(T::Array[::Stripe::InvoiceService::RemoveLinesParams::Line]) } + attr_accessor :lines + sig { + params(expand: T::Array[String], invoice_metadata: T.nilable(T::Hash[String, String]), lines: T::Array[::Stripe::InvoiceService::RemoveLinesParams::Line]).void + } + def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + end + class SendInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateLinesParams < Stripe::RequestParams + class Line < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::UpdateLinesParams::Line::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::UpdateLinesParams::Line::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::UpdateLinesParams::Line::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + class ProductData < Stripe::RequestParams + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(description: String, images: T::Array[String], metadata: T::Hash[String, String], name: String, tax_code: String).void + } + def initialize( + description: nil, + images: nil, + metadata: nil, + name: nil, + tax_code: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. One of `product` or `product_data` is required. + sig { returns(String) } + attr_accessor :product + # Data used to generate a new product object inline. One of `product` or `product_data` is required. + sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData::ProductData) } + attr_accessor :product_data + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A non-negative integer in cents (or local equivalent) representing how much to charge. One of `unit_amount` or `unit_amount_decimal` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, product_data: ::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData::ProductData, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + product_data: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class TaxAmount < Stripe::RequestParams + class TaxRateData < Stripe::RequestParams + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # The statutory tax rate percent. This field accepts decimal values between 0 and 100 inclusive with at most 4 decimal places. To accommodate fixed-amount taxes, set the percentage to zero. Stripe will not display zero percentages on the invoice unless the `amount` of the tax is also zero. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(country: String, description: String, display_name: String, inclusive: T::Boolean, jurisdiction: String, percentage: Float, state: String, tax_type: String).void + } + def initialize( + country: nil, + description: nil, + display_name: nil, + inclusive: nil, + jurisdiction: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + # The amount, in cents (or local equivalent), of the tax. + sig { returns(Integer) } + attr_accessor :amount + # Data to find or create a TaxRate object. + # + # Stripe automatically creates or reuses a TaxRate object for each tax amount. If the `tax_rate_data` exactly matches a previous value, Stripe will reuse the TaxRate object. TaxRate objects created automatically by Stripe are immediately archived, do not appear in the line item’s `tax_rates`, and cannot be directly added to invoices, payments, or line items. + sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount::TaxRateData) } + attr_accessor :tax_rate_data + # The amount on which tax is calculated, in cents (or local equivalent). + sig { returns(Integer) } + attr_accessor :taxable_amount + sig { + params(amount: Integer, tax_rate_data: ::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount::TaxRateData, taxable_amount: Integer).void + } + def initialize(amount: nil, tax_rate_data: nil, taxable_amount: nil); end + end + # The integer amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. If you want to apply a credit to the customer's account, pass a negative amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Controls whether discounts apply to this line item. Defaults to false for prorations or negative line items, and true for all other line items. Cannot be set to true for prorations. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons, promotion codes & existing discounts which apply to the line item. Item discounts are applied before invoice discounts. Pass an empty string to remove previously-defined discounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::Discount])) + } + attr_accessor :discounts + # ID of an existing line item on the invoice. + sig { returns(String) } + attr_accessor :id + # The IDs of the margins to apply to the line item. When set, the `default_margins` on the invoice do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :margins + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the line item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of up to 10 tax amounts for this line item. This can be useful if you calculate taxes on your own or use a third-party to calculate them. You cannot set tax amounts if any line item has [tax_rates](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-tax_rates) or if the invoice has [default_tax_rates](https://stripe.com/docs/api/invoices/object#invoice_object-default_tax_rates) or uses [automatic tax](https://stripe.com/docs/tax/invoicing). Pass an empty string to remove previously defined tax amounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount])) + } + attr_accessor :tax_amounts + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the invoice do not apply to this line item. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(amount: Integer, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::Discount]), id: String, margins: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceService::UpdateLinesParams::Line::Period, price: String, price_data: ::Stripe::InvoiceService::UpdateLinesParams::Line::PriceData, quantity: Integer, tax_amounts: T.nilable(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line::TaxAmount]), tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + amount: nil, + description: nil, + discountable: nil, + discounts: nil, + id: nil, + margins: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_amounts: nil, + tax_rates: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. For [type=subscription](https://stripe.com/docs/api/invoices/line_item#invoice_line_item_object-type) line items, the incoming metadata specified on the request is directly used to set this value, in contrast to [type=invoiceitem](api/invoices/line_item#invoice_line_item_object-type) line items, where any existing metadata on the invoice line is merged with the incoming data. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :invoice_metadata + # The line items to update. + sig { returns(T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line]) } + attr_accessor :lines + sig { + params(expand: T::Array[String], invoice_metadata: T.nilable(T::Hash[String, String]), lines: T::Array[::Stripe::InvoiceService::UpdateLinesParams::Line]).void + } + def initialize(expand: nil, invoice_metadata: nil, lines: nil); end + end + class VoidInvoiceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreatePreviewParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping::Address) + } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + sig { params(ip_address: T.nilable(String)).void } + def initialize(ip_address: nil); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Address)) + } + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping)) + } + attr_accessor :shipping + # Tax details about the customer. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::TaxId]) + } + attr_accessor :tax_ids + sig { + params(address: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Shipping), tax: ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails::TaxId]).void + } + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount])) + } + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + sig { returns(String) } + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::Period, price: String, price_data: ::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd) + } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Trial) + } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings) + } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item]) + } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::PauseCollection) + } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData) + } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The end of the prebilled time period. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil) + } + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { + params(bill_until: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void + } + def initialize(bill_until: nil, iterations: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment]) + } + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase]) + } + attr_accessor :phases + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling])) + } + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(amendments: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails::Prebilling]), proration_behavior: String).void + } + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData) + } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + sig { returns(T.any(String, Integer)) } + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + sig { returns(T::Boolean) } + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + sig { + returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item]) + } + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + sig { + returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Prebilling) + } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + sig { returns(Integer) } + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + sig { returns(String) } + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + sig { returns(Integer) } + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + sig { + params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Item], prebilling: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void + } + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ); end + end + # Settings for automatic tax lookup for this invoice preview. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax) } + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(String) } + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails) } + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + sig { returns(T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + sig { returns(T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem]) } + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::Issuer) } + attr_accessor :issuer + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + sig { returns(String) } + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + sig { returns(String) } + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails) } + attr_accessor :schedule_details + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + sig { returns(String) } + attr_accessor :subscription + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + sig { returns(::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails) } + attr_accessor :subscription_details + sig { + params(automatic_tax: ::Stripe::InvoiceService::CreatePreviewParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::InvoiceService::CreatePreviewParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::InvoiceService::CreatePreviewParams::Discount]), expand: T::Array[String], invoice_items: T::Array[::Stripe::InvoiceService::CreatePreviewParams::InvoiceItem], issuer: ::Stripe::InvoiceService::CreatePreviewParams::Issuer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::InvoiceService::CreatePreviewParams::ScheduleDetails, subscription: String, subscription_details: ::Stripe::InvoiceService::CreatePreviewParams::SubscriptionDetails).void + } + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + subscription: nil, + subscription_details: nil + ); end + end + # Adds multiple line items to an invoice. This is only possible when an invoice is still a draft. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::AddLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def add_lines(invoice, params = {}, opts = {}); end + + # Attaches a PaymentIntent or an Out of Band Payment to the invoice, adding it to the list of payments. + # + # For Out of Band Payment, the payment is credited to the invoice immediately, increasing the amount_paid + # of the invoice and subsequently transitioning the status of the invoice to paid if necessary. + # + # For the PaymentIntent, when the PaymentIntent's status changes to succeeded, the payment is credited + # to the invoice, increasing its amount_paid. When the invoice is fully paid, the + # invoice's status becomes paid. + # + # If the PaymentIntent's status is already succeeded when it's attached, it's + # credited to the invoice immediately. + # + # See: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) to learn more. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::AttachPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def attach_payment(invoice, params = {}, opts = {}); end + + # Attaches a PaymentIntent to the invoice, adding it to the list of payments. + # When the PaymentIntent's status changes to succeeded, the payment is credited + # to the invoice, increasing its amount_paid. When the invoice is fully paid, the + # invoice's status becomes paid. + # + # If the PaymentIntent's status is already succeeded when it is attached, it is + # credited to the invoice immediately. + # + # Related guide: [Create an invoice payment](https://stripe.com/docs/invoicing/payments/create) + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::AttachPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def attach_payment_intent(invoice, params = {}, opts = {}); end + + # This endpoint creates a draft invoice for a given customer. The invoice remains a draft until you [finalize the invoice, which allows you to [pay](#pay_invoice) or send](https://stripe.com/docs/api#finalize_invoice) the invoice to your customers. + sig { + params(params: T.any(::Stripe::InvoiceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def create(params = {}, opts = {}); end + + # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + # + # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. + # + # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + # + # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + sig { + params(params: T.any(::Stripe::InvoiceService::CreatePreviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def create_preview(params = {}, opts = {}); end + + # Permanently deletes a one-off invoice draft. This cannot be undone. Attempts to delete invoices that are no longer in a draft state will fail; once an invoice has been finalized or if an invoice is for a subscription, it must be [voided](https://stripe.com/docs/api#void_invoice). + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def delete(invoice, params = {}, opts = {}); end + + # Stripe automatically finalizes drafts before sending and attempting payment on invoices. However, if you'd like to finalize a draft invoice manually, you can do so using this method. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::FinalizeInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def finalize_invoice(invoice, params = {}, opts = {}); end + + # You can list all invoices, or list the invoices for a specific customer. The invoices are returned sorted by creation date, with the most recently created invoices appearing first. + sig { + params(params: T.any(::Stripe::InvoiceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Marking an invoice as uncollectible is useful for keeping track of bad debts that can be written off for accounting purposes. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::MarkUncollectibleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def mark_uncollectible(invoice, params = {}, opts = {}); end + + # Stripe automatically creates and then attempts to collect payment on invoices for customers on subscriptions according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to attempt payment on an invoice out of the normal collection schedule or for some other reason, you can do so. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::PayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def pay(invoice, params = {}, opts = {}); end + + # Removes multiple line items from an invoice. This is only possible when an invoice is still a draft. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::RemoveLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def remove_lines(invoice, params = {}, opts = {}); end + + # Retrieves the invoice with the given ID. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def retrieve(invoice, params = {}, opts = {}); end + + # Search for invoices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::InvoiceService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Stripe will automatically send invoices to customers according to your [subscriptions settings](https://dashboard.stripe.com/account/billing/automatic). However, if you'd like to manually send an invoice to your customer out of the normal schedule, you can do so. When sending invoices that have already been paid, there will be no reference to the payment in the email. + # + # Requests made in test-mode result in no emails being sent, despite sending an invoice.sent event. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::SendInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def send_invoice(invoice, params = {}, opts = {}); end + + # At any time, you can preview the upcoming invoice for a customer. This will show you all the charges that are pending, including subscription renewal charges, invoice item charges, etc. It will also show you any discounts that are applicable to the invoice. + # + # Note that when you are viewing an upcoming invoice, you are simply viewing a preview – the invoice has not yet been created. As such, the upcoming invoice will not show up in invoice listing calls, and you cannot use the API to pay or edit the invoice. If you want to change the amount that your customer will be billed, you can add, remove, or update pending invoice items, or update the customer's discount. + # + # You can preview the effects of updating a subscription, including a preview of what proration will take place. To ensure that the actual proration is calculated exactly the same as the previewed proration, you should pass the subscription_details.proration_date parameter when doing the actual subscription update. The recommended way to get only the prorations being previewed is to consider only proration line items where period[start] is equal to the subscription_details.proration_date value passed in the request. + # + # Note: Currency conversion calculations use the latest exchange rates. Exchange rates may vary between the time of the preview and the time of the actual invoice creation. [Learn more](https://docs.stripe.com/currencies/conversions) + sig { + params(params: T.any(::Stripe::InvoiceService::UpcomingParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def upcoming(params = {}, opts = {}); end + + # Draft invoices are fully editable. Once an invoice is [finalized](https://stripe.com/docs/billing/invoices/workflow#finalized), + # monetary values, as well as collection_method, become uneditable. + # + # If you would like to stop the Stripe Billing engine from automatically finalizing, reattempting payments on, + # sending reminders for, or [automatically reconciling](https://stripe.com/docs/billing/invoices/reconciliation) invoices, pass + # auto_advance=false. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def update(invoice, params = {}, opts = {}); end + + # Updates multiple line items on an invoice. This is only possible when an invoice is still a draft. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::UpdateLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def update_lines(invoice, params = {}, opts = {}); end + + # Mark a finalized invoice as void. This cannot be undone. Voiding an invoice is similar to [deletion](https://stripe.com/docs/api#delete_invoice), however it only applies to finalized invoices and maintains a papertrail where the invoice can still be found. + # + # Consult with local regulations to determine whether and how an invoice might be amended, canceled, or voided in the jurisdiction you're doing business in. You might need to [issue another invoice or credit note](https://stripe.com/docs/api#create_invoice) instead. Stripe recommends that you consult with your legal counsel for advice specific to your business. + sig { + params(invoice: String, params: T.any(::Stripe::InvoiceService::VoidInvoiceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Invoice) + } + def void_invoice(invoice, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/invoice_upcoming_lines_service.rbi b/rbi/stripe/services/invoice_upcoming_lines_service.rbi new file mode 100644 index 000000000..f59e2c1e3 --- /dev/null +++ b/rbi/stripe/services/invoice_upcoming_lines_service.rbi @@ -0,0 +1,2023 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class InvoiceUpcomingLinesService < StripeService + class ListParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Whether Stripe automatically computes tax on this invoice. Note that incompatible invoice items (invoice items with manually specified [tax rates](https://stripe.com/docs/api/tax_rates), negative amounts, or `tax_behavior=unspecified`) cannot be added to automatic tax invoices. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # A freeform text field for the country. However, in order to activate some tax features, the format should be a two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Customer shipping address. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping::Address) + } + attr_accessor :address + # Customer name. + sig { returns(String) } + attr_accessor :name + # Customer phone (including extension). + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class Tax < Stripe::RequestParams + # A recent IP address of the customer used for tax reporting and tax location inference. Stripe recommends updating the IP address when a new PaymentMethod is attached or the address field on the customer is updated. We recommend against updating this field more frequently since it could result in unexpected tax location/reporting outcomes. + sig { returns(T.nilable(String)) } + attr_accessor :ip_address + sig { params(ip_address: T.nilable(String)).void } + def initialize(ip_address: nil); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's address. + sig { + returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Address)) + } + attr_accessor :address + # The customer's shipping information. Appears on invoices emailed to this customer. + sig { + returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping)) + } + attr_accessor :shipping + # Tax details about the customer. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Tax) } + attr_accessor :tax + # The customer's tax exemption. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The customer's tax IDs. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::TaxId]) + } + attr_accessor :tax_ids + sig { + params(address: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Address), shipping: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Shipping), tax: ::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::Tax, tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails::TaxId]).void + } + def initialize(address: nil, shipping: nil, tax: nil, tax_exempt: nil, tax_ids: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class Period < Stripe::RequestParams + # The end of the period, which must be greater than or equal to the start. This value is inclusive. + sig { returns(Integer) } + attr_accessor :end + # The start of the period. This value is inclusive. + sig { returns(Integer) } + attr_accessor :start + sig { params(end_: Integer, start: Integer).void } + def initialize(end_: nil, start: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The integer amount in cents (or local equivalent) of previewed invoice item. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). Only applicable to new invoice items. + sig { returns(String) } + attr_accessor :currency + # An arbitrary string which you can attach to the invoice item. The description is displayed in the invoice for easy tracking. + sig { returns(String) } + attr_accessor :description + # Explicitly controls whether discounts apply to this invoice item. Defaults to true, except for negative invoice items. + sig { returns(T::Boolean) } + attr_accessor :discountable + # The coupons to redeem into discounts for the invoice item in the preview. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount])) + } + attr_accessor :discounts + # The ID of the invoice item to update in preview. If not specified, a new invoice item will be added to the preview of the upcoming invoice. + sig { returns(String) } + attr_accessor :invoiceitem + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The period associated with this invoice item. When set to different values, the period will be rendered on the invoice. If you have [Stripe Revenue Recognition](https://stripe.com/docs/revenue-recognition) enabled, the period will be used to recognize and defer revenue. See the [Revenue Recognition documentation](https://stripe.com/docs/revenue-recognition/methodology/subscriptions-and-invoicing) for details. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Period) } + attr_accessor :period + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::PriceData) } + attr_accessor :price_data + # Non-negative integer. The quantity of units for the invoice item. + sig { returns(Integer) } + attr_accessor :quantity + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # The tax rates that apply to the item. When set, any `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # The integer unit amount in cents (or local equivalent) of the charge to be applied to the upcoming invoice. This unit_amount will be multiplied by the quantity to get the full amount. If you want to apply a credit to the customer's account, pass a negative unit_amount. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(amount: Integer, currency: String, description: String, discountable: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Discount]), invoiceitem: String, metadata: T.nilable(T::Hash[String, String]), period: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::Period, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem::PriceData, quantity: Integer, tax_behavior: String, tax_code: T.nilable(String), tax_rates: T.nilable(T::Array[String]), unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + discountable: nil, + discounts: nil, + invoiceitem: nil, + metadata: nil, + period: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_behavior: nil, + tax_code: nil, + tax_rates: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class ScheduleDetails < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Add, remove: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Remove, set: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Add, remove: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Remove, set: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd) + } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentEnd, amendment_start: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::DiscountAction], item_actions: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Trial) + } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings) + } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item]) + } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::PauseCollection) + } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TransferData) + } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::InvoiceSettings, items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The end of the prebilled time period. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil) + } + attr_accessor :bill_until + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { + params(bill_until: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling::BillUntil, iterations: Integer).void + } + def initialize(bill_until: nil, iterations: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment]) + } + attr_accessor :amendments + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase]) + } + attr_accessor :phases + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling])) + } + attr_accessor :prebilling + # In cases where the `schedule_details` params update the currently active phase, specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(amendments: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Amendment], billing_behavior: String, end_behavior: String, phases: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Phase], prebilling: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails::Prebilling]), proration_behavior: String).void + } + def initialize( + amendments: nil, + billing_behavior: nil, + end_behavior: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class SubscriptionDetails < Stripe::RequestParams + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData) + } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. + sig { returns(T.any(String, Integer)) } + attr_accessor :billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. + sig { returns(T::Boolean) } + attr_accessor :cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A list of up to 20 subscription items, each with an attached price. + sig { + returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item]) + } + attr_accessor :items + # The pre-billing to apply to the subscription as a preview. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Prebilling) + } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_details.proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_details.items`, or `subscription_details.trial_end` are required. Also, `subscription_details.proration_behavior` cannot be set to 'none'. + sig { returns(Integer) } + attr_accessor :proration_date + # For paused subscriptions, setting `subscription_details.resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. + sig { returns(String) } + attr_accessor :resume_at + # Date a subscription is intended to start (can be future or past). + sig { returns(Integer) } + attr_accessor :start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_details.items` or `subscription` is required. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + sig { + params(billing_cycle_anchor: T.any(String, Integer), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancel_now: T::Boolean, default_tax_rates: T.nilable(T::Array[String]), items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Item], prebilling: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails::Prebilling, proration_behavior: String, proration_date: Integer, resume_at: String, start_date: Integer, trial_end: T.any(String, Integer)).void + } + def initialize( + billing_cycle_anchor: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancel_now: nil, + default_tax_rates: nil, + items: nil, + prebilling: nil, + proration_behavior: nil, + proration_date: nil, + resume_at: nil, + start_date: nil, + trial_end: nil + ); end + end + class SubscriptionItem < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionPrebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Settings for automatic tax lookup for this invoice preview. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax) } + attr_accessor :automatic_tax + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # The currency to preview this invoice in. Defaults to that of `customer` if not specified. + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer whose upcoming invoice you'd like to retrieve. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(String) } + attr_accessor :customer + # Details about the customer you want to invoice or overrides for an existing customer. If `automatic_tax` is enabled then one of `customer`, `customer_details`, `subscription`, or `schedule` must be set. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails) } + attr_accessor :customer_details + # The coupons to redeem into discounts for the invoice preview. If not specified, inherits the discount from the subscription or customer. This works for both coupons directly applied to an invoice and coupons applied to a subscription. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::Discount])) + } + attr_accessor :discounts + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of invoice items to add or update in the upcoming invoice preview (up to 250). + sig { returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem]) } + attr_accessor :invoice_items + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::Issuer) } + attr_accessor :issuer + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The account (if any) for which the funds of the invoice payment are intended. If set, the invoice will be presented with the branding and support information of the specified account. See the [Invoices with Connect](https://stripe.com/docs/billing/invoices/connect) documentation for details. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Customizes the types of values to include when calculating the invoice. Defaults to `next` if unspecified. + sig { returns(String) } + attr_accessor :preview_mode + # The identifier of the schedule whose upcoming invoice you'd like to retrieve. Cannot be used with subscription or subscription fields. + sig { returns(String) } + attr_accessor :schedule + # The schedule creation or modification params to apply as a preview. Cannot be used with `subscription` or `subscription_` prefixed fields. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails) } + attr_accessor :schedule_details + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The identifier of the subscription for which you'd like to retrieve the upcoming invoice. If not provided, but a `subscription_details.items` is provided, you will preview creating a subscription with those items. If neither `subscription` nor `subscription_details.items` is provided, you will retrieve the next upcoming invoice from among the customer's subscriptions. + sig { returns(String) } + attr_accessor :subscription + # For new subscriptions, a future timestamp to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). This is used to determine the date of the first full invoice, and, for plans with `month` or `year` intervals, the day of the month for subsequent invoices. For existing subscriptions, the value can only be set to `now` or `unchanged`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.billing_cycle_anchor` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_billing_cycle_anchor + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at` instead. + sig { returns(T.nilable(Integer)) } + attr_accessor :subscription_cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_at_period_end` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_at_period_end + # This simulates the subscription being canceled or expired immediately. This field has been deprecated and will be removed in a future API version. Use `subscription_details.cancel_now` instead. + sig { returns(T::Boolean) } + attr_accessor :subscription_cancel_now + # If provided, the invoice returned will preview updating or creating a subscription with these default tax rates. The default tax rates will apply to any line item that does not have `tax_rates` set. This field has been deprecated and will be removed in a future API version. Use `subscription_details.default_tax_rates` instead. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :subscription_default_tax_rates + # The subscription creation or modification params to apply as a preview. Cannot be used with `schedule` or `schedule_details` fields. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails) } + attr_accessor :subscription_details + # A list of up to 20 subscription items, each with an attached price. This field has been deprecated and will be removed in a future API version. Use `subscription_details.items` instead. + sig { returns(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem]) } + attr_accessor :subscription_items + # The pre-billing to apply to the subscription as a preview. This field has been deprecated and will be removed in a future API version. Use `subscription_details.prebilling` instead. + sig { returns(::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionPrebilling) } + attr_accessor :subscription_prebilling + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_behavior` instead. + sig { returns(String) } + attr_accessor :subscription_proration_behavior + # If previewing an update to a subscription, and doing proration, `subscription_proration_date` forces the proration to be calculated as though the update was done at the specified time. The time given must be within the current subscription period and within the current phase of the schedule backing this subscription, if the schedule exists. If set, `subscription`, and one of `subscription_items`, or `subscription_trial_end` are required. Also, `subscription_proration_behavior` cannot be set to 'none'. This field has been deprecated and will be removed in a future API version. Use `subscription_details.proration_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_proration_date + # For paused subscriptions, setting `subscription_resume_at` to `now` will preview the invoice that will be generated if the subscription is resumed. This field has been deprecated and will be removed in a future API version. Use `subscription_details.resume_at` instead. + sig { returns(String) } + attr_accessor :subscription_resume_at + # Date a subscription is intended to start (can be future or past). This field has been deprecated and will be removed in a future API version. Use `subscription_details.start_date` instead. + sig { returns(Integer) } + attr_accessor :subscription_start_date + # If provided, the invoice returned will preview updating or creating a subscription with that trial end. If set, one of `subscription_items` or `subscription` is required. This field has been deprecated and will be removed in a future API version. Use `subscription_details.trial_end` instead. + sig { returns(T.any(String, Integer)) } + attr_accessor :subscription_trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `subscription_trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `subscription_trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :subscription_trial_from_plan + sig { + params(automatic_tax: ::Stripe::InvoiceUpcomingLinesService::ListParams::AutomaticTax, coupon: String, currency: String, customer: String, customer_details: ::Stripe::InvoiceUpcomingLinesService::ListParams::CustomerDetails, discounts: T.nilable(T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::Discount]), ending_before: String, expand: T::Array[String], invoice_items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::InvoiceItem], issuer: ::Stripe::InvoiceUpcomingLinesService::ListParams::Issuer, limit: Integer, on_behalf_of: T.nilable(String), preview_mode: String, schedule: String, schedule_details: ::Stripe::InvoiceUpcomingLinesService::ListParams::ScheduleDetails, starting_after: String, subscription: String, subscription_billing_cycle_anchor: T.any(String, Integer), subscription_cancel_at: T.nilable(Integer), subscription_cancel_at_period_end: T::Boolean, subscription_cancel_now: T::Boolean, subscription_default_tax_rates: T.nilable(T::Array[String]), subscription_details: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionDetails, subscription_items: T::Array[::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionItem], subscription_prebilling: ::Stripe::InvoiceUpcomingLinesService::ListParams::SubscriptionPrebilling, subscription_proration_behavior: String, subscription_proration_date: Integer, subscription_resume_at: String, subscription_start_date: Integer, subscription_trial_end: T.any(String, Integer), subscription_trial_from_plan: T::Boolean).void + } + def initialize( + automatic_tax: nil, + coupon: nil, + currency: nil, + customer: nil, + customer_details: nil, + discounts: nil, + ending_before: nil, + expand: nil, + invoice_items: nil, + issuer: nil, + limit: nil, + on_behalf_of: nil, + preview_mode: nil, + schedule: nil, + schedule_details: nil, + starting_after: nil, + subscription: nil, + subscription_billing_cycle_anchor: nil, + subscription_cancel_at: nil, + subscription_cancel_at_period_end: nil, + subscription_cancel_now: nil, + subscription_default_tax_rates: nil, + subscription_details: nil, + subscription_items: nil, + subscription_prebilling: nil, + subscription_proration_behavior: nil, + subscription_proration_date: nil, + subscription_resume_at: nil, + subscription_start_date: nil, + subscription_trial_end: nil, + subscription_trial_from_plan: nil + ); end + end + # When retrieving an upcoming invoice, you'll get a lines property containing the total count of line items and the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(params: T.any(::Stripe::InvoiceUpcomingLinesService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/authorization_service.rbi b/rbi/stripe/services/issuing/authorization_service.rbi new file mode 100644 index 000000000..c7b037fcf --- /dev/null +++ b/rbi/stripe/services/issuing/authorization_service.rbi @@ -0,0 +1,140 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class AuthorizationService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return authorizations that belong to the given card. + sig { returns(String) } + attr_accessor :card + # Only return authorizations that belong to the given cardholder. + sig { returns(String) } + attr_accessor :cardholder + # Only return authorizations that were created during the given date interval. + sig { + returns(T.any(::Stripe::Issuing::AuthorizationService::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return authorizations with the given status. One of `pending`, `closed`, or `reversed`. + sig { returns(String) } + attr_accessor :status + sig { + params(card: String, cardholder: String, created: T.any(::Stripe::Issuing::AuthorizationService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class ApproveParams < Stripe::RequestParams + # If the authorization's `pending_request.is_amount_controllable` property is `true`, you may provide this value to control how much to hold for the authorization. Must be positive (use [`decline`](https://stripe.com/docs/api/issuing/authorizations/decline) to decline an authorization request). + sig { returns(Integer) } + attr_accessor :amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(amount: Integer, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(amount: nil, expand: nil, metadata: nil); end + end + class DeclineParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + # [Deprecated] Approves a pending Issuing Authorization object. This request should be made within the timeout window of the [real-time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + # This method is deprecated. Instead, [respond directly to the webhook request to approve an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + sig { + params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def approve(authorization, params = {}, opts = {}); end + + # [Deprecated] Declines a pending Issuing Authorization object. This request should be made within the timeout window of the [real time authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations) flow. + # This method is deprecated. Instead, [respond directly to the webhook request to decline an authorization](https://stripe.com/docs/issuing/controls/real-time-authorizations#authorization-handling). + sig { + params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::DeclineParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def decline(authorization, params = {}, opts = {}); end + + # Returns a list of Issuing Authorization objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::AuthorizationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing Authorization object. + sig { + params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def retrieve(authorization, params = {}, opts = {}); end + + # Updates the specified Issuing Authorization object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(authorization: String, params: T.any(::Stripe::Issuing::AuthorizationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def update(authorization, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/card_service.rbi b/rbi/stripe/services/issuing/card_service.rbi new file mode 100644 index 000000000..c5e109407 --- /dev/null +++ b/rbi/stripe/services/issuing/card_service.rbi @@ -0,0 +1,479 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class CardService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return cards belonging to the Cardholder with the provided ID. + sig { returns(String) } + attr_accessor :cardholder + # Only return cards that were issued during the given date interval. + sig { returns(T.any(::Stripe::Issuing::CardService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Only return cards that have the given expiration month. + sig { returns(Integer) } + attr_accessor :exp_month + # Only return cards that have the given expiration year. + sig { returns(Integer) } + attr_accessor :exp_year + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return cards that have the given last four digits. + sig { returns(String) } + attr_accessor :last4 + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Attribute for param field personalization_design + sig { returns(String) } + attr_accessor :personalization_design + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return cards that have the given status. One of `active`, `inactive`, or `canceled`. + sig { returns(String) } + attr_accessor :status + # Only return cards that have the given type. One of `virtual` or `physical`. + sig { returns(String) } + attr_accessor :type + sig { + params(cardholder: String, created: T.any(::Stripe::Issuing::CardService::ListParams::Created, Integer), ending_before: String, exp_month: Integer, exp_year: Integer, expand: T::Array[String], last4: String, limit: Integer, personalization_design: String, starting_after: String, status: String, type: String).void + } + def initialize( + cardholder: nil, + created: nil, + ending_before: nil, + exp_month: nil, + exp_year: nil, + expand: nil, + last4: nil, + limit: nil, + personalization_design: nil, + starting_after: nil, + status: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + sig { returns(String) } + attr_accessor :encrypted_number + sig { params(encrypted_number: String).void } + def initialize(encrypted_number: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + sig { returns(String) } + attr_accessor :eori_number + sig { params(eori_number: String).void } + def initialize(eori_number: nil); end + end + # The address that the card is shipped to. + sig { returns(::Stripe::Issuing::CardService::CreateParams::Shipping::Address) } + attr_accessor :address + # Address validation settings. + sig { returns(::Stripe::Issuing::CardService::CreateParams::Shipping::AddressValidation) } + attr_accessor :address_validation + # Customs information for the shipment. + sig { returns(::Stripe::Issuing::CardService::CreateParams::Shipping::Customs) } + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + sig { returns(String) } + attr_accessor :name + # Phone number of the recipient of the shipment. + sig { returns(String) } + attr_accessor :phone_number + # Whether a signature is required for card delivery. + sig { returns(T::Boolean) } + attr_accessor :require_signature + # Shipment service. + sig { returns(String) } + attr_accessor :service + # Packaging options. + sig { returns(String) } + attr_accessor :type + sig { + params(address: ::Stripe::Issuing::CardService::CreateParams::Shipping::Address, address_validation: ::Stripe::Issuing::CardService::CreateParams::Shipping::AddressValidation, customs: ::Stripe::Issuing::CardService::CreateParams::Shipping::Customs, name: String, phone_number: String, require_signature: T::Boolean, service: String, type: String).void + } + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + sig { + returns(T::Array[::Stripe::Issuing::CardService::CreateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::CardService::CreateParams::SpendingControls::SpendingLimit]).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ); end + end + # The [Cardholder](https://stripe.com/docs/api#issuing_cardholder_object) object with which the card will be associated. + sig { returns(String) } + attr_accessor :cardholder + # The currency for the card. + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field financial_account + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The personalization design object belonging to this card. + sig { returns(String) } + attr_accessor :personalization_design + # The desired PIN for this card. + sig { returns(::Stripe::Issuing::CardService::CreateParams::Pin) } + attr_accessor :pin + # The card this is meant to be a replacement for (if any). + sig { returns(String) } + attr_accessor :replacement_for + # If `replacement_for` is specified, this should indicate why that card is being replaced. + sig { returns(String) } + attr_accessor :replacement_reason + # The second line to print on the card. Max length: 24 characters. + sig { returns(T.nilable(String)) } + attr_accessor :second_line + # The address where the card will be shipped. + sig { returns(::Stripe::Issuing::CardService::CreateParams::Shipping) } + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::CardService::CreateParams::SpendingControls) } + attr_accessor :spending_controls + # Whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. + sig { returns(String) } + attr_accessor :status + # The type of card to issue. Possible values are `physical` or `virtual`. + sig { returns(String) } + attr_accessor :type + sig { + params(cardholder: String, currency: String, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], personalization_design: String, pin: ::Stripe::Issuing::CardService::CreateParams::Pin, replacement_for: String, replacement_reason: String, second_line: T.nilable(String), shipping: ::Stripe::Issuing::CardService::CreateParams::Shipping, spending_controls: ::Stripe::Issuing::CardService::CreateParams::SpendingControls, status: String, type: String).void + } + def initialize( + cardholder: nil, + currency: nil, + expand: nil, + financial_account: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + replacement_for: nil, + replacement_reason: nil, + second_line: nil, + shipping: nil, + spending_controls: nil, + status: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Pin < Stripe::RequestParams + # The card's desired new PIN, encrypted under Stripe's public key. + sig { returns(String) } + attr_accessor :encrypted_number + sig { params(encrypted_number: String).void } + def initialize(encrypted_number: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressValidation < Stripe::RequestParams + # The address validation capabilities to use. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + class Customs < Stripe::RequestParams + # The Economic Operators Registration and Identification (EORI) number to use for Customs. Required for bulk shipments to Europe. + sig { returns(String) } + attr_accessor :eori_number + sig { params(eori_number: String).void } + def initialize(eori_number: nil); end + end + # The address that the card is shipped to. + sig { returns(::Stripe::Issuing::CardService::UpdateParams::Shipping::Address) } + attr_accessor :address + # Address validation settings. + sig { returns(::Stripe::Issuing::CardService::UpdateParams::Shipping::AddressValidation) } + attr_accessor :address_validation + # Customs information for the shipment. + sig { returns(::Stripe::Issuing::CardService::UpdateParams::Shipping::Customs) } + attr_accessor :customs + # The name printed on the shipping label when shipping the card. + sig { returns(String) } + attr_accessor :name + # Phone number of the recipient of the shipment. + sig { returns(String) } + attr_accessor :phone_number + # Whether a signature is required for card delivery. + sig { returns(T::Boolean) } + attr_accessor :require_signature + # Shipment service. + sig { returns(String) } + attr_accessor :service + # Packaging options. + sig { returns(String) } + attr_accessor :type + sig { + params(address: ::Stripe::Issuing::CardService::UpdateParams::Shipping::Address, address_validation: ::Stripe::Issuing::CardService::UpdateParams::Shipping::AddressValidation, customs: ::Stripe::Issuing::CardService::UpdateParams::Shipping::Customs, name: String, phone_number: String, require_signature: T::Boolean, service: String, type: String).void + } + def initialize( + address: nil, + address_validation: nil, + customs: nil, + name: nil, + phone_number: nil, + require_signature: nil, + service: nil, + type: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across any cards this card replaced (i.e., its `replacement_for` card and _that_ card's `replacement_for` card, up the chain). + sig { + returns(T::Array[::Stripe::Issuing::CardService::UpdateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::CardService::UpdateParams::SpendingControls::SpendingLimit]).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil + ); end + end + # Reason why the `status` of this card is `canceled`. + sig { returns(String) } + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Attribute for param field personalization_design + sig { returns(String) } + attr_accessor :personalization_design + # The desired new PIN for this card. + sig { returns(::Stripe::Issuing::CardService::UpdateParams::Pin) } + attr_accessor :pin + # Updated shipping information for the card. + sig { returns(::Stripe::Issuing::CardService::UpdateParams::Shipping) } + attr_accessor :shipping + # Rules that control spending for this card. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::CardService::UpdateParams::SpendingControls) } + attr_accessor :spending_controls + # Dictates whether authorizations can be approved on this card. May be blocked from activating cards depending on past-due Cardholder requirements. Defaults to `inactive`. If this card is being canceled because it was lost or stolen, this information should be provided as `cancellation_reason`. + sig { returns(String) } + attr_accessor :status + sig { + params(cancellation_reason: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), personalization_design: String, pin: ::Stripe::Issuing::CardService::UpdateParams::Pin, shipping: ::Stripe::Issuing::CardService::UpdateParams::Shipping, spending_controls: ::Stripe::Issuing::CardService::UpdateParams::SpendingControls, status: String).void + } + def initialize( + cancellation_reason: nil, + expand: nil, + metadata: nil, + personalization_design: nil, + pin: nil, + shipping: nil, + spending_controls: nil, + status: nil + ); end + end + # Creates an Issuing Card object. + sig { + params(params: T.any(::Stripe::Issuing::CardService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def create(params = {}, opts = {}); end + + # Returns a list of Issuing Card objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::CardService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing Card object. + sig { + params(card: String, params: T.any(::Stripe::Issuing::CardService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def retrieve(card, params = {}, opts = {}); end + + # Updates the specified Issuing Card object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(card: String, params: T.any(::Stripe::Issuing::CardService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def update(card, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/cardholder_service.rbi b/rbi/stripe/services/issuing/cardholder_service.rbi new file mode 100644 index 000000000..e42bf2823 --- /dev/null +++ b/rbi/stripe/services/issuing/cardholder_service.rbi @@ -0,0 +1,568 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class CardholderService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return cardholders that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::CardholderService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return cardholders that have the given email address. + sig { returns(String) } + attr_accessor :email + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return cardholders that have the given phone number. + sig { returns(String) } + attr_accessor :phone_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return cardholders that have the given status. One of `active`, `inactive`, or `blocked`. + sig { returns(String) } + attr_accessor :status + # Only return cardholders that have the given type. One of `individual` or `company`. + sig { returns(String) } + attr_accessor :type + sig { + params(created: T.any(::Stripe::Issuing::CardholderService::ListParams::Created, Integer), email: String, ending_before: String, expand: T::Array[String], limit: Integer, phone_number: String, starting_after: String, status: String, type: String).void + } + def initialize( + created: nil, + email: nil, + ending_before: nil, + expand: nil, + limit: nil, + phone_number: nil, + starting_after: nil, + status: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The cardholder’s billing address. + sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Billing::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Issuing::CardholderService::CreateParams::Billing::Address).void + } + def initialize(address: nil); end + end + class Company < Stripe::RequestParams + # The entity's business ID number. + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + sig { + returns(::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing::UserTermsAcceptance) + } + attr_accessor :user_terms_acceptance + sig { + params(user_terms_acceptance: ::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing::UserTermsAcceptance).void + } + def initialize(user_terms_acceptance: nil); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(document: ::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification::Document).void + } + def initialize(document: nil); end + end + # Information related to the card_issuing program for this cardholder. + sig { + returns(::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing) + } + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Individual::Dob) } + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :last_name + # Government-issued ID document for this cardholder. + sig { + returns(::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification) + } + attr_accessor :verification + sig { + params(card_issuing: ::Stripe::Issuing::CardholderService::CreateParams::Individual::CardIssuing, dob: ::Stripe::Issuing::CardholderService::CreateParams::Individual::Dob, first_name: String, last_name: String, verification: ::Stripe::Issuing::CardholderService::CreateParams::Individual::Verification).void + } + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + sig { + returns(T::Array[::Stripe::Issuing::CardholderService::CreateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + sig { returns(String) } + attr_accessor :spending_limits_currency + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::CardholderService::CreateParams::SpendingControls::SpendingLimit], spending_limits_currency: String).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ); end + end + # The cardholder's billing address. + sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Billing) } + attr_accessor :billing + # Additional information about a `company` cardholder. + sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Company) } + attr_accessor :company + # The cardholder's email address. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Additional information about an `individual` cardholder. + sig { returns(::Stripe::Issuing::CardholderService::CreateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The cardholder's name. This will be printed on cards issued to them. The maximum length of this field is 24 characters. This field cannot contain any special characters or numbers. + sig { returns(String) } + attr_accessor :name + # The cardholder's phone number. This will be transformed to [E.164](https://en.wikipedia.org/wiki/E.164) if it is not provided in that format already. This is required for all cardholders who will be creating EU cards. + # While phone number is optional if the cardholder will not be creating EU cards, note that this cardholder will not be eligible for 3DS without a phone number. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure#when-is-3d-secure-applied) for more details. + sig { returns(String) } + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::CardholderService::CreateParams::SpendingControls) } + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. Defaults to `active`. + sig { returns(String) } + attr_accessor :status + # One of `individual` or `company`. See [Choose a cardholder type](https://stripe.com/docs/issuing/other/choose-cardholder) for more details. + sig { returns(String) } + attr_accessor :type + sig { + params(billing: ::Stripe::Issuing::CardholderService::CreateParams::Billing, company: ::Stripe::Issuing::CardholderService::CreateParams::Company, email: String, expand: T::Array[String], individual: ::Stripe::Issuing::CardholderService::CreateParams::Individual, metadata: T::Hash[String, String], name: String, phone_number: String, preferred_locales: T::Array[String], spending_controls: ::Stripe::Issuing::CardholderService::CreateParams::SpendingControls, status: String, type: String).void + } + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + name: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Billing < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The cardholder’s billing address. + sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::Billing::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Issuing::CardholderService::UpdateParams::Billing::Address).void + } + def initialize(address: nil); end + end + class Company < Stripe::RequestParams + # The entity's business ID number. + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Individual < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + class UserTermsAcceptance < Stripe::RequestParams + # The Unix timestamp marking when the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the cardholder accepted the Authorized User Terms. Required for Celtic Spend Card users. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the cardholder accepted the Authorized User Terms. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Information about cardholder acceptance of Celtic [Authorized User Terms](https://stripe.com/docs/issuing/cards#accept-authorized-user-terms). Required for cards backed by a Celtic program. + sig { + returns(::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing::UserTermsAcceptance) + } + attr_accessor :user_terms_acceptance + sig { + params(user_terms_acceptance: ::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing::UserTermsAcceptance).void + } + def initialize(user_terms_acceptance: nil); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(document: ::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification::Document).void + } + def initialize(document: nil); end + end + # Information related to the card_issuing program for this cardholder. + sig { + returns(::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing) + } + attr_accessor :card_issuing + # The date of birth of this cardholder. Cardholders must be older than 13 years old. + sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Dob) } + attr_accessor :dob + # The first name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :first_name + # The last name of this cardholder. Required before activating Cards. This field cannot contain any numbers, special characters (except periods, commas, hyphens, spaces and apostrophes) or non-latin letters. + sig { returns(String) } + attr_accessor :last_name + # Government-issued ID document for this cardholder. + sig { + returns(::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification) + } + attr_accessor :verification + sig { + params(card_issuing: ::Stripe::Issuing::CardholderService::UpdateParams::Individual::CardIssuing, dob: ::Stripe::Issuing::CardholderService::UpdateParams::Individual::Dob, first_name: String, last_name: String, verification: ::Stripe::Issuing::CardholderService::UpdateParams::Individual::Verification).void + } + def initialize( + card_issuing: nil, + dob: nil, + first_name: nil, + last_name: nil, + verification: nil + ); end + end + class SpendingControls < Stripe::RequestParams + class SpendingLimit < Stripe::RequestParams + # Maximum amount allowed to spend per interval. + sig { returns(Integer) } + attr_accessor :amount + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) this limit applies to. Omitting this field will apply the limit to all categories. + sig { returns(T::Array[String]) } + attr_accessor :categories + # Interval (or event) to which the amount applies. + sig { returns(String) } + attr_accessor :interval + sig { params(amount: Integer, categories: T::Array[String], interval: String).void } + def initialize(amount: nil, categories: nil, interval: nil); end + end + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to allow. All other categories will be blocked. Cannot be set with `blocked_categories`. + sig { returns(T::Array[String]) } + attr_accessor :allowed_categories + # Array of strings containing representing countries from which authorizations will be allowed. Authorizations from merchants in all other countries will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `blocked_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :allowed_merchant_countries + # Array of strings containing [categories](https://stripe.com/docs/api#issuing_authorization_object-merchant_data-category) of authorizations to decline. All other categories will be allowed. Cannot be set with `allowed_categories`. + sig { returns(T::Array[String]) } + attr_accessor :blocked_categories + # Array of strings containing representing countries from which authorizations will be declined. Country codes should be ISO 3166 alpha-2 country codes (e.g. `US`). Cannot be set with `allowed_merchant_countries`. Provide an empty value to unset this control. + sig { returns(T::Array[String]) } + attr_accessor :blocked_merchant_countries + # Limit spending with amount-based rules that apply across this cardholder's cards. + sig { + returns(T::Array[::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls::SpendingLimit]) + } + attr_accessor :spending_limits + # Currency of amounts within `spending_limits`. Defaults to your merchant country's currency. + sig { returns(String) } + attr_accessor :spending_limits_currency + sig { + params(allowed_categories: T::Array[String], allowed_merchant_countries: T::Array[String], blocked_categories: T::Array[String], blocked_merchant_countries: T::Array[String], spending_limits: T::Array[::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls::SpendingLimit], spending_limits_currency: String).void + } + def initialize( + allowed_categories: nil, + allowed_merchant_countries: nil, + blocked_categories: nil, + blocked_merchant_countries: nil, + spending_limits: nil, + spending_limits_currency: nil + ); end + end + # The cardholder's billing address. + sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::Billing) } + attr_accessor :billing + # Additional information about a `company` cardholder. + sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::Company) } + attr_accessor :company + # The cardholder's email address. + sig { returns(String) } + attr_accessor :email + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Additional information about an `individual` cardholder. + sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::Individual) } + attr_accessor :individual + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The cardholder's phone number. This is required for all cardholders who will be creating EU cards. See the [3D Secure documentation](https://stripe.com/docs/issuing/3d-secure) for more details. + sig { returns(String) } + attr_accessor :phone_number + # The cardholder’s preferred locales (languages), ordered by preference. Locales can be `de`, `en`, `es`, `fr`, or `it`. + # This changes the language of the [3D Secure flow](https://stripe.com/docs/issuing/3d-secure) and one-time password messages sent to the cardholder. + sig { returns(T::Array[String]) } + attr_accessor :preferred_locales + # Rules that control spending across this cardholder's cards. Refer to our [documentation](https://stripe.com/docs/issuing/controls/spending-controls) for more details. + sig { returns(::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls) } + attr_accessor :spending_controls + # Specifies whether to permit authorizations on this cardholder's cards. + sig { returns(String) } + attr_accessor :status + sig { + params(billing: ::Stripe::Issuing::CardholderService::UpdateParams::Billing, company: ::Stripe::Issuing::CardholderService::UpdateParams::Company, email: String, expand: T::Array[String], individual: ::Stripe::Issuing::CardholderService::UpdateParams::Individual, metadata: T::Hash[String, String], phone_number: String, preferred_locales: T::Array[String], spending_controls: ::Stripe::Issuing::CardholderService::UpdateParams::SpendingControls, status: String).void + } + def initialize( + billing: nil, + company: nil, + email: nil, + expand: nil, + individual: nil, + metadata: nil, + phone_number: nil, + preferred_locales: nil, + spending_controls: nil, + status: nil + ); end + end + # Creates a new Issuing Cardholder object that can be issued cards. + sig { + params(params: T.any(::Stripe::Issuing::CardholderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder) + } + def create(params = {}, opts = {}); end + + # Returns a list of Issuing Cardholder objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::CardholderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing Cardholder object. + sig { + params(cardholder: String, params: T.any(::Stripe::Issuing::CardholderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder) + } + def retrieve(cardholder, params = {}, opts = {}); end + + # Updates the specified Issuing Cardholder object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(cardholder: String, params: T.any(::Stripe::Issuing::CardholderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Cardholder) + } + def update(cardholder, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi b/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi new file mode 100644 index 000000000..de7713c7c --- /dev/null +++ b/rbi/stripe/services/issuing/credit_underwriting_record_service.rbi @@ -0,0 +1,498 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class CreditUnderwritingRecordService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CorrectParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + sig { returns(String) } + attr_accessor :application_method + # Scope of demand made by the applicant. + sig { returns(String) } + attr_accessor :purpose + # Date when the applicant submitted their application. + sig { returns(Integer) } + attr_accessor :submitted_at + sig { params(application_method: String, purpose: String, submitted_at: Integer).void } + def initialize(application_method: nil, purpose: nil, submitted_at: nil); end + end + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + sig { returns(String) } + attr_accessor :email + # Full name of the company or person. + sig { returns(String) } + attr_accessor :name + sig { params(email: String, name: String).void } + def initialize(email: nil, name: nil); end + end + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { + params(amount: Integer, currency: String, reason_other_explanation: String, reasons: T::Array[String]).void + } + def initialize( + amount: nil, + currency: nil, + reason_other_explanation: nil, + reasons: nil + ); end + end + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + # Details about the application rejection. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::ApplicationRejected) + } + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::CreditLimitApproved) + } + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::CreditLimitDecreased) + } + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::CreditLineClosed) + } + attr_accessor :credit_line_closed + # Outcome of the decision. + sig { returns(String) } + attr_accessor :type + sig { + params(application_rejected: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::ApplicationRejected, credit_limit_approved: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::CreditLimitApproved, credit_limit_decreased: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::CreditLimitDecreased, credit_line_closed: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision::CreditLineClosed, type: String).void + } + def initialize( + application_rejected: nil, + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ); end + end + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + sig { returns(String) } + attr_accessor :explanation + # The decision before the exception was applied. + sig { returns(String) } + attr_accessor :original_decision_type + sig { params(explanation: String, original_decision_type: String).void } + def initialize(explanation: nil, original_decision_type: nil); end + end + # Details about the application submission. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Application) + } + attr_accessor :application + # Information about the company or person applying or holding the account. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::CreditUser) + } + attr_accessor :credit_user + # Date when a decision was made. + sig { returns(Integer) } + attr_accessor :decided_at + # Details about the decision. + sig { returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision) } + attr_accessor :decision + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). Optional if previously provided and no changes are needed. + sig { returns(String) } + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::UnderwritingException) + } + attr_accessor :underwriting_exception + sig { + params(application: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Application, credit_user: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::CreditUser, decided_at: Integer, decision: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::Decision, expand: T::Array[String], metadata: T::Hash[String, String], regulatory_reporting_file: String, underwriting_exception: ::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams::UnderwritingException).void + } + def initialize( + application: nil, + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ); end + end + class ReportDecisionParams < Stripe::RequestParams + class Decision < Stripe::RequestParams + class ApplicationRejected < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the application was rejected, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + # Details about the application rejection. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::Decision::ApplicationRejected) + } + attr_accessor :application_rejected + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::Decision::CreditLimitApproved) + } + attr_accessor :credit_limit_approved + # Outcome of the decision. + sig { returns(String) } + attr_accessor :type + sig { + params(application_rejected: ::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::Decision::ApplicationRejected, credit_limit_approved: ::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::Decision::CreditLimitApproved, type: String).void + } + def initialize(application_rejected: nil, credit_limit_approved: nil, type: nil); end + end + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + sig { returns(String) } + attr_accessor :explanation + # The decision before the exception was applied. + sig { returns(String) } + attr_accessor :original_decision_type + sig { params(explanation: String, original_decision_type: String).void } + def initialize(explanation: nil, original_decision_type: nil); end + end + # Date when a decision was made. + sig { returns(Integer) } + attr_accessor :decided_at + # Details about the decision. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::Decision) + } + attr_accessor :decision + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + sig { returns(String) } + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::UnderwritingException) + } + attr_accessor :underwriting_exception + sig { + params(decided_at: Integer, decision: ::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::Decision, expand: T::Array[String], metadata: T::Hash[String, String], regulatory_reporting_file: String, underwriting_exception: ::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams::UnderwritingException).void + } + def initialize( + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ); end + end + class CreateFromApplicationParams < Stripe::RequestParams + class Application < Stripe::RequestParams + # The channel through which the applicant has submitted their application. Defaults to `online`. + sig { returns(String) } + attr_accessor :application_method + # Scope of demand made by the applicant. + sig { returns(String) } + attr_accessor :purpose + # Date when the applicant submitted their application. + sig { returns(Integer) } + attr_accessor :submitted_at + sig { params(application_method: String, purpose: String, submitted_at: Integer).void } + def initialize(application_method: nil, purpose: nil, submitted_at: nil); end + end + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + sig { returns(String) } + attr_accessor :email + # Full name of the company or person. + sig { returns(String) } + attr_accessor :name + sig { params(email: String, name: String).void } + def initialize(email: nil, name: nil); end + end + # Details about the application submission. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromApplicationParams::Application) + } + attr_accessor :application + # Information about the company or person applying or holding the account. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromApplicationParams::CreditUser) + } + attr_accessor :credit_user + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(application: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromApplicationParams::Application, credit_user: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromApplicationParams::CreditUser, expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(application: nil, credit_user: nil, expand: nil, metadata: nil); end + end + class CreateFromProactiveReviewParams < Stripe::RequestParams + class CreditUser < Stripe::RequestParams + # Email of the applicant or accountholder. + sig { returns(String) } + attr_accessor :email + # Full name of the company or person. + sig { returns(String) } + attr_accessor :name + sig { params(email: String, name: String).void } + def initialize(email: nil, name: nil); end + end + class Decision < Stripe::RequestParams + class CreditLimitApproved < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + class CreditLimitDecreased < Stripe::RequestParams + # The credit approved, in the currency of the account and [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # The currency of the credit approved, will default to the Account's Issuing currency. + sig { returns(String) } + attr_accessor :currency + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the existing credit was decreased, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { + params(amount: Integer, currency: String, reason_other_explanation: String, reasons: T::Array[String]).void + } + def initialize( + amount: nil, + currency: nil, + reason_other_explanation: nil, + reasons: nil + ); end + end + class CreditLineClosed < Stripe::RequestParams + # Details about the `reasons.other` when present. + sig { returns(String) } + attr_accessor :reason_other_explanation + # List of reasons why the credit line was closed, up to 4 reasons, in order of importance. + sig { returns(T::Array[String]) } + attr_accessor :reasons + sig { params(reason_other_explanation: String, reasons: T::Array[String]).void } + def initialize(reason_other_explanation: nil, reasons: nil); end + end + # Details about the credit limit approved. An approved credit limit is required before you can set a `credit_limit_amount` in the [CreditPolicy API](https://stripe.com/docs/api/issuing/credit_policy/) + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision::CreditLimitApproved) + } + attr_accessor :credit_limit_approved + # Details about the credit limit decreased. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision::CreditLimitDecreased) + } + attr_accessor :credit_limit_decreased + # Details about the credit line closed. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision::CreditLineClosed) + } + attr_accessor :credit_line_closed + # Outcome of the decision. + sig { returns(String) } + attr_accessor :type + sig { + params(credit_limit_approved: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision::CreditLimitApproved, credit_limit_decreased: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision::CreditLimitDecreased, credit_line_closed: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision::CreditLineClosed, type: String).void + } + def initialize( + credit_limit_approved: nil, + credit_limit_decreased: nil, + credit_line_closed: nil, + type: nil + ); end + end + class UnderwritingException < Stripe::RequestParams + # Written explanation for the exception. + sig { returns(String) } + attr_accessor :explanation + # The decision before the exception was applied. + sig { returns(String) } + attr_accessor :original_decision_type + sig { params(explanation: String, original_decision_type: String).void } + def initialize(explanation: nil, original_decision_type: nil); end + end + # Information about the company or person applying or holding the account. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::CreditUser) + } + attr_accessor :credit_user + # Date when a decision was made. + sig { returns(Integer) } + attr_accessor :decided_at + # Details about the decision. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision) + } + attr_accessor :decision + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # File containing regulatory reporting data for the decision. Required if you are subject to this [reporting requirement](https://stripe.com/docs/issuing/credit/report-required-regulatory-data-for-credit-decisions). + sig { returns(String) } + attr_accessor :regulatory_reporting_file + # If an exception to the usual underwriting criteria was made for this decision, details about the exception must be provided. Exceptions should only be granted in rare circumstances, in consultation with Stripe Compliance. + sig { + returns(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::UnderwritingException) + } + attr_accessor :underwriting_exception + sig { + params(credit_user: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::CreditUser, decided_at: Integer, decision: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::Decision, expand: T::Array[String], metadata: T::Hash[String, String], regulatory_reporting_file: String, underwriting_exception: ::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams::UnderwritingException).void + } + def initialize( + credit_user: nil, + decided_at: nil, + decision: nil, + expand: nil, + metadata: nil, + regulatory_reporting_file: nil, + underwriting_exception: nil + ); end + end + # Update a CreditUnderwritingRecord object to correct mistakes. + sig { + params(credit_underwriting_record: String, params: T.any(::Stripe::Issuing::CreditUnderwritingRecordService::CorrectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def correct(credit_underwriting_record, params = {}, opts = {}); end + + # Creates a CreditUnderwritingRecord object with information about a credit application submission. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromApplicationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def create_from_application(params = {}, opts = {}); end + + # Creates a CreditUnderwritingRecord object from an underwriting decision coming from a proactive review of an existing accountholder. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecordService::CreateFromProactiveReviewParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def create_from_proactive_review(params = {}, opts = {}); end + + # Retrieves a list of CreditUnderwritingRecord objects. The objects are sorted in descending order by creation date, with the most-recently-created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::CreditUnderwritingRecordService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Update a CreditUnderwritingRecord object from a decision made on a credit application. + sig { + params(credit_underwriting_record: String, params: T.any(::Stripe::Issuing::CreditUnderwritingRecordService::ReportDecisionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def report_decision(credit_underwriting_record, params = {}, opts = {}); end + + # Retrieves a CreditUnderwritingRecord object. + sig { + params(credit_underwriting_record: String, params: T.any(::Stripe::Issuing::CreditUnderwritingRecordService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::CreditUnderwritingRecord) + } + def retrieve(credit_underwriting_record, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/dispute_service.rbi b/rbi/stripe/services/issuing/dispute_service.rbi new file mode 100644 index 000000000..c11f821f3 --- /dev/null +++ b/rbi/stripe/services/issuing/dispute_service.rbi @@ -0,0 +1,701 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class DisputeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return Issuing disputes that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::DisputeService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Select Issuing disputes with the given status. + sig { returns(String) } + attr_accessor :status + # Select the Issuing dispute for the given transaction. + sig { returns(String) } + attr_accessor :transaction + sig { + params(created: T.any(::Stripe::Issuing::DisputeService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String, transaction: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + transaction: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_policy_provided: T.nilable(T::Boolean), cancellation_reason: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ); end + end + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + sig { returns(T.nilable(String)) } + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + sig { returns(T.nilable(String)) } + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + sig { returns(T.nilable(String)) } + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + sig { returns(String) } + attr_accessor :original_transaction + sig { + params(additional_documentation: T.nilable(String), card_statement: T.nilable(String), cash_receipt: T.nilable(String), check_image: T.nilable(String), explanation: T.nilable(String), original_transaction: String).void + } + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ); end + end + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer), return_description: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ); end + end + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_reason: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ); end + end + # Evidence provided when `reason` is 'canceled'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Canceled)) + } + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Duplicate)) + } + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Fraudulent)) + } + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::MerchandiseNotAsDescribed)) + } + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::NoValidAuthorization)) + } + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::NotReceived)) + } + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Other)) + } + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + sig { returns(String) } + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::ServiceNotAsDescribed)) + } + attr_accessor :service_not_as_described + sig { + params(canceled: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Canceled), duplicate: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Duplicate), fraudulent: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Fraudulent), merchandise_not_as_described: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::MerchandiseNotAsDescribed), no_valid_authorization: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::NoValidAuthorization), not_received: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::NotReceived), other: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::Other), reason: String, service_not_as_described: T.nilable(::Stripe::Issuing::DisputeService::CreateParams::Evidence::ServiceNotAsDescribed)).void + } + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ); end + end + class Treasury < Stripe::RequestParams + # The ID of the ReceivedDebit to initiate an Issuings dispute for. + sig { returns(String) } + attr_accessor :received_debit + sig { params(received_debit: String).void } + def initialize(received_debit: nil); end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). If not set, defaults to the full transaction amount. + sig { returns(Integer) } + attr_accessor :amount + # Evidence provided for the dispute. + sig { returns(::Stripe::Issuing::DisputeService::CreateParams::Evidence) } + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the issuing transaction to create a dispute for. For transaction on Treasury FinancialAccounts, use `treasury.received_debit`. + sig { returns(String) } + attr_accessor :transaction + # Params for disputes related to Treasury FinancialAccounts + sig { returns(::Stripe::Issuing::DisputeService::CreateParams::Treasury) } + attr_accessor :treasury + sig { + params(amount: Integer, evidence: ::Stripe::Issuing::DisputeService::CreateParams::Evidence, expand: T::Array[String], metadata: T::Hash[String, String], transaction: String, treasury: ::Stripe::Issuing::DisputeService::CreateParams::Treasury).void + } + def initialize( + amount: nil, + evidence: nil, + expand: nil, + metadata: nil, + transaction: nil, + treasury: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Evidence < Stripe::RequestParams + class Canceled < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Whether the cardholder was provided with a cancellation policy. + sig { returns(T.nilable(T::Boolean)) } + attr_accessor :cancellation_policy_provided + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_policy_provided: T.nilable(T::Boolean), cancellation_reason: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_policy_provided: nil, + cancellation_reason: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil, + return_status: nil, + returned_at: nil + ); end + end + class Duplicate < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the card statement showing that the product had already been paid for. + sig { returns(T.nilable(String)) } + attr_accessor :card_statement + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Copy of the receipt showing that the product had been paid for in cash. + sig { returns(T.nilable(String)) } + attr_accessor :cash_receipt + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Image of the front and back of the check that was used to pay for the product. + sig { returns(T.nilable(String)) } + attr_accessor :check_image + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Transaction (e.g., ipi_...) that the disputed transaction is a duplicate of. Of the two or more transactions that are copies of each other, this is original undisputed one. + sig { returns(String) } + attr_accessor :original_transaction + sig { + params(additional_documentation: T.nilable(String), card_statement: T.nilable(String), cash_receipt: T.nilable(String), check_image: T.nilable(String), explanation: T.nilable(String), original_transaction: String).void + } + def initialize( + additional_documentation: nil, + card_statement: nil, + cash_receipt: nil, + check_image: nil, + explanation: nil, + original_transaction: nil + ); end + end + class Fraudulent < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class MerchandiseNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + # Description of the cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_description + # Result of cardholder's attempt to return the product. + sig { returns(T.nilable(String)) } + attr_accessor :return_status + # Date when the product was returned or attempted to be returned. + sig { returns(T.nilable(Integer)) } + attr_accessor :returned_at + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer), return_description: T.nilable(String), return_status: T.nilable(String), returned_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + received_at: nil, + return_description: nil, + return_status: nil, + returned_at: nil + ); end + end + class NoValidAuthorization < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String)).void + } + def initialize(additional_documentation: nil, explanation: nil); end + end + class NotReceived < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when the cardholder expected to receive the product. + sig { returns(T.nilable(Integer)) } + attr_accessor :expected_at + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), expected_at: T.nilable(Integer), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + expected_at: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class Other < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Description of the merchandise or service that was purchased. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Whether the product was a merchandise or service. + sig { returns(T.nilable(String)) } + attr_accessor :product_type + sig { + params(additional_documentation: T.nilable(String), explanation: T.nilable(String), product_description: T.nilable(String), product_type: T.nilable(String)).void + } + def initialize( + additional_documentation: nil, + explanation: nil, + product_description: nil, + product_type: nil + ); end + end + class ServiceNotAsDescribed < Stripe::RequestParams + # (ID of a [file upload](https://stripe.com/docs/guides/file-upload)) Additional documentation supporting the dispute. + sig { returns(T.nilable(String)) } + attr_accessor :additional_documentation + # Date when order was canceled. + sig { returns(T.nilable(Integer)) } + attr_accessor :canceled_at + # Reason for canceling the order. + sig { returns(T.nilable(String)) } + attr_accessor :cancellation_reason + # Explanation of why the cardholder is disputing this transaction. + sig { returns(T.nilable(String)) } + attr_accessor :explanation + # Date when the product was received. + sig { returns(T.nilable(Integer)) } + attr_accessor :received_at + sig { + params(additional_documentation: T.nilable(String), canceled_at: T.nilable(Integer), cancellation_reason: T.nilable(String), explanation: T.nilable(String), received_at: T.nilable(Integer)).void + } + def initialize( + additional_documentation: nil, + canceled_at: nil, + cancellation_reason: nil, + explanation: nil, + received_at: nil + ); end + end + # Evidence provided when `reason` is 'canceled'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Canceled)) + } + attr_accessor :canceled + # Evidence provided when `reason` is 'duplicate'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Duplicate)) + } + attr_accessor :duplicate + # Evidence provided when `reason` is 'fraudulent'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Fraudulent)) + } + attr_accessor :fraudulent + # Evidence provided when `reason` is 'merchandise_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::MerchandiseNotAsDescribed)) + } + attr_accessor :merchandise_not_as_described + # Evidence provided when `reason` is 'no_valid_authorization'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NoValidAuthorization)) + } + attr_accessor :no_valid_authorization + # Evidence provided when `reason` is 'not_received'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NotReceived)) + } + attr_accessor :not_received + # Evidence provided when `reason` is 'other'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Other)) + } + attr_accessor :other + # The reason for filing the dispute. The evidence should be submitted in the field of the same name. + sig { returns(String) } + attr_accessor :reason + # Evidence provided when `reason` is 'service_not_as_described'. + sig { + returns(T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::ServiceNotAsDescribed)) + } + attr_accessor :service_not_as_described + sig { + params(canceled: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Canceled), duplicate: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Duplicate), fraudulent: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Fraudulent), merchandise_not_as_described: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::MerchandiseNotAsDescribed), no_valid_authorization: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NoValidAuthorization), not_received: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::NotReceived), other: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::Other), reason: String, service_not_as_described: T.nilable(::Stripe::Issuing::DisputeService::UpdateParams::Evidence::ServiceNotAsDescribed)).void + } + def initialize( + canceled: nil, + duplicate: nil, + fraudulent: nil, + merchandise_not_as_described: nil, + no_valid_authorization: nil, + not_received: nil, + other: nil, + reason: nil, + service_not_as_described: nil + ); end + end + # The dispute amount in the card's currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Evidence provided for the dispute. + sig { returns(::Stripe::Issuing::DisputeService::UpdateParams::Evidence) } + attr_accessor :evidence + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(amount: Integer, evidence: ::Stripe::Issuing::DisputeService::UpdateParams::Evidence, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(amount: nil, evidence: nil, expand: nil, metadata: nil); end + end + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + # Creates an Issuing Dispute object. Individual pieces of evidence within the evidence object are optional at this point. Stripe only validates that required evidence is present during submission. Refer to [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence) for more details about evidence requirements. + sig { + params(params: T.any(::Stripe::Issuing::DisputeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def create(params = {}, opts = {}); end + + # Returns a list of Issuing Dispute objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::DisputeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing Dispute object. + sig { + params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def retrieve(dispute, params = {}, opts = {}); end + + # Submits an Issuing Dispute to the card network. Stripe validates that all evidence fields required for the dispute's reason are present. For more details, see [Dispute reasons and evidence](https://stripe.com/docs/issuing/purchases/disputes#dispute-reasons-and-evidence). + sig { + params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def submit(dispute, params = {}, opts = {}); end + + # Updates the specified Issuing Dispute object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Properties on the evidence object can be unset by passing in an empty string. + sig { + params(dispute: String, params: T.any(::Stripe::Issuing::DisputeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Dispute) + } + def update(dispute, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi b/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi new file mode 100644 index 000000000..477b55278 --- /dev/null +++ b/rbi/stripe/services/issuing/dispute_settlement_detail_service.rbi @@ -0,0 +1,55 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class DisputeSettlementDetailService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Select the Issuing dispute settlement details for the given settlement. + sig { returns(String) } + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, settlement: String, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Issuing DisputeSettlementDetail objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::DisputeSettlementDetailService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing DisputeSettlementDetail object. + sig { + params(dispute_settlement_detail: String, params: T.any(::Stripe::Issuing::DisputeSettlementDetailService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::DisputeSettlementDetail) + } + def retrieve(dispute_settlement_detail, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi b/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi new file mode 100644 index 000000000..ad0dcf1b3 --- /dev/null +++ b/rbi/stripe/services/issuing/fraud_liability_debit_service.rbi @@ -0,0 +1,73 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class FraudLiabilityDebitService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return Issuing Fraud Liability Debits that were created during the given date interval. + sig { + returns(T.any(::Stripe::Issuing::FraudLiabilityDebitService::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Issuing::FraudLiabilityDebitService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of Issuing FraudLiabilityDebit objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::FraudLiabilityDebitService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing FraudLiabilityDebit object. + sig { + params(fraud_liability_debit: String, params: T.any(::Stripe::Issuing::FraudLiabilityDebitService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::FraudLiabilityDebit) + } + def retrieve(fraud_liability_debit, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/personalization_design_service.rbi b/rbi/stripe/services/issuing/personalization_design_service.rbi new file mode 100644 index 000000000..4343db08f --- /dev/null +++ b/rbi/stripe/services/issuing/personalization_design_service.rbi @@ -0,0 +1,233 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class PersonalizationDesignService < StripeService + class ListParams < Stripe::RequestParams + class Preferences < Stripe::RequestParams + # Only return the personalization design that's set as the default. A connected account uses the Connect platform's default design if no personalization design is set as the default. + sig { returns(T::Boolean) } + attr_accessor :is_default + # Only return the personalization design that is set as the Connect platform's default. This parameter is only applicable to connected accounts. + sig { returns(T::Boolean) } + attr_accessor :is_platform_default + sig { params(is_default: T::Boolean, is_platform_default: T::Boolean).void } + def initialize(is_default: nil, is_platform_default: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return personalization designs with the given lookup keys. + sig { returns(T::Array[String]) } + attr_accessor :lookup_keys + # Only return personalization designs with the given preferences. + sig { returns(::Stripe::Issuing::PersonalizationDesignService::ListParams::Preferences) } + attr_accessor :preferences + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return personalization designs with the given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, lookup_keys: T::Array[String], preferences: ::Stripe::Issuing::PersonalizationDesignService::ListParams::Preferences, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + preferences: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_body + # The footer title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_title + # The header body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_body + # The header title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_title + sig { + params(footer_body: T.nilable(String), footer_title: T.nilable(String), header_body: T.nilable(String), header_title: T.nilable(String)).void + } + def initialize( + footer_body: nil, + footer_title: nil, + header_body: nil, + header_title: nil + ); end + end + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + sig { returns(T::Boolean) } + attr_accessor :is_default + sig { params(is_default: T::Boolean).void } + def initialize(is_default: nil); end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + sig { returns(String) } + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + sig { returns(::Stripe::Issuing::PersonalizationDesignService::CreateParams::CarrierText) } + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Friendly display name. + sig { returns(String) } + attr_accessor :name + # The physical bundle object belonging to this personalization design. + sig { returns(String) } + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + sig { returns(::Stripe::Issuing::PersonalizationDesignService::CreateParams::Preferences) } + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + sig { + params(card_logo: String, carrier_text: ::Stripe::Issuing::PersonalizationDesignService::CreateParams::CarrierText, expand: T::Array[String], lookup_key: String, metadata: T::Hash[String, String], name: String, physical_bundle: String, preferences: ::Stripe::Issuing::PersonalizationDesignService::CreateParams::Preferences, transfer_lookup_key: T::Boolean).void + } + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CarrierText < Stripe::RequestParams + # The footer body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_body + # The footer title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :footer_title + # The header body text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_body + # The header title text of the carrier letter. + sig { returns(T.nilable(String)) } + attr_accessor :header_title + sig { + params(footer_body: T.nilable(String), footer_title: T.nilable(String), header_body: T.nilable(String), header_title: T.nilable(String)).void + } + def initialize( + footer_body: nil, + footer_title: nil, + header_body: nil, + header_title: nil + ); end + end + class Preferences < Stripe::RequestParams + # Whether we use this personalization design to create cards when one isn't specified. A connected account uses the Connect platform's default design if no personalization design is set as the default design. + sig { returns(T::Boolean) } + attr_accessor :is_default + sig { params(is_default: T::Boolean).void } + def initialize(is_default: nil); end + end + # The file for the card logo, for use with physical bundles that support card logos. Must have a `purpose` value of `issuing_logo`. + sig { returns(T.nilable(String)) } + attr_accessor :card_logo + # Hash containing carrier text, for use with physical bundles that support carrier text. + sig { + returns(T.nilable(::Stripe::Issuing::PersonalizationDesignService::UpdateParams::CarrierText)) + } + attr_accessor :carrier_text + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve personalization designs dynamically from a static string. This may be up to 200 characters. + sig { returns(T.nilable(String)) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Friendly display name. Providing an empty string will set the field to null. + sig { returns(T.nilable(String)) } + attr_accessor :name + # The physical bundle object belonging to this personalization design. + sig { returns(String) } + attr_accessor :physical_bundle + # Information on whether this personalization design is used to create cards when one is not specified. + sig { returns(::Stripe::Issuing::PersonalizationDesignService::UpdateParams::Preferences) } + attr_accessor :preferences + # If set to true, will atomically remove the lookup key from the existing personalization design, and assign it to this personalization design. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + sig { + params(card_logo: T.nilable(String), carrier_text: T.nilable(::Stripe::Issuing::PersonalizationDesignService::UpdateParams::CarrierText), expand: T::Array[String], lookup_key: T.nilable(String), metadata: T::Hash[String, String], name: T.nilable(String), physical_bundle: String, preferences: ::Stripe::Issuing::PersonalizationDesignService::UpdateParams::Preferences, transfer_lookup_key: T::Boolean).void + } + def initialize( + card_logo: nil, + carrier_text: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + name: nil, + physical_bundle: nil, + preferences: nil, + transfer_lookup_key: nil + ); end + end + # Creates a personalization design object. + sig { + params(params: T.any(::Stripe::Issuing::PersonalizationDesignService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def create(params = {}, opts = {}); end + + # Returns a list of personalization design objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::PersonalizationDesignService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a personalization design object. + sig { + params(personalization_design: String, params: T.any(::Stripe::Issuing::PersonalizationDesignService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def retrieve(personalization_design, params = {}, opts = {}); end + + # Updates a card personalization object. + sig { + params(personalization_design: String, params: T.any(::Stripe::Issuing::PersonalizationDesignService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def update(personalization_design, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/physical_bundle_service.rbi b/rbi/stripe/services/issuing/physical_bundle_service.rbi new file mode 100644 index 000000000..dfad52678 --- /dev/null +++ b/rbi/stripe/services/issuing/physical_bundle_service.rbi @@ -0,0 +1,59 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class PhysicalBundleService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return physical bundles with the given status. + sig { returns(String) } + attr_accessor :status + # Only return physical bundles with the given type. + sig { returns(String) } + attr_accessor :type + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String, type: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of physical bundle objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::PhysicalBundleService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a physical bundle object. + sig { + params(physical_bundle: String, params: T.any(::Stripe::Issuing::PhysicalBundleService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PhysicalBundle) + } + def retrieve(physical_bundle, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/token_service.rbi b/rbi/stripe/services/issuing/token_service.rbi new file mode 100644 index 000000000..e21a68b48 --- /dev/null +++ b/rbi/stripe/services/issuing/token_service.rbi @@ -0,0 +1,95 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class TokenService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # The Issuing card identifier to list tokens for. + sig { returns(String) } + attr_accessor :card + # Only return Issuing tokens that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::TokenService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Select Issuing tokens with the given status. + sig { returns(String) } + attr_accessor :status + sig { + params(card: String, created: T.any(::Stripe::Issuing::TokenService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + card: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Specifies which status the token should be updated to. + sig { returns(String) } + attr_accessor :status + sig { params(expand: T::Array[String], status: String).void } + def initialize(expand: nil, status: nil); end + end + # Lists all Issuing Token objects for a given card. + sig { + params(params: T.any(::Stripe::Issuing::TokenService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing Token object. + sig { + params(token: String, params: T.any(::Stripe::Issuing::TokenService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Token) + } + def retrieve(token, params = {}, opts = {}); end + + # Attempts to update the specified Issuing Token object to the status specified. + sig { + params(token: String, params: T.any(::Stripe::Issuing::TokenService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Token) + } + def update(token, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing/transaction_service.rbi b/rbi/stripe/services/issuing/transaction_service.rbi new file mode 100644 index 000000000..e4592f28a --- /dev/null +++ b/rbi/stripe/services/issuing/transaction_service.rbi @@ -0,0 +1,103 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Issuing + class TransactionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return transactions that belong to the given card. + sig { returns(String) } + attr_accessor :card + # Only return transactions that belong to the given cardholder. + sig { returns(String) } + attr_accessor :cardholder + # Only return transactions that were created during the given date interval. + sig { returns(T.any(::Stripe::Issuing::TransactionService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return transactions that are associated with the given settlement. + sig { returns(String) } + attr_accessor :settlement + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return transactions that have the given type. One of `capture` or `refund`. + sig { returns(String) } + attr_accessor :type + sig { + params(card: String, cardholder: String, created: T.any(::Stripe::Issuing::TransactionService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, settlement: String, starting_after: String, type: String).void + } + def initialize( + card: nil, + cardholder: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + settlement: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + # Returns a list of Issuing Transaction objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Issuing::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an Issuing Transaction object. + sig { + params(transaction: String, params: T.any(::Stripe::Issuing::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction) + } + def retrieve(transaction, params = {}, opts = {}); end + + # Updates the specified Issuing Transaction object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(transaction: String, params: T.any(::Stripe::Issuing::TransactionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction) + } + def update(transaction, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/issuing_service.rbi b/rbi/stripe/services/issuing_service.rbi new file mode 100644 index 000000000..25677e192 --- /dev/null +++ b/rbi/stripe/services/issuing_service.rbi @@ -0,0 +1,19 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class IssuingService < StripeService + attr_reader :authorizations + attr_reader :cards + attr_reader :cardholders + attr_reader :credit_underwriting_records + attr_reader :disputes + attr_reader :dispute_settlement_details + attr_reader :fraud_liability_debits + attr_reader :personalization_designs + attr_reader :physical_bundles + attr_reader :tokens + attr_reader :transactions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/mandate_service.rbi b/rbi/stripe/services/mandate_service.rbi new file mode 100644 index 000000000..1dea34718 --- /dev/null +++ b/rbi/stripe/services/mandate_service.rbi @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class MandateService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves a Mandate object. + sig { + params(mandate: String, params: T.any(::Stripe::MandateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Mandate) + } + def retrieve(mandate, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/margin_service.rbi b/rbi/stripe/services/margin_service.rbi new file mode 100644 index 000000000..b17b2467b --- /dev/null +++ b/rbi/stripe/services/margin_service.rbi @@ -0,0 +1,104 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class MarginService < StripeService + class ListParams < Stripe::RequestParams + # Only return margins that are active or inactive. For example, pass `true` to only list active margins. + sig { returns(T::Boolean) } + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + sig { returns(String) } + attr_accessor :name + # Percent that will be taken off the subtotal before tax (after all other discounts and promotions) of any invoice to which the margin is applied. + sig { returns(Float) } + attr_accessor :percent_off + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T::Hash[String, String], name: String, percent_off: Float).void + } + def initialize(active: nil, expand: nil, metadata: nil, name: nil, percent_off: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Whether the margin can be applied to invoices, invoice items, or invoice line items or not. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Name of the margin, which is displayed to customers, such as on invoices. + sig { returns(String) } + attr_accessor :name + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T::Hash[String, String], name: String).void + } + def initialize(active: nil, expand: nil, metadata: nil, name: nil); end + end + # Create a margin object to be used with invoices, invoice items, and invoice line items for a customer to represent a partner discount. A margin has a percent_off which is the percent that will be taken off the subtotal after all items and other discounts and promotions) of any invoices for a customer. Calculation of prorations do not include any partner margins applied on the original invoice item. + sig { + params(params: T.any(::Stripe::MarginService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Margin) + } + def create(params = {}, opts = {}); end + + # Retrieve a list of your margins. + sig { + params(params: T.any(::Stripe::MarginService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieve a margin object with the given ID. + sig { + params(margin: String, params: T.any(::Stripe::MarginService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Margin) + } + def retrieve(margin, params = {}, opts = {}); end + + # Update the specified margin object. Certain fields of the margin object are not editable. + sig { + params(margin: String, params: T.any(::Stripe::MarginService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Margin) + } + def update(margin, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/order_line_item_service.rbi b/rbi/stripe/services/order_line_item_service.rbi new file mode 100644 index 000000000..84df15fe9 --- /dev/null +++ b/rbi/stripe/services/order_line_item_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class OrderLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # When retrieving an order, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(id: String, params: T.any(::Stripe::OrderLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/order_service.rbi b/rbi/stripe/services/order_service.rbi new file mode 100644 index 000000000..7e7c3b921 --- /dev/null +++ b/rbi/stripe/services/order_service.rbi @@ -0,0 +1,2306 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class OrderService < StripeService + attr_reader :line_items + class ListParams < Stripe::RequestParams + # Only return orders for the given customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address provided by the customer. + sig { returns(::Stripe::OrderService::CreateParams::BillingDetails::Address) } + attr_accessor :address + # The billing email provided by the customer. + sig { returns(String) } + attr_accessor :email + # The billing name provided by the customer. + sig { returns(String) } + attr_accessor :name + # The billing phone number provided by the customer. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::OrderService::CreateParams::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + sig { returns(String) } + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + sig { returns(String) } + attr_accessor :type + sig { params(gift_card: String, type: String).void } + def initialize(gift_card: nil, type: nil); end + end + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + sig { params(coupon: String, discount: String).void } + def initialize(coupon: nil, discount: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + sig { returns(String) } + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { + returns(T.nilable(::Stripe::OrderService::CreateParams::LineItem::ProductData::PackageDimensions)) + } + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } + attr_accessor :url + sig { + params(description: T.nilable(String), id: String, images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::OrderService::CreateParams::LineItem::ProductData::PackageDimensions), shippable: T::Boolean, tax_code: T.nilable(String), url: T.nilable(String)).void + } + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ); end + end + # The description for the line item. Will default to the name of the associated product. + sig { returns(String) } + attr_accessor :description + # The discounts applied to this line item. + sig { + returns(T.nilable(T::Array[::Stripe::OrderService::CreateParams::LineItem::Discount])) + } + attr_accessor :discounts + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + sig { returns(::Stripe::OrderService::CreateParams::LineItem::PriceData) } + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + sig { returns(String) } + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + sig { returns(::Stripe::OrderService::CreateParams::LineItem::ProductData) } + attr_accessor :product_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates applied to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(description: String, discounts: T.nilable(T::Array[::Stripe::OrderService::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::OrderService::CreateParams::LineItem::PriceData, product: String, product_data: ::Stripe::OrderService::CreateParams::LineItem::ProductData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + description: nil, + discounts: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(String) } + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: String, reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize( + capture_method: nil, + preferred_locale: nil, + setup_future_usage: nil + ); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize( + capture_method: nil, + persistent_token: nil, + setup_future_usage: nil + ); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit) + } + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Alipay) + } + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Bancontact) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Card) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance) + } + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Ideal) + } + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Klarna) + } + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Link) + } + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Oxxo) + } + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::P24) + } + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal) + } + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit) + } + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Sofort) + } + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::WechatPay) + } + attr_accessor :wechat_pay + sig { + params(acss_debit: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AcssDebit, afterpay_clearpay: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay, alipay: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Alipay, bancontact: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Bancontact, card: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Card, customer_balance: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance, ideal: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Ideal, klarna: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Klarna, link: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Link, oxxo: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Oxxo, p24: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::P24, paypal: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Paypal, sepa_debit: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::SepaDebit, sofort: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::Sofort, wechat_pay: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions::WechatPay).void + } + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # ID of the Connected account receiving the transfer. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + sig { returns(Integer) } + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + sig { returns(String) } + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + sig { returns(::Stripe::OrderService::CreateParams::Payment::Settings::TransferData) } + attr_accessor :transfer_data + sig { + params(application_fee_amount: Integer, payment_method_options: ::Stripe::OrderService::CreateParams::Payment::Settings::PaymentMethodOptions, payment_method_types: T::Array[String], return_url: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::OrderService::CreateParams::Payment::Settings::TransferData).void + } + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ); end + end + # Settings describing how the order should configure generated PaymentIntents. + sig { returns(::Stripe::OrderService::CreateParams::Payment::Settings) } + attr_accessor :settings + sig { params(settings: ::Stripe::OrderService::CreateParams::Payment::Settings).void } + def initialize(settings: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::OrderService::CreateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The shipping address for the order. + sig { returns(::Stripe::OrderService::CreateParams::ShippingDetails::Address) } + attr_accessor :address + # The name of the recipient of the order. + sig { returns(String) } + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::OrderService::CreateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + sig { returns(T::Array[::Stripe::OrderService::CreateParams::TaxDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::OrderService::CreateParams::TaxDetails::TaxId]).void + } + def initialize(tax_exempt: nil, tax_ids: nil); end + end + # Settings for automatic tax calculation for this order. + sig { returns(::Stripe::OrderService::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + sig { returns(T.nilable(::Stripe::OrderService::CreateParams::BillingDetails)) } + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. + sig { returns(T.nilable(T::Array[::Stripe::OrderService::CreateParams::Credit])) } + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The customer associated with this order. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. + sig { returns(T.nilable(T::Array[::Stripe::OrderService::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The IP address of the purchaser for this order. + sig { returns(String) } + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::OrderService::CreateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + sig { returns(::Stripe::OrderService::CreateParams::Payment) } + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + sig { returns(T.nilable(::Stripe::OrderService::CreateParams::ShippingCost)) } + attr_accessor :shipping_cost + # Shipping details for the order. + sig { returns(T.nilable(::Stripe::OrderService::CreateParams::ShippingDetails)) } + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + sig { returns(::Stripe::OrderService::CreateParams::TaxDetails) } + attr_accessor :tax_details + sig { + params(automatic_tax: ::Stripe::OrderService::CreateParams::AutomaticTax, billing_details: T.nilable(::Stripe::OrderService::CreateParams::BillingDetails), credits: T.nilable(T::Array[::Stripe::OrderService::CreateParams::Credit]), currency: String, customer: String, description: String, discounts: T.nilable(T::Array[::Stripe::OrderService::CreateParams::Discount]), expand: T::Array[String], ip_address: String, line_items: T::Array[::Stripe::OrderService::CreateParams::LineItem], metadata: T::Hash[String, String], payment: ::Stripe::OrderService::CreateParams::Payment, shipping_cost: T.nilable(::Stripe::OrderService::CreateParams::ShippingCost), shipping_details: T.nilable(::Stripe::OrderService::CreateParams::ShippingDetails), tax_details: ::Stripe::OrderService::CreateParams::TaxDetails).void + } + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enable automatic tax calculation which will automatically compute tax rates on this order. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address provided by the customer. + sig { returns(::Stripe::OrderService::UpdateParams::BillingDetails::Address) } + attr_accessor :address + # The billing email provided by the customer. + sig { returns(String) } + attr_accessor :email + # The billing name provided by the customer. + sig { returns(String) } + attr_accessor :name + # The billing phone number provided by the customer. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::OrderService::UpdateParams::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Credit < Stripe::RequestParams + # The gift card to apply to the order. + sig { returns(String) } + attr_accessor :gift_card + # The type of credit to apply to the order, only `gift_card` currently supported. + sig { returns(String) } + attr_accessor :type + sig { params(gift_card: String, type: String).void } + def initialize(gift_card: nil, type: nil); end + end + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + sig { params(coupon: String, discount: String).void } + def initialize(coupon: nil, discount: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the product this price belongs to. + # + # Use this to implement a variable-pricing model in your integration. This is required if `product_data` is not specified. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class ProductData < Stripe::RequestParams + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } + attr_accessor :description + # A unique identifier for this product. + # + # `product_data` automatically creates a Product with this ID. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. If any of the fields in the existing Product are different from the values in `product_data`, `product_data` updates the existing Product with the new information. So set `product_data[id]` to the same string every time you sell the same product, but don't re-use the same string for different products. + sig { returns(String) } + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :images + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::LineItem::ProductData::PackageDimensions)) + } + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } + attr_accessor :url + sig { + params(description: T.nilable(String), id: String, images: T.nilable(T::Array[String]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::OrderService::UpdateParams::LineItem::ProductData::PackageDimensions), shippable: T::Boolean, tax_code: T.nilable(String), url: T.nilable(String)).void + } + def initialize( + description: nil, + id: nil, + images: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + tax_code: nil, + url: nil + ); end + end + # The description for the line item. Will default to the name of the associated product. + sig { returns(String) } + attr_accessor :description + # The discounts applied to this line item. + sig { + returns(T.nilable(T::Array[::Stripe::OrderService::UpdateParams::LineItem::Discount])) + } + attr_accessor :discounts + # The ID of an existing line item on the order. + sig { returns(String) } + attr_accessor :id + # The ID of a [Price](https://stripe.com/docs/api/prices) to add to the Order. + # + # The `price` parameter is an alternative to using the `product` parameter. If each of your products are sold at a single price, you can set `Product.default_price` and then pass the `product` parameter when creating a line item. If your products are sold at several possible prices, use the `price` parameter to explicitly specify which one to use. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new Price object inline. + # + # The `price_data` parameter is an alternative to using the `product` or `price` parameters. If you create products upfront and configure a `Product.default_price`, pass the `product` parameter when creating a line item. If you prefer not to define products upfront, or if you charge variable prices, pass the `price_data` parameter to describe the price for this line item. + # + # Each time you pass `price_data` we create a Price for the product. This Price is hidden in both the Dashboard and API lists and cannot be reused. + sig { returns(::Stripe::OrderService::UpdateParams::LineItem::PriceData) } + attr_accessor :price_data + # The ID of a [Product](https://stripe.com/docs/api/products) to add to the Order. + # + # The product must have a `default_price` specified. Otherwise, specify the price by passing the `price` or `price_data` parameter. + sig { returns(String) } + attr_accessor :product + # Defines a Product inline and adds it to the Order. + # + # `product_data` is an alternative to the `product` parameter. If you created a Product upfront, use the `product` parameter to refer to the existing Product. But if you prefer not to create Products upfront, pass the `product_data` parameter to define a Product inline as part of configuring the Order. + # + # `product_data` automatically creates a Product, just as if you had manually created the Product. If a Product with the same ID already exists, then `product_data` re-uses it to avoid duplicates. + sig { returns(::Stripe::OrderService::UpdateParams::LineItem::ProductData) } + attr_accessor :product_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates applied to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(description: String, discounts: T.nilable(T::Array[::Stripe::OrderService::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::OrderService::UpdateParams::LineItem::PriceData, product: String, product_data: ::Stripe::OrderService::UpdateParams::LineItem::ProductData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + description: nil, + discounts: nil, + id: nil, + price: nil, + price_data: nil, + product: nil, + product_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class Payment < Stripe::RequestParams + class Settings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(String) } + attr_accessor :capture_method + # An internal identifier or reference this payment corresponds to. The identifier is limited to 128 characters and may contain only letters, digits, underscores, backslashes and dashes. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: String, reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with the payment method. + # + # Providing this parameter will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the order's Customer, if present, after the order's PaymentIntent is confirmed and any required actions from the user are complete. If no Customer was provided, the payment method can still be [attached](https://stripe.com/docs/api/payment_methods/attach) to a Customer after the transaction completes. + # + # When processing card payments, Stripe also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as [SCA](https://stripe.com/docs/strong-customer-authentication). + # + # If `setup_future_usage` is already set and you are performing a request using a publishable key, you may only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: String, setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize( + capture_method: nil, + preferred_locale: nil, + setup_future_usage: nil + ); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize( + capture_method: nil, + persistent_token: nil, + setup_future_usage: nil + ); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + # If paying by `acss_debit`, this sub-hash contains details about the ACSS Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If paying by `afterpay_clearpay`, this sub-hash contains details about the AfterpayClearpay payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If paying by `alipay`, this sub-hash contains details about the Alipay payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If paying by `bancontact`, this sub-hash contains details about the Bancontact payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If paying by `card`, this sub-hash contains details about the Card payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If paying by `customer_balance`, this sub-hash contains details about the Customer Balance payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If paying by `ideal`, this sub-hash contains details about the iDEAL payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If paying by `klarna`, this sub-hash contains details about the Klarna payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If paying by `link`, this sub-hash contains details about the Link payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If paying by `oxxo`, this sub-hash contains details about the OXXO payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If paying by `p24`, this sub-hash contains details about the P24 payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::P24)) + } + attr_accessor :p24 + # If paying by `paypal`, this sub-hash contains details about the PayPal payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If paying by `sepa_debit`, this sub-hash contains details about the SEPA Debit payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If paying by `sofort`, this sub-hash contains details about the Sofort payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If paying by `wechat_pay`, this sub-hash contains details about the WeChat Pay payment method options to pass to the order's PaymentIntent. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + sig { + params(acss_debit: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AcssDebit), afterpay_clearpay: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Alipay), bancontact: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::CustomerBalance), ideal: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Ideal), klarna: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Klarna), link: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Link), oxxo: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::P24), paypal: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Paypal), sepa_debit: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::SepaDebit), sofort: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::Sofort), wechat_pay: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions::WechatPay)).void + } + def initialize( + acss_debit: nil, + afterpay_clearpay: nil, + alipay: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + ideal: nil, + klarna: nil, + link: nil, + oxxo: nil, + p24: nil, + paypal: nil, + sepa_debit: nil, + sofort: nil, + wechat_pay: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the order is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # ID of the Connected account receiving the transfer. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # PaymentMethod-specific configuration to provide to the order's PaymentIntent. + sig { + returns(::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # The list of [payment method types](https://stripe.com/docs/payments/payment-methods/overview) to provide to the order's PaymentIntent. Do not include this attribute if you prefer to manage your payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # The URL to redirect the customer to after they authenticate their payment. + sig { returns(T.nilable(String)) } + attr_accessor :return_url + # For non-card charges, you can use this value as the complete description that appears on your customers' statements. Must contain at least one letter, maximum 22 characters. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card payment that customers see on their statements. Concatenated with the prefix (shortened descriptor) or statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters for the concatenated descriptor. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # Provides configuration for completing a transfer for the order after it is paid. + sig { + returns(T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::TransferData)) + } + attr_accessor :transfer_data + sig { + params(application_fee_amount: T.nilable(Integer), payment_method_options: ::Stripe::OrderService::UpdateParams::Payment::Settings::PaymentMethodOptions, payment_method_types: T::Array[String], return_url: T.nilable(String), statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: T.nilable(::Stripe::OrderService::UpdateParams::Payment::Settings::TransferData)).void + } + def initialize( + application_fee_amount: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ); end + end + # Settings describing how the order should configure generated PaymentIntents. + sig { returns(::Stripe::OrderService::UpdateParams::Payment::Settings) } + attr_accessor :settings + sig { params(settings: ::Stripe::OrderService::UpdateParams::Payment::Settings).void } + def initialize(settings: nil); end + end + class ShippingCost < Stripe::RequestParams + class ShippingRateData < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { + returns(::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum) + } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { + returns(::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum) + } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Maximum, minimum: ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { + returns(::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate) + } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { + returns(::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount) + } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::DeliveryEstimate, display_name: String, fixed_amount: ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + # The ID of the shipping rate to use for this order. + sig { returns(String) } + attr_accessor :shipping_rate + # Parameters to create a new ad-hoc shipping rate for this order. + sig { returns(::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData) } + attr_accessor :shipping_rate_data + sig { + params(shipping_rate: String, shipping_rate_data: ::Stripe::OrderService::UpdateParams::ShippingCost::ShippingRateData).void + } + def initialize(shipping_rate: nil, shipping_rate_data: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The shipping address for the order. + sig { returns(::Stripe::OrderService::UpdateParams::ShippingDetails::Address) } + attr_accessor :address + # The name of the recipient of the order. + sig { returns(String) } + attr_accessor :name + # The phone number (including extension) for the recipient of the order. + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::OrderService::UpdateParams::ShippingDetails::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + class TaxDetails < Stripe::RequestParams + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The purchaser's tax exemption status. One of `none`, `exempt`, or `reverse`. + sig { returns(T.nilable(String)) } + attr_accessor :tax_exempt + # The purchaser's tax IDs to be used for this order. + sig { returns(T::Array[::Stripe::OrderService::UpdateParams::TaxDetails::TaxId]) } + attr_accessor :tax_ids + sig { + params(tax_exempt: T.nilable(String), tax_ids: T::Array[::Stripe::OrderService::UpdateParams::TaxDetails::TaxId]).void + } + def initialize(tax_exempt: nil, tax_ids: nil); end + end + # Settings for automatic tax calculation for this order. + sig { returns(::Stripe::OrderService::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Billing details for the customer. If a customer is provided, this will be automatically populated with values from that customer if override values are not provided. + sig { returns(T.nilable(::Stripe::OrderService::UpdateParams::BillingDetails)) } + attr_accessor :billing_details + # The credits to apply to the order, only `gift_card` currently supported. Pass the empty string `""` to unset this field. + sig { returns(T.nilable(T::Array[::Stripe::OrderService::UpdateParams::Credit])) } + attr_accessor :credits + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The customer associated with this order. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons, promotion codes, and/or discounts to apply to the order. Pass the empty string `""` to unset this field. + sig { returns(T.nilable(T::Array[::Stripe::OrderService::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The IP address of the purchaser for this order. + sig { returns(String) } + attr_accessor :ip_address + # A list of line items the customer is ordering. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::OrderService::UpdateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Payment information associated with the order, including payment settings. + sig { returns(::Stripe::OrderService::UpdateParams::Payment) } + attr_accessor :payment + # Settings for the customer cost of shipping for this order. + sig { returns(T.nilable(::Stripe::OrderService::UpdateParams::ShippingCost)) } + attr_accessor :shipping_cost + # Shipping details for the order. + sig { returns(T.nilable(::Stripe::OrderService::UpdateParams::ShippingDetails)) } + attr_accessor :shipping_details + # Additional tax details about the purchaser to be used for this order. + sig { returns(::Stripe::OrderService::UpdateParams::TaxDetails) } + attr_accessor :tax_details + sig { + params(automatic_tax: ::Stripe::OrderService::UpdateParams::AutomaticTax, billing_details: T.nilable(::Stripe::OrderService::UpdateParams::BillingDetails), credits: T.nilable(T::Array[::Stripe::OrderService::UpdateParams::Credit]), currency: String, customer: String, description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::OrderService::UpdateParams::Discount]), expand: T::Array[String], ip_address: String, line_items: T::Array[::Stripe::OrderService::UpdateParams::LineItem], metadata: T.nilable(T::Hash[String, String]), payment: ::Stripe::OrderService::UpdateParams::Payment, shipping_cost: T.nilable(::Stripe::OrderService::UpdateParams::ShippingCost), shipping_details: T.nilable(::Stripe::OrderService::UpdateParams::ShippingDetails), tax_details: ::Stripe::OrderService::UpdateParams::TaxDetails).void + } + def initialize( + automatic_tax: nil, + billing_details: nil, + credits: nil, + currency: nil, + customer: nil, + description: nil, + discounts: nil, + expand: nil, + ip_address: nil, + line_items: nil, + metadata: nil, + payment: nil, + shipping_cost: nil, + shipping_details: nil, + tax_details: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReopenParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SubmitParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # `expected_total` should always be set to the order's `amount_total` field. If they don't match, submitting the order will fail. This helps detect race conditions where something else concurrently modifies the order. + sig { returns(Integer) } + attr_accessor :expected_total + sig { params(expand: T::Array[String], expected_total: Integer).void } + def initialize(expand: nil, expected_total: nil); end + end + # Cancels the order as well as the payment intent if one is attached. + sig { + params(id: String, params: T.any(::Stripe::OrderService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def cancel(id, params = {}, opts = {}); end + + # Creates a new open order object. + sig { + params(params: T.any(::Stripe::OrderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def create(params = {}, opts = {}); end + + # Returns a list of your orders. The orders are returned sorted by creation date, with the most recently created orders appearing first. + sig { + params(params: T.any(::Stripe::OrderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Reopens a submitted order. + sig { + params(id: String, params: T.any(::Stripe::OrderService::ReopenParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def reopen(id, params = {}, opts = {}); end + + # Retrieves the details of an existing order. Supply the unique order ID from either an order creation request or the order list, and Stripe will return the corresponding order information. + sig { + params(id: String, params: T.any(::Stripe::OrderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def retrieve(id, params = {}, opts = {}); end + + # Submitting an Order transitions the status to processing and creates a PaymentIntent object so the order can be paid. If the Order has an amount_total of 0, no PaymentIntent object will be created. Once the order is submitted, its contents cannot be changed, unless the [reopen](https://stripe.com/docs/api#reopen_order) method is called. + sig { + params(id: String, params: T.any(::Stripe::OrderService::SubmitParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def submit(id, params = {}, opts = {}); end + + # Updates the specific order by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::OrderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Order) + } + def update(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_attempt_record_service.rbi b/rbi/stripe/services/payment_attempt_record_service.rbi new file mode 100644 index 000000000..1e033d02b --- /dev/null +++ b/rbi/stripe/services/payment_attempt_record_service.rbi @@ -0,0 +1,36 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentAttemptRecordService < StripeService + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The ID of the Payment Record. + sig { returns(String) } + attr_accessor :payment_record + sig { params(expand: T::Array[String], payment_record: String).void } + def initialize(expand: nil, payment_record: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # List all the Payment Attempt Records attached to the specified Payment Record. + sig { + params(params: T.any(::Stripe::PaymentAttemptRecordService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Payment Attempt Record with the given ID + sig { + params(id: String, params: T.any(::Stripe::PaymentAttemptRecordService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentAttemptRecord) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_intent_service.rbi b/rbi/stripe/services/payment_intent_service.rbi new file mode 100644 index 000000000..9ec9da448 --- /dev/null +++ b/rbi/stripe/services/payment_intent_service.rbi @@ -0,0 +1,11429 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentIntentService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp or a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::PaymentIntentService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return PaymentIntents for the customer that this customer ID specifies. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::PaymentIntentService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { returns(::Stripe::PaymentIntentService::CreateParams::AsyncWorkflows::Inputs::Tax) } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntentService::CreateParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntentService::CreateParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntentService::CreateParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this PaymentIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/payment_intents/confirm) this PaymentIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the payment. + sig { returns(String) } + attr_accessor :allow_redirects + # Whether this feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allow_redirects: String, enabled: T::Boolean).void } + def initialize(allow_redirects: nil, enabled: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance) + } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::PaymentIntentService::CreateParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Affiliate) + } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Delivery) + } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Address) + } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Delivery) + } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AuBecsDebit) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RadarOptions) + } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Blik, boleto: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Eps, fpx: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Fpx, giropay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Giropay, gopay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Klarna, konbini: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::KrCard, link: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Link, mb_way: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Oxxo, p24: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::P24, payco: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payco, paynow: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paynow, paypal: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Paypal, payto: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Payto, pix: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Pix, promptpay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Promptpay, qris: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Qris, radar_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Sofort, swish: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Swish, twint: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::WechatPay, zip: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + sig { returns(String) } + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(code: String, setup_future_usage: T.nilable(String)).void } + def initialize(code: nil, setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: T.nilable(String)).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Please pass in an address that is within your Stripe user account country + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::StatementDetails::Address) + } + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::StatementDetails::Address, phone: String).void + } + def initialize(address: nil, phone: nil); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + sig { returns(String) } + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, exemption_indicator: String, network_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + sig { returns(String) } + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + sig { returns(T::Boolean) } + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::StatementDetails)) + } + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(capture_method: T.nilable(String), cvc_token: String, installments: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::Installments, mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_partial_authorization: String, request_three_d_secure: String, require_cvc_recollection: T::Boolean, setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String), statement_details: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::StatementDetails), three_d_secure: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + sig { returns(String) } + attr_accessor :requested_priority + sig { params(requested_priority: String).void } + def initialize(requested_priority: nil); end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + sig { returns(T::Boolean) } + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + sig { returns(T::Boolean) } + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent::Routing) + } + attr_accessor :routing + sig { + params(request_extended_authorization: T::Boolean, request_incremental_authorization_support: T::Boolean, routing: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent::Routing).void + } + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + sig { returns(Integer) } + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + sig { returns(T.nilable(String)) } + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(confirmation_number: T.nilable(String), expires_after_days: T.nilable(Integer), expires_at: T.nilable(Integer), product_description: T.nilable(String), setup_future_usage: String).void + } + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end + end + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: T.nilable(String), setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ); end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after_seconds: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end + end + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Rechnung < Stripe::RequestParams + + end + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + sig { returns(T.nilable(String)) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(reference: T.nilable(String), setup_future_usage: String).void } + def initialize(reference: nil, setup_future_usage: nil); end + end + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Preferred transaction settlement speed + sig { returns(T.nilable(String)) } + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Affirm)) + } + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alma)) + } + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AmazonPay)) + } + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AuBecsDebit)) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit)) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Blik)) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Boleto)) + } + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp)) + } + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Eps)) + } + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Fpx)) + } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Giropay)) + } + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Gopay)) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Grabpay)) + } + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::InteracPresent)) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KakaoPay)) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KrCard)) + } + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::MbWay)) + } + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Mobilepay)) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Multibanco)) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NaverPay)) + } + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::P24)) + } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payco)) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paynow)) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payto)) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Pix)) + } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Promptpay)) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Qris)) + } + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Rechnung)) + } + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::RevolutPay)) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SamsungPay)) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Shopeepay)) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Swish)) + } + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Twint)) + } + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Zip)) + } + attr_accessor :zip + sig { + params(acss_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alipay), alma: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Bancontact), blik: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CardPresent), cashapp: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Giropay), gopay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Gopay), grabpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Grabpay), id_bank_transfer: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::IdBankTransfer), ideal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Link), mb_way: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::MbWay), mobilepay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::P24), payco: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Paypal), payto: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Payto), pix: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Promptpay), qris: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Qris), rechnung: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Rechnung), revolut_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::SepaDebit), shopeepay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Shopeepay), sofort: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Swish), twint: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Twint), us_bank_account: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions::Zip)).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::PaymentIntentService::CreateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::PaymentIntentService::CreateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + # The amount is capped at the total transaction amount and if no amount is set, + # the full amount is transferred. + # + # If you intend to collect a fee and you need a more robust reporting experience, using + # [application_fee_amount](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-application_fee_amount) + # might be a better fit for your integration. + sig { returns(Integer) } + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntentService::CreateParams::AsyncWorkflows) } + attr_accessor :async_workflows + # When you enable this parameter, this PaymentIntent accepts payment methods that you enable in the Dashboard and that are compatible with this PaymentIntent's other parameters. + sig { returns(::Stripe::PaymentIntentService::CreateParams::AutomaticPaymentMethods) } + attr_accessor :automatic_payment_methods + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Set to `true` to attempt to [confirm this PaymentIntent](https://stripe.com/docs/api/payment_intents/confirm) immediately. This parameter defaults to `false`. When creating and confirming a PaymentIntent at the same time, you can also provide the parameters available in the [Confirm API](https://stripe.com/docs/api/payment_intents/confirm). + sig { returns(T::Boolean) } + attr_accessor :confirm + # Describes whether we can confirm this PaymentIntent automatically, or if it requires customer action to confirm the payment. + sig { returns(String) } + attr_accessor :confirmation_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. Use this parameter for simpler integrations that don't handle customer actions, such as [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(T::Boolean) } + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the mandate that's used for this payment. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(String) } + attr_accessor :mandate + # This hash contains details about the Mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(T.nilable(::Stripe::PaymentIntentService::CreateParams::MandateData)) } + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(T.any(T::Boolean, String)) } + attr_accessor :off_session + # The Stripe account ID that these funds are intended for. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(String) } + attr_accessor :on_behalf_of + # Provides industry-specific information about the charge. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentDetails) } + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods#compatibility) object) to attach to this PaymentIntent. + # + # If you don't provide the `payment_method` parameter or the `source` parameter with `confirm=true`, `source` automatically populates with `customer.default_source` to improve migration for users of the Charges API. We recommend that you explicitly provide the `payment_method` moving forward. + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + sig { returns(::Stripe::PaymentIntentService::CreateParams::RadarOptions) } + attr_accessor :radar_options + # Email address to send the receipt to. If you specify `receipt_email` for a payment in live mode, you send a receipt regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(String) } + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-confirm). + sig { returns(String) } + attr_accessor :return_url + # Indicates whether confirmation for this PaymentIntent using a secret key is `required` or `optional`. + sig { returns(String) } + attr_accessor :secret_key_confirmation + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(String) } + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::CreateParams::Shipping) } + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a Transfer. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntentService::CreateParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. Learn more about the [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers). + sig { returns(String) } + attr_accessor :transfer_group + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(amount: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntentService::CreateParams::AsyncWorkflows, automatic_payment_methods: ::Stripe::PaymentIntentService::CreateParams::AutomaticPaymentMethods, capture_method: String, confirm: T::Boolean, confirmation_method: String, confirmation_token: String, currency: String, customer: String, description: String, error_on_requires_action: T::Boolean, expand: T::Array[String], mandate: String, mandate_data: T.nilable(::Stripe::PaymentIntentService::CreateParams::MandateData), metadata: T::Hash[String, String], off_session: T.any(T::Boolean, String), on_behalf_of: String, payment_details: ::Stripe::PaymentIntentService::CreateParams::PaymentDetails, payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodData, payment_method_options: ::Stripe::PaymentIntentService::CreateParams::PaymentMethodOptions, payment_method_types: T::Array[String], radar_options: ::Stripe::PaymentIntentService::CreateParams::RadarOptions, receipt_email: String, return_url: String, secret_key_confirmation: String, setup_future_usage: String, shipping: ::Stripe::PaymentIntentService::CreateParams::Shipping, statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::PaymentIntentService::CreateParams::TransferData, transfer_group: String, use_stripe_sdk: T::Boolean).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + automatic_payment_methods: nil, + capture_method: nil, + confirm: nil, + confirmation_method: nil, + confirmation_token: nil, + currency: nil, + customer: nil, + description: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + secret_key_confirmation: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil, + use_stripe_sdk: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # The client secret of the PaymentIntent. We require it if you use a publishable key to retrieve the source. + sig { returns(String) } + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(client_secret: String, expand: T::Array[String]).void } + def initialize(client_secret: nil, expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { returns(::Stripe::PaymentIntentService::UpdateParams::AsyncWorkflows::Inputs::Tax) } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntentService::UpdateParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntentService::UpdateParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntentService::UpdateParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. + sig { returns(String) } + attr_accessor :type + sig { + params(online: ::Stripe::PaymentIntentService::UpdateParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::MandateData::CustomerAcceptance) + } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::PaymentIntentService::UpdateParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Affiliate) + } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Delivery) + } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Address) + } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Delivery) + } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntentService::UpdateParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AuBecsDebit) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RadarOptions) + } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Blik, boleto: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Eps, fpx: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Fpx, giropay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Giropay, gopay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Klarna, konbini: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::KrCard, link: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Link, mb_way: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Oxxo, p24: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::P24, payco: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payco, paynow: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paynow, paypal: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Paypal, payto: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Payto, pix: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Pix, promptpay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Promptpay, qris: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Qris, radar_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Sofort, swish: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Swish, twint: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::WechatPay, zip: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + sig { returns(String) } + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(code: String, setup_future_usage: T.nilable(String)).void } + def initialize(code: nil, setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: T.nilable(String)).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Please pass in an address that is within your Stripe user account country + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::StatementDetails::Address) + } + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::StatementDetails::Address, phone: String).void + } + def initialize(address: nil, phone: nil); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + sig { returns(String) } + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, exemption_indicator: String, network_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + sig { returns(String) } + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + sig { returns(T::Boolean) } + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::StatementDetails)) + } + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(capture_method: T.nilable(String), cvc_token: String, installments: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::Installments, mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_partial_authorization: String, request_three_d_secure: String, require_cvc_recollection: T::Boolean, setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String), statement_details: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::StatementDetails), three_d_secure: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + sig { returns(String) } + attr_accessor :requested_priority + sig { params(requested_priority: String).void } + def initialize(requested_priority: nil); end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + sig { returns(T::Boolean) } + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + sig { returns(T::Boolean) } + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent::Routing) + } + attr_accessor :routing + sig { + params(request_extended_authorization: T::Boolean, request_incremental_authorization_support: T::Boolean, routing: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent::Routing).void + } + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + sig { returns(Integer) } + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + sig { returns(T.nilable(String)) } + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(confirmation_number: T.nilable(String), expires_after_days: T.nilable(Integer), expires_at: T.nilable(Integer), product_description: T.nilable(String), setup_future_usage: String).void + } + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end + end + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: T.nilable(String), setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ); end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after_seconds: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end + end + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Rechnung < Stripe::RequestParams + + end + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + sig { returns(T.nilable(String)) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(reference: T.nilable(String), setup_future_usage: String).void } + def initialize(reference: nil, setup_future_usage: nil); end + end + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Preferred transaction settlement speed + sig { returns(T.nilable(String)) } + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Affirm)) + } + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alma)) + } + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AmazonPay)) + } + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AuBecsDebit)) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit)) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Blik)) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Boleto)) + } + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp)) + } + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Eps)) + } + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Fpx)) + } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Giropay)) + } + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Gopay)) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Grabpay)) + } + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::InteracPresent)) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KakaoPay)) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KrCard)) + } + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::MbWay)) + } + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Mobilepay)) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Multibanco)) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NaverPay)) + } + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::P24)) + } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payco)) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paynow)) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payto)) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Pix)) + } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Promptpay)) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Qris)) + } + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Rechnung)) + } + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::RevolutPay)) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SamsungPay)) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Shopeepay)) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Swish)) + } + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Twint)) + } + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Zip)) + } + attr_accessor :zip + sig { + params(acss_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alipay), alma: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Bancontact), blik: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CardPresent), cashapp: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Giropay), gopay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Gopay), grabpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Grabpay), id_bank_transfer: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::IdBankTransfer), ideal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Link), mb_way: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::MbWay), mobilepay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::P24), payco: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Paypal), payto: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Payto), pix: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Promptpay), qris: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Qris), rechnung: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Rechnung), revolut_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::SepaDebit), shopeepay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Shopeepay), sofort: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Swish), twint: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Twint), us_bank_account: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions::Zip)).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::PaymentIntentService::UpdateParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # Amount intended to be collected by this PaymentIntent. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntentService::UpdateParams::AsyncWorkflows) } + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the Customer this PaymentIntent belongs to, if one exists. + # + # Payment methods attached to other Customers cannot be used with this PaymentIntent. + # + # If [setup_future_usage](https://stripe.com/docs/api#payment_intent_object-setup_future_usage) is set and this PaymentIntent's payment method is not `card_present`, then the payment method attaches to the Customer after the PaymentIntent has been confirmed and any required actions from the user are complete. If the payment method is `card_present` and isn't a digital wallet, then a [generated_card](https://docs.stripe.com/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card is created and attached to the Customer instead. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # This hash contains details about the Mandate to create. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::MandateData) } + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails)) } + attr_accessor :payment_details + # Attribute for param field payment_method + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this PaymentIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment-method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(T.nilable(String)) } + attr_accessor :receipt_email + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + sig { returns(T.nilable(::Stripe::PaymentIntentService::UpdateParams::Shipping)) } + attr_accessor :shipping + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # Use this parameter to automatically create a Transfer when the payment succeeds. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntentService::UpdateParams::TransferData) } + attr_accessor :transfer_data + # A string that identifies the resulting payment as part of a group. You can only provide `transfer_group` if it hasn't been set. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, application_fee_amount: T.nilable(Integer), async_workflows: ::Stripe::PaymentIntentService::UpdateParams::AsyncWorkflows, capture_method: String, currency: String, customer: String, description: String, expand: T::Array[String], mandate_data: ::Stripe::PaymentIntentService::UpdateParams::MandateData, metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntentService::UpdateParams::PaymentDetails), payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodData, payment_method_options: ::Stripe::PaymentIntentService::UpdateParams::PaymentMethodOptions, payment_method_types: T::Array[String], receipt_email: T.nilable(String), setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::PaymentIntentService::UpdateParams::Shipping), statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::PaymentIntentService::UpdateParams::TransferData, transfer_group: String).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + currency: nil, + customer: nil, + description: nil, + expand: nil, + mandate_data: nil, + metadata: nil, + payment_details: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + receipt_email: nil, + setup_future_usage: nil, + shipping: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil, + transfer_group: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for payment intents](https://stripe.com/docs/search#query-fields-for-payment-intents). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class ApplyCustomerBalanceParams < Stripe::RequestParams + # Amount that you intend to apply to this PaymentIntent from the customer’s cash balance. If the PaymentIntent was created by an Invoice, the full amount of the PaymentIntent is applied regardless of this parameter. + # + # A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (for example, 100 cents to charge 1 USD or 100 to charge 100 JPY, a zero-decimal currency). The maximum amount is the amount of the PaymentIntent. + # + # When you omit the amount, it defaults to the remaining amount requested on the PaymentIntent. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(amount: Integer, currency: String, expand: T::Array[String]).void } + def initialize(amount: nil, currency: nil, expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Reason for canceling this PaymentIntent. Possible values are: `duplicate`, `fraudulent`, `requested_by_customer`, or `abandoned` + sig { returns(String) } + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(cancellation_reason: String, expand: T::Array[String]).void } + def initialize(cancellation_reason: nil, expand: nil); end + end + class CaptureParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::AsyncWorkflows::Inputs::Tax) + } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntentService::CaptureParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntentService::CaptureParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntentService::CaptureParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Affiliate) + } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Delivery) + } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Address) + } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Delivery) + } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntentService::CaptureParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The amount to capture from the PaymentIntent, which must be less than or equal to the original amount. Any additional amount is automatically refunded. Defaults to the full `amount_capturable` if it's not provided. + sig { returns(Integer) } + attr_accessor :amount_to_capture + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntentService::CaptureParams::AsyncWorkflows) } + attr_accessor :async_workflows + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Defaults to `true`. When capturing a PaymentIntent, setting `final_capture` to `false` notifies Stripe to not release the remaining uncaptured funds to make sure that they're captured in future requests. You can only use this setting when [multicapture](https://stripe.com/docs/payments/multicapture) is available for PaymentIntents. + sig { returns(T::Boolean) } + attr_accessor :final_capture + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Provides industry-specific information about the charge. + sig { returns(T.nilable(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails)) } + attr_accessor :payment_details + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # The parameters that you can use to automatically create a transfer after the payment + # is captured. Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntentService::CaptureParams::TransferData) } + attr_accessor :transfer_data + sig { + params(amount_to_capture: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntentService::CaptureParams::AsyncWorkflows, expand: T::Array[String], final_capture: T::Boolean, metadata: T.nilable(T::Hash[String, String]), payment_details: T.nilable(::Stripe::PaymentIntentService::CaptureParams::PaymentDetails), statement_descriptor: String, statement_descriptor_suffix: String, transfer_data: ::Stripe::PaymentIntentService::CaptureParams::TransferData).void + } + def initialize( + amount_to_capture: nil, + application_fee_amount: nil, + async_workflows: nil, + expand: nil, + final_capture: nil, + metadata: nil, + payment_details: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_data: nil + ); end + end + class ConfirmParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::AsyncWorkflows::Inputs::Tax) + } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntentService::ConfirmParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::AsyncWorkflows::Inputs) } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntentService::ConfirmParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance) + } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::PaymentIntentService::ConfirmParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentDetails < Stripe::RequestParams + class CarRental < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Driver < Stripe::RequestParams + # Full name of the person or entity on the car reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PickupAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class ReturnAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the car rental. + sig { returns(String) } + attr_accessor :booking_number + # Class code of the car. + sig { returns(String) } + attr_accessor :car_class_code + # Make of the car. + sig { returns(String) } + attr_accessor :car_make + # Model of the car. + sig { returns(String) } + attr_accessor :car_model + # The name of the rental car company. + sig { returns(String) } + attr_accessor :company + # The customer service phone number of the car rental company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # Number of days the car is being rented. + sig { returns(Integer) } + attr_accessor :days_rented + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Delivery) + } + attr_accessor :delivery + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Driver]) + } + attr_accessor :drivers + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates if the customer did not keep nor cancel their booking. + sig { returns(T::Boolean) } + attr_accessor :no_show + # Car pick-up address. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::PickupAddress) + } + attr_accessor :pickup_address + # Car pick-up time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :pickup_at + # Rental rate. + sig { returns(Integer) } + attr_accessor :rate_amount + # The frequency at which the rate amount is applied. One of `day`, `week` or `month` + sig { returns(String) } + attr_accessor :rate_interval + # The name of the person or entity renting the car. + sig { returns(String) } + attr_accessor :renter_name + # Car return address. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::ReturnAddress) + } + attr_accessor :return_address + # Car return time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :return_at + # Indicates whether the goods or services are tax-exempt or tax is not collected. + sig { returns(T::Boolean) } + attr_accessor :tax_exempt + sig { + params(affiliate: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Affiliate, booking_number: String, car_class_code: String, car_make: String, car_model: String, company: String, customer_service_phone_number: String, days_rented: Integer, delivery: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Delivery, drivers: T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::Driver], extra_charges: T::Array[String], no_show: T::Boolean, pickup_address: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::PickupAddress, pickup_at: Integer, rate_amount: Integer, rate_interval: String, renter_name: String, return_address: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental::ReturnAddress, return_at: Integer, tax_exempt: T::Boolean).void + } + def initialize( + affiliate: nil, + booking_number: nil, + car_class_code: nil, + car_make: nil, + car_model: nil, + company: nil, + customer_service_phone_number: nil, + days_rented: nil, + delivery: nil, + drivers: nil, + extra_charges: nil, + no_show: nil, + pickup_address: nil, + pickup_at: nil, + rate_amount: nil, + rate_interval: nil, + renter_name: nil, + return_address: nil, + return_at: nil, + tax_exempt: nil + ); end + end + class EventDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + # Indicates if the tickets are digitally checked when entering the venue. + sig { returns(T::Boolean) } + attr_accessor :access_controlled_venue + # The event location's address. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Address) + } + attr_accessor :address + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Affiliate) + } + attr_accessor :affiliate + # The name of the company + sig { returns(String) } + attr_accessor :company + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Delivery) + } + attr_accessor :delivery + # Event end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Type of the event entertainment (concert, sports event etc) + sig { returns(String) } + attr_accessor :genre + # The name of the event. + sig { returns(String) } + attr_accessor :name + # Event start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(access_controlled_venue: T::Boolean, address: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Address, affiliate: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Affiliate, company: String, delivery: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails::Delivery, ends_at: Integer, genre: String, name: String, starts_at: Integer).void + } + def initialize( + access_controlled_venue: nil, + address: nil, + affiliate: nil, + company: nil, + delivery: nil, + ends_at: nil, + genre: nil, + name: nil, + starts_at: nil + ); end + end + class Flight < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the flight reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Segment < Stripe::RequestParams + # The flight segment amount. + sig { returns(Integer) } + attr_accessor :amount + # The International Air Transport Association (IATA) airport code for the arrival airport. + sig { returns(String) } + attr_accessor :arrival_airport + # The arrival time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :arrives_at + # The International Air Transport Association (IATA) carrier code of the carrier operating the flight segment. + sig { returns(String) } + attr_accessor :carrier + # The departure time for the flight segment. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :departs_at + # The International Air Transport Association (IATA) airport code for the departure airport. + sig { returns(String) } + attr_accessor :departure_airport + # The flight number associated with the segment + sig { returns(String) } + attr_accessor :flight_number + # The fare class for the segment. + sig { returns(String) } + attr_accessor :service_class + sig { + params(amount: Integer, arrival_airport: String, arrives_at: Integer, carrier: String, departs_at: Integer, departure_airport: String, flight_number: String, service_class: String).void + } + def initialize( + amount: nil, + arrival_airport: nil, + arrives_at: nil, + carrier: nil, + departs_at: nil, + departure_airport: nil, + flight_number: nil, + service_class: nil + ); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Affiliate) + } + attr_accessor :affiliate + # The agency number (i.e. International Air Transport Association (IATA) agency number) of the travel agency that made the booking. + sig { returns(String) } + attr_accessor :agency_number + # The International Air Transport Association (IATA) carrier code of the carrier that issued the ticket. + sig { returns(String) } + attr_accessor :carrier + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Delivery) + } + attr_accessor :delivery + # The name of the person or entity on the reservation. + sig { returns(String) } + attr_accessor :passenger_name + # The details of the passengers in the travel reservation. + sig { + returns(T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Passenger]) + } + attr_accessor :passengers + # The individual flight segments associated with the trip. + sig { + returns(T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Segment]) + } + attr_accessor :segments + # The ticket number associated with the travel reservation. + sig { returns(String) } + attr_accessor :ticket_number + sig { + params(affiliate: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Affiliate, agency_number: String, carrier: String, delivery: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Delivery, passenger_name: String, passengers: T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Passenger], segments: T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight::Segment], ticket_number: String).void + } + def initialize( + affiliate: nil, + agency_number: nil, + carrier: nil, + delivery: nil, + passenger_name: nil, + passengers: nil, + segments: nil, + ticket_number: nil + ); end + end + class Lodging < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class Delivery < Stripe::RequestParams + class Recipient < Stripe::RequestParams + # The email of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :email + # The name of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :name + # The phone number of the recipient the ticket is delivered to. + sig { returns(String) } + attr_accessor :phone + sig { params(email: String, name: String, phone: String).void } + def initialize(email: nil, name: nil, phone: nil); end + end + # The delivery method for the payment + sig { returns(String) } + attr_accessor :mode + # Details of the recipient. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Delivery::Recipient) + } + attr_accessor :recipient + sig { + params(mode: String, recipient: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Delivery::Recipient).void + } + def initialize(mode: nil, recipient: nil); end + end + class Passenger < Stripe::RequestParams + # Full name of the person or entity on the lodging reservation. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + # The lodging location's address. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Address) + } + attr_accessor :address + # The number of adults on the booking + sig { returns(Integer) } + attr_accessor :adults + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Affiliate) + } + attr_accessor :affiliate + # The booking number associated with the lodging reservation. + sig { returns(String) } + attr_accessor :booking_number + # The lodging category + sig { returns(String) } + attr_accessor :category + # Loding check-in time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkin_at + # Lodging check-out time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :checkout_at + # The customer service phone number of the lodging company. + sig { returns(String) } + attr_accessor :customer_service_phone_number + # The daily lodging room rate. + sig { returns(Integer) } + attr_accessor :daily_room_rate_amount + # Delivery details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Delivery) + } + attr_accessor :delivery + # List of additional charges being billed. + sig { returns(T::Array[String]) } + attr_accessor :extra_charges + # Indicates whether the lodging location is compliant with the Fire Safety Act. + sig { returns(T::Boolean) } + attr_accessor :fire_safety_act_compliance + # The name of the lodging location. + sig { returns(String) } + attr_accessor :name + # Indicates if the customer did not keep their booking while failing to cancel the reservation. + sig { returns(T::Boolean) } + attr_accessor :no_show + # The number of rooms on the booking + sig { returns(Integer) } + attr_accessor :number_of_rooms + # The details of the passengers in the travel reservation + sig { + returns(T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Passenger]) + } + attr_accessor :passengers + # The phone number of the lodging location. + sig { returns(String) } + attr_accessor :property_phone_number + # The room class for this purchase. + sig { returns(String) } + attr_accessor :room_class + # The number of room nights + sig { returns(Integer) } + attr_accessor :room_nights + # The total tax amount associating with the room reservation. + sig { returns(Integer) } + attr_accessor :total_room_tax_amount + # The total tax amount + sig { returns(Integer) } + attr_accessor :total_tax_amount + sig { + params(address: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Address, adults: Integer, affiliate: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Affiliate, booking_number: String, category: String, checkin_at: Integer, checkout_at: Integer, customer_service_phone_number: String, daily_room_rate_amount: Integer, delivery: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Delivery, extra_charges: T::Array[String], fire_safety_act_compliance: T::Boolean, name: String, no_show: T::Boolean, number_of_rooms: Integer, passengers: T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging::Passenger], property_phone_number: String, room_class: String, room_nights: Integer, total_room_tax_amount: Integer, total_tax_amount: Integer).void + } + def initialize( + address: nil, + adults: nil, + affiliate: nil, + booking_number: nil, + category: nil, + checkin_at: nil, + checkout_at: nil, + customer_service_phone_number: nil, + daily_room_rate_amount: nil, + delivery: nil, + extra_charges: nil, + fire_safety_act_compliance: nil, + name: nil, + no_show: nil, + number_of_rooms: nil, + passengers: nil, + property_phone_number: nil, + room_class: nil, + room_nights: nil, + total_room_tax_amount: nil, + total_tax_amount: nil + ); end + end + class Subscription < Stripe::RequestParams + class Affiliate < Stripe::RequestParams + # The name of the affiliate that originated the purchase. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class BillingInterval < Stripe::RequestParams + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :count + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + sig { params(count: Integer, interval: String).void } + def initialize(count: nil, interval: nil); end + end + # Affiliate details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Subscription::Affiliate) + } + attr_accessor :affiliate + # Info whether the subscription will be auto renewed upon expiry. + sig { returns(T::Boolean) } + attr_accessor :auto_renewal + # Subscription billing details for this purchase. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Subscription::BillingInterval) + } + attr_accessor :billing_interval + # Subscription end time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :ends_at + # Name of the product on subscription. e.g. Apple Music Subscription + sig { returns(String) } + attr_accessor :name + # Subscription start time. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :starts_at + sig { + params(affiliate: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Subscription::Affiliate, auto_renewal: T::Boolean, billing_interval: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Subscription::BillingInterval, ends_at: Integer, name: String, starts_at: Integer).void + } + def initialize( + affiliate: nil, + auto_renewal: nil, + billing_interval: nil, + ends_at: nil, + name: nil, + starts_at: nil + ); end + end + # Car rental details for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental) } + attr_accessor :car_rental + # Event details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails) } + attr_accessor :event_details + # Flight reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight) } + attr_accessor :flight + # Lodging reservation details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging) } + attr_accessor :lodging + # Subscription details for this PaymentIntent + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Subscription) } + attr_accessor :subscription + sig { + params(car_rental: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::CarRental, event_details: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::EventDetails, flight: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Flight, lodging: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Lodging, subscription: ::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails::Subscription).void + } + def initialize( + car_rental: nil, + event_details: nil, + flight: nil, + lodging: nil, + subscription: nil + ); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Bancontact) + } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Multibanco) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RadarOptions) + } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RevolutPay) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SamsungPay) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::BillingDetails, blik: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Blik, boleto: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Boleto, cashapp: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Eps, fpx: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Fpx, giropay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Giropay, gopay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Gopay, grabpay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Ideal, interac_present: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Klarna, konbini: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Konbini, kr_card: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::KrCard, link: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Link, mb_way: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Oxxo, p24: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::P24, payco: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payco, paynow: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paynow, paypal: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Paypal, payto: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Payto, pix: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Pix, promptpay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Promptpay, qris: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Qris, radar_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Sofort, swish: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Swish, twint: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::WechatPay, zip: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + mandate_options: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class Affirm < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Affirm authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # An internal identifier or reference that this payment corresponds to. You must limit the identifier to 128 characters, and it can only contain letters, numbers, underscores, backslashes, and dashes. + # This field differs from the statement descriptor and item name. + sig { returns(String) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), reference: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, reference: nil, setup_future_usage: nil); end + end + class Alipay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class Alma < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class AmazonPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class AuBecsDebit < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(preferred_language: String, setup_future_usage: T.nilable(String)).void } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Blik < Stripe::RequestParams + # The 6-digit BLIK code that a customer has generated using their banking application. Can only be set on confirmation. + sig { returns(String) } + attr_accessor :code + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(code: String, setup_future_usage: T.nilable(String)).void } + def initialize(code: nil, setup_future_usage: nil); end + end + class Boleto < Stripe::RequestParams + # The number of calendar days before a Boleto voucher expires. For example, if you create a Boleto voucher on Monday and you set expires_after_days to 2, the Boleto invoice will expire on Wednesday at 23:59 America/Sao_Paulo time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: T.nilable(String)).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class Card < Stripe::RequestParams + class Installments < Stripe::RequestParams + class Plan < Stripe::RequestParams + # For `fixed_count` installment plans, this is required. It represents the number of installment payments your customer will make to their credit card. + sig { returns(Integer) } + attr_accessor :count + # For `fixed_count` installment plans, this is required. It represents the interval between installment payments your customer will make to their credit card. + # One of `month`. + sig { returns(String) } + attr_accessor :interval + # Type of installment plan, one of `fixed_count`. + sig { returns(String) } + attr_accessor :type + sig { params(count: Integer, interval: String, type: String).void } + def initialize(count: nil, interval: nil, type: nil); end + end + # Setting to true enables installments for this PaymentIntent. + # This will cause the response to contain a list of available installment plans. + # Setting to false will prevent any selected plan from applying to a charge. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The selected installment plan to use for this payment attempt. + # This parameter can only be provided during confirmation. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan)) + } + attr_accessor :plan + sig { + params(enabled: T::Boolean, plan: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments::Plan)).void + } + def initialize(enabled: nil, plan: nil); end + end + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class StatementDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Please pass in an address that is within your Stripe user account country + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::StatementDetails::Address) + } + attr_accessor :address + # Phone number (e.g., a toll-free number that customers can call) + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::StatementDetails::Address, phone: String).void + } + def initialize(address: nil, phone: nil); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # The exemption requested via 3DS and accepted by the issuer at authentication time. + sig { returns(String) } + attr_accessor :exemption_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, exemption_indicator: String, network_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + exemption_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # A single-use `cvc_update` Token that represents a card CVC value. When provided, the CVC value will be verified during the card payment attempt. This parameter can only be provided during confirmation. + sig { returns(String) } + attr_accessor :cvc_token + # Installment configuration for payments attempted on this PaymentIntent (Mexico Only). + # + # For more information, see the [installments integration guide](https://stripe.com/docs/payments/installments). + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments) + } + attr_accessor :installments + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter indicates that a transaction will be marked + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this PaymentIntent on. Depends on the available networks of the card attached to the PaymentIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # Request ability to [decrement the authorization](https://stripe.com/docs/payments/decremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_decremental_authorization + # Request ability to [capture beyond the standard authorization validity window](https://stripe.com/docs/payments/extended-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_extended_authorization + # Request ability to [increment the authorization](https://stripe.com/docs/payments/incremental-authorization) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_incremental_authorization + # Request ability to make [multiple captures](https://stripe.com/docs/payments/multicapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_multicapture + # Request ability to [overcapture](https://stripe.com/docs/payments/overcapture) for this PaymentIntent. + sig { returns(String) } + attr_accessor :request_overcapture + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # When enabled, using a card that is attached to a customer will require the CVC to be provided again (i.e. using the cvc_token parameter). + sig { returns(T::Boolean) } + attr_accessor :require_cvc_recollection + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Provides information about a card payment that customers see on their statements. Concatenated with the Kana prefix (shortened Kana descriptor) or Kana statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 22 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 22 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kana + # Provides information about a card payment that customers see on their statements. Concatenated with the Kanji prefix (shortened Kanji descriptor) or Kanji statement descriptor that’s set on the account to form the complete statement descriptor. Maximum 17 characters. On card statements, the *concatenation* of both prefix and suffix (including separators) will appear truncated to 17 characters. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix_kanji + # Statement details for this payment intent. You can use this to override the merchant details shown on your customers' statements. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::StatementDetails)) + } + attr_accessor :statement_details + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this payment. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(capture_method: T.nilable(String), cvc_token: String, installments: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::Installments, mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_decremental_authorization: String, request_extended_authorization: String, request_incremental_authorization: String, request_multicapture: String, request_overcapture: String, request_partial_authorization: String, request_three_d_secure: String, require_cvc_recollection: T::Boolean, setup_future_usage: T.nilable(String), statement_descriptor_suffix_kana: T.nilable(String), statement_descriptor_suffix_kanji: T.nilable(String), statement_details: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::StatementDetails), three_d_secure: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + capture_method: nil, + cvc_token: nil, + installments: nil, + mandate_options: nil, + moto: nil, + network: nil, + request_decremental_authorization: nil, + request_extended_authorization: nil, + request_incremental_authorization: nil, + request_multicapture: nil, + request_overcapture: nil, + request_partial_authorization: nil, + request_three_d_secure: nil, + require_cvc_recollection: nil, + setup_future_usage: nil, + statement_descriptor_suffix_kana: nil, + statement_descriptor_suffix_kanji: nil, + statement_details: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + class Routing < Stripe::RequestParams + # Routing requested priority + sig { returns(String) } + attr_accessor :requested_priority + sig { params(requested_priority: String).void } + def initialize(requested_priority: nil); end + end + # Request ability to capture this payment beyond the standard [authorization validity window](https://stripe.com/docs/terminal/features/extended-authorizations#authorization-validity) + sig { returns(T::Boolean) } + attr_accessor :request_extended_authorization + # Request ability to [increment](https://stripe.com/docs/terminal/features/incremental-authorizations) this PaymentIntent if the combination of MCC and card brand is eligible. Check [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) in the [Confirm](https://stripe.com/docs/api/payment_intents/confirm) response to verify support. + sig { returns(T::Boolean) } + attr_accessor :request_incremental_authorization_support + # Network routing priority on co-branded EMV cards supporting domestic debit and international card schemes. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent::Routing) + } + attr_accessor :routing + sig { + params(request_extended_authorization: T::Boolean, request_incremental_authorization_support: T::Boolean, routing: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent::Routing).void + } + def initialize( + request_extended_authorization: nil, + request_incremental_authorization_support: nil, + routing: nil + ); end + end + class Cashapp < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for the eu_bank_transfer funding type. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # List of address types that should be returned in the financial_addresses response. If not specified, all valid types will be returned. + # + # Permitted values include: `sort_code`, `zengin`, `iban`, or `spei`. + sig { returns(T::Array[String]) } + attr_accessor :requested_address_types + # The list of bank transfer types that this PaymentIntent is allowed to use for funding Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, requested_address_types: T::Array[String], type: String).void + } + def initialize(eu_bank_transfer: nil, requested_address_types: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(bank_transfer: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String, setup_future_usage: String).void + } + def initialize(bank_transfer: nil, funding_type: nil, setup_future_usage: nil); end + end + class Eps < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Fpx < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Giropay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Gopay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Grabpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class IdBankTransfer < Stripe::RequestParams + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from 5 minutes from now until 31 days from now. If unset, it defaults to 3 days from now. + sig { returns(Integer) } + attr_accessor :expires_after + # The UNIX timestamp until which the virtual bank account is valid. Permitted range is from now until 30 days from now. If unset, it defaults to 1 days from now. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after: nil, expires_at: nil, setup_future_usage: nil); end + end + class Ideal < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: T.nilable(String)).void } + def initialize(setup_future_usage: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Klarna < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Preferred language of the Klarna authorization page that the customer is redirected to + sig { returns(String) } + attr_accessor :preferred_locale + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), preferred_locale: String, setup_future_usage: String).void + } + def initialize(capture_method: nil, preferred_locale: nil, setup_future_usage: nil); end + end + class Konbini < Stripe::RequestParams + # An optional 10 to 11 digit numeric-only string determining the confirmation code at applicable convenience stores. Must not consist of only zeroes and could be rejected in case of insufficient uniqueness. We recommend to use the customer's phone number. + sig { returns(T.nilable(String)) } + attr_accessor :confirmation_number + # The number of calendar days (between 1 and 60) after which Konbini payment instructions will expire. For example, if a PaymentIntent is confirmed with Konbini and `expires_after_days` set to 2 on Monday JST, the instructions will expire on Wednesday 23:59:59 JST. Defaults to 3 days. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_after_days + # The timestamp at which the Konbini payment instructions will expire. Only one of `expires_after_days` or `expires_at` may be set. + sig { returns(T.nilable(Integer)) } + attr_accessor :expires_at + # A product descriptor of up to 22 characters, which will appear to customers at the convenience store. + sig { returns(T.nilable(String)) } + attr_accessor :product_description + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(confirmation_number: T.nilable(String), expires_after_days: T.nilable(Integer), expires_at: T.nilable(Integer), product_description: T.nilable(String), setup_future_usage: String).void + } + def initialize( + confirmation_number: nil, + expires_after_days: nil, + expires_at: nil, + product_description: nil, + setup_future_usage: nil + ); end + end + class KrCard < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Link < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), persistent_token: String, setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, persistent_token: nil, setup_future_usage: nil); end + end + class MbWay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Mobilepay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(capture_method: T.nilable(String), setup_future_usage: String).void } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class Multibanco < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class NaverPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Oxxo < Stripe::RequestParams + # The number of calendar days before an OXXO voucher expires. For example, if you create an OXXO voucher on Monday and you set expires_after_days to 2, the OXXO invoice will expire on Wednesday at 23:59 America/Mexico_City time. + sig { returns(Integer) } + attr_accessor :expires_after_days + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(expires_after_days: Integer, setup_future_usage: String).void } + def initialize(expires_after_days: nil, setup_future_usage: nil); end + end + class P24 < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + # Confirm that the payer has accepted the P24 terms and conditions. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { params(setup_future_usage: String, tos_shown_and_accepted: T::Boolean).void } + def initialize(setup_future_usage: nil, tos_shown_and_accepted: nil); end + end + class Payco < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class Paynow < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Paypal < Stripe::RequestParams + class LineItem < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The tax for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :amount + # The tax behavior for the line item. + sig { returns(String) } + attr_accessor :behavior + sig { params(amount: Integer, behavior: String).void } + def initialize(amount: nil, behavior: nil); end + end + # Type of the line item. + sig { returns(String) } + attr_accessor :category + # Description of the line item. + sig { returns(String) } + attr_accessor :description + # Descriptive name of the line item. + sig { returns(String) } + attr_accessor :name + # Quantity of the line item. Must be a positive number. + sig { returns(Integer) } + attr_accessor :quantity + # Client facing stock keeping unit, article number or similar. + sig { returns(String) } + attr_accessor :sku + # The Stripe account ID of the connected account that sells the item. + sig { returns(String) } + attr_accessor :sold_by + # The tax information for the line item. + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal::LineItem::Tax) + } + attr_accessor :tax + # Price for a single unit of the line item in minor units. Cannot be a negative number. + sig { returns(Integer) } + attr_accessor :unit_amount + sig { + params(category: String, description: String, name: String, quantity: Integer, sku: String, sold_by: String, tax: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal::LineItem::Tax, unit_amount: Integer).void + } + def initialize( + category: nil, + description: nil, + name: nil, + quantity: nil, + sku: nil, + sold_by: nil, + tax: nil, + unit_amount: nil + ); end + end + # Controls when the funds will be captured from the customer's account. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # The line items purchased by the customer. + sig { + returns(T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal::LineItem]) + } + attr_accessor :line_items + # [Preferred locale](https://stripe.com/docs/payments/paypal/supported-locales) of the PayPal checkout page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_locale + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference + # A reference of the PayPal transaction visible to customer which is mapped to PayPal's invoice ID. This must be a globally unique ID if you have configured in your PayPal settings to block multiple payments per invoice ID. + sig { returns(String) } + attr_accessor :reference_id + # The risk correlation ID for an on-session payment using a saved PayPal payment method. + sig { returns(String) } + attr_accessor :risk_correlation_id + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(capture_method: T.nilable(String), line_items: T::Array[::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal::LineItem], preferred_locale: String, reference: String, reference_id: String, risk_correlation_id: String, setup_future_usage: T.nilable(String), subsellers: T::Array[String]).void + } + def initialize( + capture_method: nil, + line_items: nil, + preferred_locale: nil, + reference: nil, + reference_id: nil, + risk_correlation_id: nil, + setup_future_usage: nil, + subsellers: nil + ); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil + ); end + end + # Additional fields for Mandate creation. Only `purpose` field is configurable for PayTo PaymentIntent with `setup_future_usage=none`. Other fields are only applicable to PayTo PaymentIntent with `setup_future_usage=off_session` + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Pix < Stripe::RequestParams + # The number of seconds (between 10 and 1209600) after which Pix payment will expire. Defaults to 86400 seconds. + sig { returns(Integer) } + attr_accessor :expires_after_seconds + # The timestamp at which the Pix expires (between 10 and 1209600 seconds in the future). Defaults to 1 day in the future. + sig { returns(Integer) } + attr_accessor :expires_at + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { + params(expires_after_seconds: Integer, expires_at: Integer, setup_future_usage: String).void + } + def initialize(expires_after_seconds: nil, expires_at: nil, setup_future_usage: nil); end + end + class Promptpay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Qris < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Rechnung < Stripe::RequestParams + + end + class RevolutPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(capture_method: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(capture_method: nil, setup_future_usage: nil); end + end + class SamsungPay < Stripe::RequestParams + # Controls when the funds are captured from the customer's account. + # + # If provided, this parameter overrides the behavior of the top-level [capture_method](/api/payment_intents/update#update_payment_intent-capture_method) for this payment method type when finalizing the payment with this payment method type. + # + # If `capture_method` is already set on the PaymentIntent, providing an empty value for this parameter unsets the stored value for this payment method type. + sig { returns(T.nilable(String)) } + attr_accessor :capture_method + sig { params(capture_method: T.nilable(String)).void } + def initialize(capture_method: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions, setup_future_usage: T.nilable(String)).void + } + def initialize(mandate_options: nil, setup_future_usage: nil); end + end + class Shopeepay < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class Sofort < Stripe::RequestParams + # Language shown to the payer on redirect. + sig { returns(T.nilable(String)) } + attr_accessor :preferred_language + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + sig { + params(preferred_language: T.nilable(String), setup_future_usage: T.nilable(String)).void + } + def initialize(preferred_language: nil, setup_future_usage: nil); end + end + class Swish < Stripe::RequestParams + # A reference for this payment to be displayed in the Swish app. + sig { returns(T.nilable(String)) } + attr_accessor :reference + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(reference: T.nilable(String), setup_future_usage: String).void } + def initialize(reference: nil, setup_future_usage: nil); end + end + class Twint < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Preferred transaction settlement speed + sig { returns(T.nilable(String)) } + attr_accessor :preferred_settlement_speed + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, preferred_settlement_speed: T.nilable(String), setup_future_usage: T.nilable(String), verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + preferred_settlement_speed: nil, + setup_future_usage: nil, + verification_method: nil + ); end + end + class WechatPay < Stripe::RequestParams + # The app ID registered with WeChat Pay. Only required when client is ios or android. + sig { returns(String) } + attr_accessor :app_id + # The client type that the end customer will pay from + sig { returns(String) } + attr_accessor :client + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(app_id: String, client: String, setup_future_usage: String).void } + def initialize(app_id: nil, client: nil, setup_future_usage: nil); end + end + class Zip < Stripe::RequestParams + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(String) } + attr_accessor :setup_future_usage + sig { params(setup_future_usage: String).void } + def initialize(setup_future_usage: nil); end + end + # If this is a `acss_debit` PaymentMethod, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this sub-hash contains details about the Affirm payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Affirm)) + } + attr_accessor :affirm + # If this is a `afterpay_clearpay` PaymentMethod, this sub-hash contains details about the Afterpay Clearpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AfterpayClearpay)) + } + attr_accessor :afterpay_clearpay + # If this is a `alipay` PaymentMethod, this sub-hash contains details about the Alipay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alipay)) + } + attr_accessor :alipay + # If this is a `alma` PaymentMethod, this sub-hash contains details about the Alma payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alma)) + } + attr_accessor :alma + # If this is a `amazon_pay` PaymentMethod, this sub-hash contains details about the Amazon Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay)) + } + attr_accessor :amazon_pay + # If this is a `au_becs_debit` PaymentMethod, this sub-hash contains details about the AU BECS Direct Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AuBecsDebit)) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this sub-hash contains details about the BACS Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit)) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this sub-hash contains details about the Bancontact payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # If this is a `blik` PaymentMethod, this sub-hash contains details about the BLIK payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Blik)) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this sub-hash contains details about the Boleto payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Boleto)) + } + attr_accessor :boleto + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card)) + } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent)) + } + attr_accessor :card_present + # If this is a `cashapp` PaymentMethod, this sub-hash contains details about the Cash App Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp)) + } + attr_accessor :cashapp + # If this is a `customer balance` PaymentMethod, this sub-hash contains details about the customer balance payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # If this is a `eps` PaymentMethod, this sub-hash contains details about the EPS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Eps)) + } + attr_accessor :eps + # If this is a `fpx` PaymentMethod, this sub-hash contains details about the FPX payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Fpx)) + } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this sub-hash contains details about the Giropay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Giropay)) + } + attr_accessor :giropay + # If this is a `gopay` PaymentMethod, this sub-hash contains details about the GoPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Gopay)) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this sub-hash contains details about the Grabpay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Grabpay)) + } + attr_accessor :grabpay + # If this is a `id_bank_transfer` PaymentMethod, this sub-hash contains details about the Indonesia Bank Transfer payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # If this is a `ideal` PaymentMethod, this sub-hash contains details about the Ideal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Ideal)) + } + attr_accessor :ideal + # If this is a `interac_present` PaymentMethod, this sub-hash contains details about the Card Present payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::InteracPresent)) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this sub-hash contains details about the Kakao Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KakaoPay)) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this sub-hash contains details about the Klarna payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna)) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this sub-hash contains details about the Konbini payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this sub-hash contains details about the KR Card payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KrCard)) + } + attr_accessor :kr_card + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Link)) + } + attr_accessor :link + # If this is a `mb_way` PaymentMethod, this sub-hash contains details about the MB WAY payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::MbWay)) + } + attr_accessor :mb_way + # If this is a `MobilePay` PaymentMethod, this sub-hash contains details about the MobilePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Mobilepay)) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this sub-hash contains details about the Multibanco payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Multibanco)) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this sub-hash contains details about the Naver Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NaverPay)) + } + attr_accessor :naver_pay + # If this is a `oxxo` PaymentMethod, this sub-hash contains details about the OXXO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Oxxo)) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this sub-hash contains details about the Przelewy24 payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::P24)) + } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this sub-hash contains details about the PAYCO payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payco)) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this sub-hash contains details about the PayNow payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paynow)) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal)) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this sub-hash contains details about the PayTo payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payto)) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this sub-hash contains details about the Pix payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Pix)) + } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this sub-hash contains details about the PromptPay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Promptpay)) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this sub-hash contains details about the QRIS payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Qris)) + } + attr_accessor :qris + # If this is a `rechnung` PaymentMethod, this sub-hash contains details about the Rechnung payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Rechnung)) + } + attr_accessor :rechnung + # If this is a `revolut_pay` PaymentMethod, this sub-hash contains details about the Revolut Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::RevolutPay)) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this sub-hash contains details about the Samsung Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SamsungPay)) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # If this is a `shopeepay` PaymentMethod, this sub-hash contains details about the ShopeePay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Shopeepay)) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this sub-hash contains details about the SOFORT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Sofort)) + } + attr_accessor :sofort + # If this is a `Swish` PaymentMethod, this sub-hash contains details about the Swish payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Swish)) + } + attr_accessor :swish + # If this is a `twint` PaymentMethod, this sub-hash contains details about the TWINT payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Twint)) + } + attr_accessor :twint + # If this is a `us_bank_account` PaymentMethod, this sub-hash contains details about the US bank account payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + # If this is a `wechat_pay` PaymentMethod, this sub-hash contains details about the WeChat Pay payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::WechatPay)) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this sub-hash contains details about the Zip payment method options. + sig { + returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Zip)) + } + attr_accessor :zip + sig { + params(acss_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit), affirm: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Affirm), afterpay_clearpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AfterpayClearpay), alipay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alipay), alma: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Alma), amazon_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay), au_becs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::AuBecsDebit), bacs_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit), bancontact: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Bancontact), blik: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Blik), boleto: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Boleto), card: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Card), card_present: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CardPresent), cashapp: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Cashapp), customer_balance: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::CustomerBalance), eps: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Eps), fpx: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Fpx), giropay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Giropay), gopay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Gopay), grabpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Grabpay), id_bank_transfer: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::IdBankTransfer), ideal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Ideal), interac_present: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::InteracPresent), kakao_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KakaoPay), klarna: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Klarna), konbini: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Konbini), kr_card: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::KrCard), link: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Link), mb_way: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::MbWay), mobilepay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Mobilepay), multibanco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Multibanco), naver_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::NaverPay), oxxo: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Oxxo), p24: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::P24), payco: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payco), paynow: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paynow), paypal: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Paypal), payto: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Payto), pix: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Pix), promptpay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Promptpay), qris: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Qris), rechnung: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Rechnung), revolut_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::RevolutPay), samsung_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SamsungPay), sepa_debit: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit), shopeepay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Shopeepay), sofort: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Sofort), swish: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Swish), twint: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Twint), us_bank_account: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount), wechat_pay: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::WechatPay), zip: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions::Zip)).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + card_present: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::PaymentIntentService::ConfirmParams::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize(address: nil, carrier: nil, name: nil, phone: nil, tracking_number: nil); end + end + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::AsyncWorkflows) } + attr_accessor :async_workflows + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # ID of the ConfirmationToken used to confirm this PaymentIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # Set to `true` to fail the payment attempt if the PaymentIntent transitions into `requires_action`. This parameter is intended for simpler integrations that do not handle customer actions, like [saving cards without authentication](https://stripe.com/docs/payments/save-card-without-authentication). + sig { returns(T::Boolean) } + attr_accessor :error_on_requires_action + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of the mandate that's used for this payment. + sig { returns(String) } + attr_accessor :mandate + # Attribute for param field mandate_data + sig { returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData)) } + attr_accessor :mandate_data + # Set to `true` to indicate that the customer isn't in your checkout flow during this payment attempt and can't authenticate. Use this parameter in scenarios where you collect card details and [charge them later](https://stripe.com/docs/payments/cards/charging-saved-cards). + sig { returns(T.any(T::Boolean, String)) } + attr_accessor :off_session + # Provides industry-specific information about the charge. + sig { returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails)) } + attr_accessor :payment_details + # ID of the payment method (a PaymentMethod, Card, or [compatible Source](https://stripe.com/docs/payments/payment-methods/transitioning#compatibility) object) to attach to this PaymentIntent. + sig { returns(String) } + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. The new PaymentMethod will appear + # in the [payment_method](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method) + # property on the PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this PaymentIntent. + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, a card) that this PaymentIntent can use. Use `automatic_payment_methods` to manage payment methods from the [Stripe Dashboard](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Options to configure Radar. Learn more about [Radar Sessions](https://stripe.com/docs/radar/radar-session). + sig { returns(::Stripe::PaymentIntentService::ConfirmParams::RadarOptions) } + attr_accessor :radar_options + # Email address that the receipt for the resulting payment will be sent to. If `receipt_email` is specified for a payment in live mode, a receipt will be sent regardless of your [email settings](https://dashboard.stripe.com/account/emails). + sig { returns(T.nilable(String)) } + attr_accessor :receipt_email + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + sig { returns(String) } + attr_accessor :return_url + # Indicates that you intend to make future payments with this PaymentIntent's payment method. + # + # If you provide a Customer with the PaymentIntent, you can use this parameter to [attach the payment method](/payments/save-during-payment) to the Customer after the PaymentIntent is confirmed and the customer completes any required actions. If you don't provide a Customer, you can still [attach](/api/payment_methods/attach) the payment method to a Customer after the transaction completes. + # + # If the payment method is `card_present` and isn't a digital wallet, Stripe creates and attaches a [generated_card](/api/charges/object#charge_object-payment_method_details-card_present-generated_card) payment method representing the card to the Customer instead. + # + # When processing card payments, Stripe uses `setup_future_usage` to help you comply with regional legislation and network rules, such as [SCA](/strong-customer-authentication). + # + # If you've already set `setup_future_usage` and you're performing a request using a publishable key, you can only update the value from `on_session` to `off_session`. + sig { returns(T.nilable(String)) } + attr_accessor :setup_future_usage + # Shipping information for this PaymentIntent. + sig { returns(T.nilable(::Stripe::PaymentIntentService::ConfirmParams::Shipping)) } + attr_accessor :shipping + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(application_fee_amount: T.nilable(Integer), async_workflows: ::Stripe::PaymentIntentService::ConfirmParams::AsyncWorkflows, capture_method: String, confirmation_token: String, error_on_requires_action: T::Boolean, expand: T::Array[String], mandate: String, mandate_data: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::MandateData), off_session: T.any(T::Boolean, String), payment_details: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::PaymentDetails), payment_method: String, payment_method_data: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodData, payment_method_options: ::Stripe::PaymentIntentService::ConfirmParams::PaymentMethodOptions, payment_method_types: T::Array[String], radar_options: ::Stripe::PaymentIntentService::ConfirmParams::RadarOptions, receipt_email: T.nilable(String), return_url: String, setup_future_usage: T.nilable(String), shipping: T.nilable(::Stripe::PaymentIntentService::ConfirmParams::Shipping), use_stripe_sdk: T::Boolean).void + } + def initialize( + application_fee_amount: nil, + async_workflows: nil, + capture_method: nil, + confirmation_token: nil, + error_on_requires_action: nil, + expand: nil, + mandate: nil, + mandate_data: nil, + off_session: nil, + payment_details: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + radar_options: nil, + receipt_email: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil, + use_stripe_sdk: nil + ); end + end + class DecrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { + returns(::Stripe::PaymentIntentService::DecrementAuthorizationParams::AsyncWorkflows::Inputs::Tax) + } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntentService::DecrementAuthorizationParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { + returns(::Stripe::PaymentIntentService::DecrementAuthorizationParams::AsyncWorkflows::Inputs) + } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntentService::DecrementAuthorizationParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be smaller than the currently authorized amount and greater than the already captured amount. + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntentService::DecrementAuthorizationParams::AsyncWorkflows) } + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntentService::DecrementAuthorizationParams::TransferData) } + attr_accessor :transfer_data + sig { + params(amount: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntentService::DecrementAuthorizationParams::AsyncWorkflows, description: String, expand: T::Array[String], metadata: T::Hash[String, String], transfer_data: ::Stripe::PaymentIntentService::DecrementAuthorizationParams::TransferData).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + transfer_data: nil + ); end + end + class IncrementAuthorizationParams < Stripe::RequestParams + class AsyncWorkflows < Stripe::RequestParams + class Inputs < Stripe::RequestParams + class Tax < Stripe::RequestParams + # The [TaxCalculation](https://stripe.com/docs/api/tax/calculations) id + sig { returns(T.nilable(String)) } + attr_accessor :calculation + sig { params(calculation: T.nilable(String)).void } + def initialize(calculation: nil); end + end + # Tax arguments for automations + sig { + returns(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AsyncWorkflows::Inputs::Tax) + } + attr_accessor :tax + sig { + params(tax: ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AsyncWorkflows::Inputs::Tax).void + } + def initialize(tax: nil); end + end + # Arguments passed in automations + sig { + returns(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AsyncWorkflows::Inputs) + } + attr_accessor :inputs + sig { + params(inputs: ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AsyncWorkflows::Inputs).void + } + def initialize(inputs: nil); end + end + class PaymentMethodOptions < Stripe::RequestParams + class Card < Stripe::RequestParams + # Request partial authorization on this PaymentIntent. + sig { returns(String) } + attr_accessor :request_partial_authorization + sig { params(request_partial_authorization: String).void } + def initialize(request_partial_authorization: nil); end + end + # Configuration for any card payments attempted on this PaymentIntent. + sig { + returns(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions::Card) + } + attr_accessor :card + sig { + params(card: ::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions::Card).void + } + def initialize(card: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + sig { params(amount: Integer).void } + def initialize(amount: nil); end + end + # The updated total amount that you intend to collect from the cardholder. This amount must be greater than the currently authorized amount. + sig { returns(Integer) } + attr_accessor :amount + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. The amount of the application fee collected will be capped at the total payment amount. For more information, see the PaymentIntents [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(Integer) } + attr_accessor :application_fee_amount + # Automations to be run during the PaymentIntent lifecycle + sig { returns(::Stripe::PaymentIntentService::IncrementAuthorizationParams::AsyncWorkflows) } + attr_accessor :async_workflows + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Payment method-specific configuration for this PaymentIntent. + sig { + returns(::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # Text that appears on the customer's statement as the statement descriptor for a non-card or card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + sig { returns(String) } + attr_accessor :statement_descriptor + # The parameters used to automatically create a transfer after the payment is captured. + # Learn more about the [use case for connected accounts](https://stripe.com/docs/payments/connected-accounts). + sig { returns(::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData) } + attr_accessor :transfer_data + sig { + params(amount: Integer, application_fee_amount: Integer, async_workflows: ::Stripe::PaymentIntentService::IncrementAuthorizationParams::AsyncWorkflows, description: String, expand: T::Array[String], metadata: T::Hash[String, String], payment_method_options: ::Stripe::PaymentIntentService::IncrementAuthorizationParams::PaymentMethodOptions, statement_descriptor: String, transfer_data: ::Stripe::PaymentIntentService::IncrementAuthorizationParams::TransferData).void + } + def initialize( + amount: nil, + application_fee_amount: nil, + async_workflows: nil, + description: nil, + expand: nil, + metadata: nil, + payment_method_options: nil, + statement_descriptor: nil, + transfer_data: nil + ); end + end + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + sig { returns(T::Array[Integer]) } + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + sig { returns(String) } + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(amounts: T::Array[Integer], descriptor_code: String, expand: T::Array[String]).void + } + def initialize(amounts: nil, descriptor_code: nil, expand: nil); end + end + class TriggerActionParams < Stripe::RequestParams + class ScanQrCode < Stripe::RequestParams + # Whether the QR Code scan's payment should succeed or fail. + sig { returns(String) } + attr_accessor :result + sig { params(result: String).void } + def initialize(result: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # True to simulate success, false to simulate failure. + sig { returns(::Stripe::PaymentIntentService::TriggerActionParams::ScanQrCode) } + attr_accessor :scan_qr_code + # The type of action to be simulated. + sig { returns(String) } + attr_accessor :type + sig { + params(expand: T::Array[String], scan_qr_code: ::Stripe::PaymentIntentService::TriggerActionParams::ScanQrCode, type: String).void + } + def initialize(expand: nil, scan_qr_code: nil, type: nil); end + end + # Manually reconcile the remaining amount for a customer_balance PaymentIntent. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::ApplyCustomerBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def apply_customer_balance(intent, params = {}, opts = {}); end + + # You can cancel a PaymentIntent object when it's in one of these statuses: requires_payment_method, requires_capture, requires_confirmation, requires_action or, [in rare cases](https://stripe.com/docs/payments/intents), processing. + # + # After it's canceled, no additional charges are made by the PaymentIntent and any operations on the PaymentIntent fail with an error. For PaymentIntents with a status of requires_capture, the remaining amount_capturable is automatically refunded. + # + # You can't cancel the PaymentIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def cancel(intent, params = {}, opts = {}); end + + # Capture the funds of an existing uncaptured PaymentIntent when its status is requires_capture. + # + # Uncaptured PaymentIntents are cancelled a set number of days (7 by default) after their creation. + # + # Learn more about [separate authorization and capture](https://stripe.com/docs/payments/capture-later). + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def capture(intent, params = {}, opts = {}); end + + # Confirm that your customer intends to pay with current or provided + # payment method. Upon confirmation, the PaymentIntent will attempt to initiate + # a payment. + # If the selected payment method requires additional authentication steps, the + # PaymentIntent will transition to the requires_action status and + # suggest additional actions via next_action. If payment fails, + # the PaymentIntent transitions to the requires_payment_method status or the + # canceled status if the confirmation limit is reached. If + # payment succeeds, the PaymentIntent will transition to the succeeded + # status (or requires_capture, if capture_method is set to manual). + # If the confirmation_method is automatic, payment may be attempted + # using our [client SDKs](https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment) + # and the PaymentIntent's [client_secret](https://stripe.com/docs/api#payment_intent_object-client_secret). + # After next_actions are handled by the client, no additional + # confirmation is required to complete the payment. + # If the confirmation_method is manual, all payment attempts must be + # initiated using a secret key. + # If any actions are required for the payment, the PaymentIntent will + # return to the requires_confirmation state + # after those actions are completed. Your server needs to then + # explicitly re-confirm the PaymentIntent to initiate the next payment + # attempt. + # There is a variable upper limit on how many times a PaymentIntent can be confirmed. + # After this limit is reached, any further calls to this endpoint will + # transition the PaymentIntent to the canceled state. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def confirm(intent, params = {}, opts = {}); end + + # Creates a PaymentIntent object. + # + # After the PaymentIntent is created, attach a payment method and [confirm](https://stripe.com/docs/api/payment_intents/confirm) + # to continue the payment. Learn more about the available payment flows + # with the Payment Intents API. + # + # When you use confirm=true during creation, it's equivalent to creating + # and confirming the PaymentIntent in the same call. You can use any parameters + # available in the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) when you supply + # confirm=true. + sig { + params(params: T.any(::Stripe::PaymentIntentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def create(params = {}, opts = {}); end + + # Perform a decremental authorization on an eligible + # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the + # PaymentIntent's status must be requires_capture and + # [decremental_authorization.status](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-decremental_authorization) + # must be available. + # + # Decremental authorizations decrease the authorized amount on your customer's card + # to the new, lower amount provided. A single PaymentIntent can call this endpoint multiple times to further decrease the authorized amount. + # + # After decrement, the PaymentIntent object + # returns with the updated + # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). + # The PaymentIntent will now be capturable up to the new authorized amount. + # + # Each PaymentIntent can have a maximum of 10 decremental or incremental authorization attempts, including declines. + # After it's fully captured, a PaymentIntent can no longer be decremented. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::DecrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def decrement_authorization(intent, params = {}, opts = {}); end + + # Perform an incremental authorization on an eligible + # [PaymentIntent](https://stripe.com/docs/api/payment_intents/object). To be eligible, the + # PaymentIntent's status must be requires_capture and + # [incremental_authorization_supported](https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card_present-incremental_authorization_supported) + # must be true. + # + # Incremental authorizations attempt to increase the authorized amount on + # your customer's card to the new, higher amount provided. Similar to the + # initial authorization, incremental authorizations can be declined. A + # single PaymentIntent can call this endpoint multiple times to further + # increase the authorized amount. + # + # If the incremental authorization succeeds, the PaymentIntent object + # returns with the updated + # [amount](https://stripe.com/docs/api/payment_intents/object#payment_intent_object-amount). + # If the incremental authorization fails, a + # [card_declined](https://stripe.com/docs/error-codes#card-declined) error returns, and no other + # fields on the PaymentIntent or Charge update. The PaymentIntent + # object remains capturable for the previously authorized amount. + # + # Each PaymentIntent can have a maximum of 10 incremental authorization attempts, including declines. + # After it's captured, a PaymentIntent can no longer be incremented. + # + # Learn more about [incremental authorizations](https://stripe.com/docs/terminal/features/incremental-authorizations). + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::IncrementAuthorizationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def increment_authorization(intent, params = {}, opts = {}); end + + # Returns a list of PaymentIntents. + sig { + params(params: T.any(::Stripe::PaymentIntentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a PaymentIntent that has previously been created. + # + # You can retrieve a PaymentIntent client-side using a publishable key when the client_secret is in the query string. + # + # If you retrieve a PaymentIntent with a publishable key, it only returns a subset of properties. Refer to the [payment intent](https://stripe.com/docs/api#payment_intent_object) object reference for more details. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def retrieve(intent, params = {}, opts = {}); end + + # Search for PaymentIntents you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::PaymentIntentService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Trigger an external action on a PaymentIntent. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::TriggerActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def trigger_action(intent, params = {}, opts = {}); end + + # Updates properties on a PaymentIntent object without confirming. + # + # Depending on which properties you update, you might need to confirm the + # PaymentIntent again. For example, updating the payment_method + # always requires you to confirm the PaymentIntent again. If you prefer to + # update and confirm at the same time, we recommend updating properties through + # the [confirm API](https://stripe.com/docs/api/payment_intents/confirm) instead. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def update(intent, params = {}, opts = {}); end + + # Verifies microdeposits on a PaymentIntent object. + sig { + params(intent: String, params: T.any(::Stripe::PaymentIntentService::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentIntent) + } + def verify_microdeposits(intent, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_link_line_item_service.rbi b/rbi/stripe/services/payment_link_line_item_service.rbi new file mode 100644 index 000000000..c3c0bfdc2 --- /dev/null +++ b/rbi/stripe/services/payment_link_line_item_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentLinkLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # When retrieving a payment link, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(payment_link: String, params: T.any(::Stripe::PaymentLinkLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(payment_link, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_link_service.rbi b/rbi/stripe/services/payment_link_service.rbi new file mode 100644 index 000000000..8b922b0f9 --- /dev/null +++ b/rbi/stripe/services/payment_link_service.rbi @@ -0,0 +1,1237 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentLinkService < StripeService + attr_reader :line_items + class ListParams < Stripe::RequestParams + # Only return payment links that are active or inactive (e.g., pass `false` to list all inactive payment links). + sig { returns(T::Boolean) } + attr_accessor :active + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + sig { returns(String) } + attr_accessor :custom_message + sig { params(custom_message: String).void } + def initialize(custom_message: nil); end + end + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + sig { returns(String) } + attr_accessor :url + sig { params(url: String).void } + def initialize(url: nil); end + end + # Configuration when `type=hosted_confirmation`. + sig { + returns(::Stripe::PaymentLinkService::CreateParams::AfterCompletion::HostedConfirmation) + } + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + sig { returns(::Stripe::PaymentLinkService::CreateParams::AfterCompletion::Redirect) } + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + sig { returns(String) } + attr_accessor :type + sig { + params(hosted_confirmation: ::Stripe::PaymentLinkService::CreateParams::AfterCompletion::HostedConfirmation, redirect: ::Stripe::PaymentLinkService::CreateParams::AfterCompletion::Redirect, type: String).void + } + def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::PaymentLinkService::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::PaymentLinkService::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class ConsentCollection < Stripe::RequestParams + class PaymentMethodReuseAgreement < Stripe::RequestParams + # Determines the position and visibility of the payment method reuse agreement in the UI. When set to `auto`, Stripe's + # defaults will be used. When set to `hidden`, the payment method reuse agreement text will always be hidden in the UI. + sig { returns(String) } + attr_accessor :position + sig { params(position: String).void } + def initialize(position: nil); end + end + # Determines the display of payment method reuse agreement text in the UI. If set to `hidden`, it will hide legal text related to the reuse of a payment method. + sig { + returns(::Stripe::PaymentLinkService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement) + } + attr_accessor :payment_method_reuse_agreement + # If set to `auto`, enables the collection of customer consent for promotional communications. The Checkout + # Session will determine whether to display an option to opt into promotional communication + # from the merchant depending on the customer's locale. Only available to US merchants. + sig { returns(String) } + attr_accessor :promotions + # If set to `required`, it requires customers to check a terms of service checkbox before being able to pay. + # There must be a valid terms of service URL set in your [Dashboard settings](https://dashboard.stripe.com/settings/public). + sig { returns(String) } + attr_accessor :terms_of_service + sig { + params(payment_method_reuse_agreement: ::Stripe::PaymentLinkService::CreateParams::ConsentCollection::PaymentMethodReuseAgreement, promotions: String, terms_of_service: String).void + } + def initialize( + payment_method_reuse_agreement: nil, + promotions: nil, + terms_of_service: nil + ); end + end + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + sig { returns(String) } + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + sig { returns(String) } + attr_accessor :value + sig { params(label: String, value: String).void } + def initialize(label: nil, value: nil); end + end + # The options available for the customer to select. Up to 200 options allowed. + sig { + returns(T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown::Option]) + } + attr_accessor :options + sig { + params(options: T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown::Option]).void + } + def initialize(options: nil); end + end + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + sig { returns(String) } + attr_accessor :custom + # The type of the label. + sig { returns(String) } + attr_accessor :type + sig { params(custom: String, type: String).void } + def initialize(custom: nil, type: nil); end + end + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + # Configuration for `type=dropdown` fields. + sig { returns(::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown) } + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + sig { returns(String) } + attr_accessor :key + # The label for the field, displayed to the customer. + sig { returns(::Stripe::PaymentLinkService::CreateParams::CustomField::Label) } + attr_accessor :label + # Configuration for `type=numeric` fields. + sig { returns(::Stripe::PaymentLinkService::CreateParams::CustomField::Numeric) } + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :optional + # Configuration for `type=text` fields. + sig { returns(::Stripe::PaymentLinkService::CreateParams::CustomField::Text) } + attr_accessor :text + # The type of the field. + sig { returns(String) } + attr_accessor :type + sig { + params(dropdown: ::Stripe::PaymentLinkService::CreateParams::CustomField::Dropdown, key: String, label: ::Stripe::PaymentLinkService::CreateParams::CustomField::Label, numeric: ::Stripe::PaymentLinkService::CreateParams::CustomField::Numeric, optional: T::Boolean, text: ::Stripe::PaymentLinkService::CreateParams::CustomField::Text, type: String).void + } + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ); end + end + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + # Custom text that should be displayed after the payment confirmation button. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::AfterSubmit)) + } + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::ShippingAddress)) + } + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + sig { returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::Submit)) } + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::TermsOfServiceAcceptance)) + } + attr_accessor :terms_of_service_acceptance + sig { + params(after_submit: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::AfterSubmit), shipping_address: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::ShippingAddress), submit: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::Submit), terms_of_service_acceptance: T.nilable(::Stripe::PaymentLinkService::CreateParams::CustomText::TermsOfServiceAcceptance)).void + } + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ); end + end + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + sig { params(amount_tax_display: T.nilable(String)).void } + def initialize(amount_tax_display: nil); end + end + # The account tax IDs associated with the invoice. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + sig { + returns(T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::CustomField])) + } + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::Issuer) + } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(account_tax_ids: T.nilable(T::Array[String]), custom_fields: T.nilable(T::Array[::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::CustomField]), description: String, footer: String, issuer: ::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::Issuer, metadata: T.nilable(T::Hash[String, String]), rendering_options: T.nilable(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData::RenderingOptions)).void + } + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ); end + end + # Whether the feature is enabled + sig { returns(T::Boolean) } + attr_accessor :enabled + # Invoice PDF configuration. + sig { returns(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData) } + attr_accessor :invoice_data + sig { + params(enabled: T::Boolean, invoice_data: ::Stripe::PaymentLinkService::CreateParams::InvoiceCreation::InvoiceData).void + } + def initialize(enabled: nil, invoice_data: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + sig { returns(::Stripe::PaymentLinkService::CreateParams::LineItem::AdjustableQuantity) } + attr_accessor :adjustable_quantity + # The ID of the [Price](https://stripe.com/docs/api/prices) or [Plan](https://stripe.com/docs/api/plans) object. + sig { returns(String) } + attr_accessor :price + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + sig { + params(adjustable_quantity: ::Stripe::PaymentLinkService::CreateParams::LineItem::AdjustableQuantity, price: String, quantity: Integer).void + } + def initialize(adjustable_quantity: nil, price: nil, quantity: nil); end + end + class PaymentIntentData < Stripe::RequestParams + # Controls when the funds will be captured from the customer's account. + sig { returns(String) } + attr_accessor :capture_method + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Indicates that you intend to [make future payments](https://stripe.com/docs/payments/payment-intents#future-usage) with the payment method collected by this Checkout Session. + # + # When setting this to `on_session`, Checkout will show a notice to the customer that their payment details will be saved. + # + # When setting this to `off_session`, Checkout will show a notice to the customer that their payment details will be saved and used for future payments. + # + # If a Customer has been provided or Checkout creates a new Customer,Checkout will attach the payment method to the Customer. + # + # If Checkout does not create a Customer, the payment method is not attached to a Customer. To reuse the payment method, you can retrieve it from the Checkout Session's PaymentIntent. + # + # When processing card payments, Checkout also uses `setup_future_usage` to dynamically optimize your payment flow and comply with regional legislation and network rules, such as SCA. + sig { returns(String) } + attr_accessor :setup_future_usage + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(String) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(String) } + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(capture_method: String, description: String, metadata: T::Hash[String, String], setup_future_usage: String, statement_descriptor: String, statement_descriptor_suffix: String, transfer_group: String).void + } + def initialize( + capture_method: nil, + description: nil, + metadata: nil, + setup_future_usage: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ); end + end + class PhoneNumberCollection < Stripe::RequestParams + # Set to `true` to enable phone number collection. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + sig { returns(Integer) } + attr_accessor :limit + sig { params(limit: Integer).void } + def initialize(limit: nil); end + end + # Configuration for the `completed_sessions` restriction type. + sig { returns(::Stripe::PaymentLinkService::CreateParams::Restrictions::CompletedSessions) } + attr_accessor :completed_sessions + sig { + params(completed_sessions: ::Stripe::PaymentLinkService::CreateParams::Restrictions::CompletedSessions).void + } + def initialize(completed_sessions: nil); end + end + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + sig { returns(T::Array[String]) } + attr_accessor :allowed_countries + sig { params(allowed_countries: T::Array[String]).void } + def initialize(allowed_countries: nil); end + end + class ShippingOption < Stripe::RequestParams + # The ID of the Shipping Rate to use for this shipping option. + sig { returns(String) } + attr_accessor :shipping_rate + sig { params(shipping_rate: String).void } + def initialize(shipping_rate: nil); end + end + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(issuer: ::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings::Issuer).void + } + def initialize(issuer: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { + returns(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings) + } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + sig { returns(Integer) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { returns(::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings) } + attr_accessor :trial_settings + sig { + params(description: String, invoice_settings: ::Stripe::PaymentLinkService::CreateParams::SubscriptionData::InvoiceSettings, metadata: T::Hash[String, String], trial_period_days: Integer, trial_settings: ::Stripe::PaymentLinkService::CreateParams::SubscriptionData::TrialSettings).void + } + def initialize( + description: nil, + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + sig { returns(String) } + attr_accessor :required + sig { params(enabled: T::Boolean, required: String).void } + def initialize(enabled: nil, required: nil); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when a charge succeeds. + sig { returns(Integer) } + attr_accessor :amount + # If specified, successful charges will be attributed to the destination + # account for tax reporting, and the funds from charges will be transferred + # to the destination account. The ID of the resulting transfer will be + # returned on the successful charge's `transfer` field. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, destination: String).void } + def initialize(amount: nil, destination: nil); end + end + # Behavior after the purchase is complete. + sig { returns(::Stripe::PaymentLinkService::CreateParams::AfterCompletion) } + attr_accessor :after_completion + # Enables user redeemable promotion codes. + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. Can only be applied when there are no line items with recurring prices. + sig { returns(Integer) } + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + sig { returns(Float) } + attr_accessor :application_fee_percent + # Configuration for automatic tax collection. + sig { returns(::Stripe::PaymentLinkService::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + sig { returns(String) } + attr_accessor :billing_address_collection + # Configure fields to gather active consent from customers. + sig { returns(::Stripe::PaymentLinkService::CreateParams::ConsentCollection) } + attr_accessor :consent_collection + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies) and supported by each line item's price. + sig { returns(String) } + attr_accessor :currency + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField]) } + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + sig { returns(::Stripe::PaymentLinkService::CreateParams::CustomText) } + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + sig { returns(String) } + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + sig { returns(String) } + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + sig { returns(::Stripe::PaymentLinkService::CreateParams::InvoiceCreation) } + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + sig { returns(T::Array[::Stripe::PaymentLinkService::CreateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge. + sig { returns(String) } + attr_accessor :on_behalf_of + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + sig { returns(::Stripe::PaymentLinkService::CreateParams::PaymentIntentData) } + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + sig { returns(String) } + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. If no value is passed, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods) (20+ payment methods [supported](https://stripe.com/docs/payments/payment-methods/integration-options#payment-method-product-support)). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # Controls phone number collection settings during checkout. + # + # We recommend that you review your privacy policy and check with your legal contacts. + sig { returns(::Stripe::PaymentLinkService::CreateParams::PhoneNumberCollection) } + attr_accessor :phone_number_collection + # Settings that restrict the usage of a payment link. + sig { returns(::Stripe::PaymentLinkService::CreateParams::Restrictions) } + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + sig { returns(::Stripe::PaymentLinkService::CreateParams::ShippingAddressCollection) } + attr_accessor :shipping_address_collection + # The shipping rate options to apply to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + sig { returns(T::Array[::Stripe::PaymentLinkService::CreateParams::ShippingOption]) } + attr_accessor :shipping_options + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + sig { returns(String) } + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + sig { returns(::Stripe::PaymentLinkService::CreateParams::SubscriptionData) } + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + sig { returns(::Stripe::PaymentLinkService::CreateParams::TaxIdCollection) } + attr_accessor :tax_id_collection + # The account (if any) the payments will be attributed to for tax reporting, and where funds from each payment will be transferred to. + sig { returns(::Stripe::PaymentLinkService::CreateParams::TransferData) } + attr_accessor :transfer_data + sig { + params(after_completion: ::Stripe::PaymentLinkService::CreateParams::AfterCompletion, allow_promotion_codes: T::Boolean, application_fee_amount: Integer, application_fee_percent: Float, automatic_tax: ::Stripe::PaymentLinkService::CreateParams::AutomaticTax, billing_address_collection: String, consent_collection: ::Stripe::PaymentLinkService::CreateParams::ConsentCollection, currency: String, custom_fields: T::Array[::Stripe::PaymentLinkService::CreateParams::CustomField], custom_text: ::Stripe::PaymentLinkService::CreateParams::CustomText, customer_creation: String, expand: T::Array[String], inactive_message: String, invoice_creation: ::Stripe::PaymentLinkService::CreateParams::InvoiceCreation, line_items: T::Array[::Stripe::PaymentLinkService::CreateParams::LineItem], metadata: T::Hash[String, String], on_behalf_of: String, payment_intent_data: ::Stripe::PaymentLinkService::CreateParams::PaymentIntentData, payment_method_collection: String, payment_method_types: T::Array[String], phone_number_collection: ::Stripe::PaymentLinkService::CreateParams::PhoneNumberCollection, restrictions: ::Stripe::PaymentLinkService::CreateParams::Restrictions, shipping_address_collection: ::Stripe::PaymentLinkService::CreateParams::ShippingAddressCollection, shipping_options: T::Array[::Stripe::PaymentLinkService::CreateParams::ShippingOption], submit_type: String, subscription_data: ::Stripe::PaymentLinkService::CreateParams::SubscriptionData, tax_id_collection: ::Stripe::PaymentLinkService::CreateParams::TaxIdCollection, transfer_data: ::Stripe::PaymentLinkService::CreateParams::TransferData).void + } + def initialize( + after_completion: nil, + allow_promotion_codes: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_address_collection: nil, + consent_collection: nil, + currency: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + on_behalf_of: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + phone_number_collection: nil, + restrictions: nil, + shipping_address_collection: nil, + shipping_options: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil, + transfer_data: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AfterCompletion < Stripe::RequestParams + class HostedConfirmation < Stripe::RequestParams + # A custom message to display to the customer after the purchase is complete. + sig { returns(String) } + attr_accessor :custom_message + sig { params(custom_message: String).void } + def initialize(custom_message: nil); end + end + class Redirect < Stripe::RequestParams + # The URL the customer will be redirected to after the purchase is complete. You can embed `{CHECKOUT_SESSION_ID}` into the URL to have the `id` of the completed [checkout session](https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-id) included. + sig { returns(String) } + attr_accessor :url + sig { params(url: String).void } + def initialize(url: nil); end + end + # Configuration when `type=hosted_confirmation`. + sig { + returns(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::HostedConfirmation) + } + attr_accessor :hosted_confirmation + # Configuration when `type=redirect`. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::Redirect) } + attr_accessor :redirect + # The specified behavior after the purchase is complete. Either `redirect` or `hosted_confirmation`. + sig { returns(String) } + attr_accessor :type + sig { + params(hosted_confirmation: ::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::HostedConfirmation, redirect: ::Stripe::PaymentLinkService::UpdateParams::AfterCompletion::Redirect, type: String).void + } + def initialize(hosted_confirmation: nil, redirect: nil, type: nil); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Set to `true` to [calculate tax automatically](https://docs.stripe.com/tax) using the customer's location. + # + # Enabling this parameter causes the payment link to collect any billing address information necessary for tax calculation. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::PaymentLinkService::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class CustomField < Stripe::RequestParams + class Dropdown < Stripe::RequestParams + class Option < Stripe::RequestParams + # The label for the option, displayed to the customer. Up to 100 characters. + sig { returns(String) } + attr_accessor :label + # The value for this option, not displayed to the customer, used by your integration to reconcile the option selected by the customer. Must be unique to this option, alphanumeric, and up to 100 characters. + sig { returns(String) } + attr_accessor :value + sig { params(label: String, value: String).void } + def initialize(label: nil, value: nil); end + end + # The options available for the customer to select. Up to 200 options allowed. + sig { + returns(T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown::Option]) + } + attr_accessor :options + sig { + params(options: T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown::Option]).void + } + def initialize(options: nil); end + end + class Label < Stripe::RequestParams + # Custom text for the label, displayed to the customer. Up to 50 characters. + sig { returns(String) } + attr_accessor :custom + # The type of the label. + sig { returns(String) } + attr_accessor :type + sig { params(custom: String, type: String).void } + def initialize(custom: nil, type: nil); end + end + class Numeric < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + class Text < Stripe::RequestParams + # The maximum character length constraint for the customer's input. + sig { returns(Integer) } + attr_accessor :maximum_length + # The minimum character length requirement for the customer's input. + sig { returns(Integer) } + attr_accessor :minimum_length + sig { params(maximum_length: Integer, minimum_length: Integer).void } + def initialize(maximum_length: nil, minimum_length: nil); end + end + # Configuration for `type=dropdown` fields. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown) } + attr_accessor :dropdown + # String of your choice that your integration can use to reconcile this field. Must be unique to this field, alphanumeric, and up to 200 characters. + sig { returns(String) } + attr_accessor :key + # The label for the field, displayed to the customer. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::CustomField::Label) } + attr_accessor :label + # Configuration for `type=numeric` fields. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::CustomField::Numeric) } + attr_accessor :numeric + # Whether the customer is required to complete the field before completing the Checkout Session. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :optional + # Configuration for `type=text` fields. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::CustomField::Text) } + attr_accessor :text + # The type of the field. + sig { returns(String) } + attr_accessor :type + sig { + params(dropdown: ::Stripe::PaymentLinkService::UpdateParams::CustomField::Dropdown, key: String, label: ::Stripe::PaymentLinkService::UpdateParams::CustomField::Label, numeric: ::Stripe::PaymentLinkService::UpdateParams::CustomField::Numeric, optional: T::Boolean, text: ::Stripe::PaymentLinkService::UpdateParams::CustomField::Text, type: String).void + } + def initialize( + dropdown: nil, + key: nil, + label: nil, + numeric: nil, + optional: nil, + text: nil, + type: nil + ); end + end + class CustomText < Stripe::RequestParams + class AfterSubmit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class ShippingAddress < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class Submit < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + class TermsOfServiceAcceptance < Stripe::RequestParams + # Text may be up to 1200 characters in length. + sig { returns(String) } + attr_accessor :message + sig { params(message: String).void } + def initialize(message: nil); end + end + # Custom text that should be displayed after the payment confirmation button. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::AfterSubmit)) + } + attr_accessor :after_submit + # Custom text that should be displayed alongside shipping address collection. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::ShippingAddress)) + } + attr_accessor :shipping_address + # Custom text that should be displayed alongside the payment confirmation button. + sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::Submit)) } + attr_accessor :submit + # Custom text that should be displayed in place of the default terms of service agreement text. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::TermsOfServiceAcceptance)) + } + attr_accessor :terms_of_service_acceptance + sig { + params(after_submit: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::AfterSubmit), shipping_address: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::ShippingAddress), submit: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::Submit), terms_of_service_acceptance: T.nilable(::Stripe::PaymentLinkService::UpdateParams::CustomText::TermsOfServiceAcceptance)).void + } + def initialize( + after_submit: nil, + shipping_address: nil, + submit: nil, + terms_of_service_acceptance: nil + ); end + end + class InvoiceCreation < Stripe::RequestParams + class InvoiceData < Stripe::RequestParams + class CustomField < Stripe::RequestParams + # The name of the custom field. This may be up to 40 characters. + sig { returns(String) } + attr_accessor :name + # The value of the custom field. This may be up to 140 characters. + sig { returns(String) } + attr_accessor :value + sig { params(name: String, value: String).void } + def initialize(name: nil, value: nil); end + end + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + class RenderingOptions < Stripe::RequestParams + # How line-item prices and amounts will be displayed with respect to tax on invoice PDFs. One of `exclude_tax` or `include_inclusive_tax`. `include_inclusive_tax` will include inclusive tax (and exclude exclusive tax) in invoice PDF amounts. `exclude_tax` will exclude all tax (inclusive and exclusive alike) from invoice PDF amounts. + sig { returns(T.nilable(String)) } + attr_accessor :amount_tax_display + sig { params(amount_tax_display: T.nilable(String)).void } + def initialize(amount_tax_display: nil); end + end + # The account tax IDs associated with the invoice. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Default custom fields to be displayed on invoices for this customer. + sig { + returns(T.nilable(T::Array[::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::CustomField])) + } + attr_accessor :custom_fields + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Default footer to be displayed on invoices for this customer. + sig { returns(String) } + attr_accessor :footer + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::Issuer) + } + attr_accessor :issuer + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Default options for invoice PDF rendering for this customer. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions)) + } + attr_accessor :rendering_options + sig { + params(account_tax_ids: T.nilable(T::Array[String]), custom_fields: T.nilable(T::Array[::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::CustomField]), description: String, footer: String, issuer: ::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::Issuer, metadata: T.nilable(T::Hash[String, String]), rendering_options: T.nilable(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData::RenderingOptions)).void + } + def initialize( + account_tax_ids: nil, + custom_fields: nil, + description: nil, + footer: nil, + issuer: nil, + metadata: nil, + rendering_options: nil + ); end + end + # Whether the feature is enabled + sig { returns(T::Boolean) } + attr_accessor :enabled + # Invoice PDF configuration. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData) } + attr_accessor :invoice_data + sig { + params(enabled: T::Boolean, invoice_data: ::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation::InvoiceData).void + } + def initialize(enabled: nil, invoice_data: nil); end + end + class LineItem < Stripe::RequestParams + class AdjustableQuantity < Stripe::RequestParams + # Set to true if the quantity can be adjusted to any non-negative Integer. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum quantity the customer can purchase. By default this value is 99. You can specify a value up to 999. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum quantity the customer can purchase. By default this value is 0. If there is only one item in the cart then that item's quantity cannot go down to 0. + sig { returns(Integer) } + attr_accessor :minimum + sig { params(enabled: T::Boolean, maximum: Integer, minimum: Integer).void } + def initialize(enabled: nil, maximum: nil, minimum: nil); end + end + # When set, provides configuration for this item’s quantity to be adjusted by the customer during checkout. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::LineItem::AdjustableQuantity) } + attr_accessor :adjustable_quantity + # The ID of an existing line item on the payment link. + sig { returns(String) } + attr_accessor :id + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + sig { + params(adjustable_quantity: ::Stripe::PaymentLinkService::UpdateParams::LineItem::AdjustableQuantity, id: String, quantity: Integer).void + } + def initialize(adjustable_quantity: nil, id: nil, quantity: nil); end + end + class PaymentIntentData < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Payment Intents](https://stripe.com/docs/api/payment_intents) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Text that appears on the customer's statement as the statement descriptor for a non-card charge. This value overrides the account's default statement descriptor. For information about requirements, including the 22-character limit, see [the Statement Descriptor docs](https://docs.stripe.com/get-started/account/statement-descriptors). + # + # Setting this value for a card charge returns an error. For card charges, set the [statement_descriptor_suffix](https://docs.stripe.com/get-started/account/statement-descriptors#dynamic) instead. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor + # Provides information about a card charge. Concatenated to the account's [statement descriptor prefix](https://docs.stripe.com/get-started/account/statement-descriptors#static) to form the complete statement descriptor that appears on the customer's statement. + sig { returns(T.nilable(String)) } + attr_accessor :statement_descriptor_suffix + # A string that identifies the resulting payment as part of a group. See the PaymentIntents [use case for connected accounts](https://stripe.com/docs/connect/separate-charges-and-transfers) for details. + sig { returns(T.nilable(String)) } + attr_accessor :transfer_group + sig { + params(description: T.nilable(String), metadata: T.nilable(T::Hash[String, String]), statement_descriptor: T.nilable(String), statement_descriptor_suffix: T.nilable(String), transfer_group: T.nilable(String)).void + } + def initialize( + description: nil, + metadata: nil, + statement_descriptor: nil, + statement_descriptor_suffix: nil, + transfer_group: nil + ); end + end + class Restrictions < Stripe::RequestParams + class CompletedSessions < Stripe::RequestParams + # The maximum number of checkout sessions that can be completed for the `completed_sessions` restriction to be met. + sig { returns(Integer) } + attr_accessor :limit + sig { params(limit: Integer).void } + def initialize(limit: nil); end + end + # Configuration for the `completed_sessions` restriction type. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::Restrictions::CompletedSessions) } + attr_accessor :completed_sessions + sig { + params(completed_sessions: ::Stripe::PaymentLinkService::UpdateParams::Restrictions::CompletedSessions).void + } + def initialize(completed_sessions: nil); end + end + class ShippingAddressCollection < Stripe::RequestParams + # An array of two-letter ISO country codes representing which countries Checkout should provide as options for + # shipping locations. + sig { returns(T::Array[String]) } + attr_accessor :allowed_countries + sig { params(allowed_countries: T::Array[String]).void } + def initialize(allowed_countries: nil); end + end + class SubscriptionData < Stripe::RequestParams + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(issuer: ::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings::Issuer).void + } + def initialize(issuer: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { + returns(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings) + } + attr_accessor :invoice_settings + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will declaratively set metadata on [Subscriptions](https://stripe.com/docs/api/subscriptions) generated from this payment link. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Integer representing the number of trial period days before the customer is charged for the first time. Has to be at least 1. + sig { returns(T.nilable(Integer)) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings)) + } + attr_accessor :trial_settings + sig { + params(invoice_settings: ::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::InvoiceSettings, metadata: T.nilable(T::Hash[String, String]), trial_period_days: T.nilable(Integer), trial_settings: T.nilable(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData::TrialSettings)).void + } + def initialize( + invoice_settings: nil, + metadata: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class TaxIdCollection < Stripe::RequestParams + # Enable tax ID collection during checkout. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Describes whether a tax ID is required during checkout. Defaults to `never`. + sig { returns(String) } + attr_accessor :required + sig { params(enabled: T::Boolean, required: String).void } + def initialize(enabled: nil, required: nil); end + end + # Whether the payment link's `url` is active. If `false`, customers visiting the URL will be shown a page saying that the link has been deactivated. + sig { returns(T::Boolean) } + attr_accessor :active + # Behavior after the purchase is complete. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::AfterCompletion) } + attr_accessor :after_completion + # Enables user redeemable promotion codes. + sig { returns(T::Boolean) } + attr_accessor :allow_promotion_codes + # Configuration for automatic tax collection. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Configuration for collecting the customer's billing address. Defaults to `auto`. + sig { returns(String) } + attr_accessor :billing_address_collection + # Collect additional information from your customer using custom fields. Up to 3 fields are supported. + sig { returns(T.nilable(T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField])) } + attr_accessor :custom_fields + # Display additional text for your customers using custom text. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::CustomText) } + attr_accessor :custom_text + # Configures whether [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link create a [Customer](https://stripe.com/docs/api/customers). + sig { returns(String) } + attr_accessor :customer_creation + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The custom message to be displayed to a customer when a payment link is no longer active. + sig { returns(T.nilable(String)) } + attr_accessor :inactive_message + # Generate a post-purchase Invoice for one-time payments. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation) } + attr_accessor :invoice_creation + # The line items representing what is being sold. Each line item represents an item being sold. Up to 20 line items are supported. + sig { returns(T::Array[::Stripe::PaymentLinkService::UpdateParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. Metadata associated with this Payment Link will automatically be copied to [checkout sessions](https://stripe.com/docs/api/checkout/sessions) created by this payment link. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A subset of parameters to be passed to PaymentIntent creation for Checkout Sessions in `payment` mode. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::PaymentIntentData) } + attr_accessor :payment_intent_data + # Specify whether Checkout should collect a payment method. When set to `if_required`, Checkout will not collect a payment method when the total due for the session is 0.This may occur if the Checkout Session includes a free trial or a discount. + # + # Can only be set in `subscription` mode. Defaults to `always`. + # + # If you'd like information on how to collect a payment method outside of Checkout, read the guide on [configuring subscriptions with a free trial](https://stripe.com/docs/payments/checkout/free-trials). + sig { returns(String) } + attr_accessor :payment_method_collection + # The list of payment method types that customers can use. Pass an empty string to enable dynamic payment methods that use your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + # Settings that restrict the usage of a payment link. + sig { returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::Restrictions)) } + attr_accessor :restrictions + # Configuration for collecting the customer's shipping address. + sig { + returns(T.nilable(::Stripe::PaymentLinkService::UpdateParams::ShippingAddressCollection)) + } + attr_accessor :shipping_address_collection + # Describes the type of transaction being performed in order to customize relevant text on the page, such as the submit button. Changing this value will also affect the hostname in the [url](https://stripe.com/docs/api/payment_links/payment_links/object#url) property (example: `donate.stripe.com`). + sig { returns(String) } + attr_accessor :submit_type + # When creating a subscription, the specified configuration data will be used. There must be at least one line item with a recurring price to use `subscription_data`. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::SubscriptionData) } + attr_accessor :subscription_data + # Controls tax ID collection during checkout. + sig { returns(::Stripe::PaymentLinkService::UpdateParams::TaxIdCollection) } + attr_accessor :tax_id_collection + sig { + params(active: T::Boolean, after_completion: ::Stripe::PaymentLinkService::UpdateParams::AfterCompletion, allow_promotion_codes: T::Boolean, automatic_tax: ::Stripe::PaymentLinkService::UpdateParams::AutomaticTax, billing_address_collection: String, custom_fields: T.nilable(T::Array[::Stripe::PaymentLinkService::UpdateParams::CustomField]), custom_text: ::Stripe::PaymentLinkService::UpdateParams::CustomText, customer_creation: String, expand: T::Array[String], inactive_message: T.nilable(String), invoice_creation: ::Stripe::PaymentLinkService::UpdateParams::InvoiceCreation, line_items: T::Array[::Stripe::PaymentLinkService::UpdateParams::LineItem], metadata: T::Hash[String, String], payment_intent_data: ::Stripe::PaymentLinkService::UpdateParams::PaymentIntentData, payment_method_collection: String, payment_method_types: T.nilable(T::Array[String]), restrictions: T.nilable(::Stripe::PaymentLinkService::UpdateParams::Restrictions), shipping_address_collection: T.nilable(::Stripe::PaymentLinkService::UpdateParams::ShippingAddressCollection), submit_type: String, subscription_data: ::Stripe::PaymentLinkService::UpdateParams::SubscriptionData, tax_id_collection: ::Stripe::PaymentLinkService::UpdateParams::TaxIdCollection).void + } + def initialize( + active: nil, + after_completion: nil, + allow_promotion_codes: nil, + automatic_tax: nil, + billing_address_collection: nil, + custom_fields: nil, + custom_text: nil, + customer_creation: nil, + expand: nil, + inactive_message: nil, + invoice_creation: nil, + line_items: nil, + metadata: nil, + payment_intent_data: nil, + payment_method_collection: nil, + payment_method_types: nil, + restrictions: nil, + shipping_address_collection: nil, + submit_type: nil, + subscription_data: nil, + tax_id_collection: nil + ); end + end + # Creates a payment link. + sig { + params(params: T.any(::Stripe::PaymentLinkService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink) + } + def create(params = {}, opts = {}); end + + # Returns a list of your payment links. + sig { + params(params: T.any(::Stripe::PaymentLinkService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieve a payment link. + sig { + params(payment_link: String, params: T.any(::Stripe::PaymentLinkService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink) + } + def retrieve(payment_link, params = {}, opts = {}); end + + # Updates a payment link. + sig { + params(payment_link: String, params: T.any(::Stripe::PaymentLinkService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentLink) + } + def update(payment_link, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_method_configuration_service.rbi b/rbi/stripe/services/payment_method_configuration_service.rbi new file mode 100644 index 000000000..166219b80 --- /dev/null +++ b/rbi/stripe/services/payment_method_configuration_service.rbi @@ -0,0 +1,2171 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentMethodConfigurationService < StripeService + class ListParams < Stripe::RequestParams + # The Connect application to filter by. + sig { returns(T.nilable(String)) } + attr_accessor :application + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(application: T.nilable(String), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + application: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Alma::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Alma::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Blik::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Blik::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Card::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Card::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Eps::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Eps::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Gopay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Gopay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::IdBankTransfer::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::IdBankTransfer::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Link::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Link::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::P24::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::P24::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Payto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Payto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Qris::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Qris::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Shopeepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Shopeepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Swish::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Swish::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Twint::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Twint::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Zip::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::CreateParams::Zip::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit) } + attr_accessor :acss_debit + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm) } + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay) } + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Alma) } + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay) } + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay) } + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater) } + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit) } + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit) } + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact) } + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Blik) } + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto) } + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Card) } + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires) } + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp) } + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance) } + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Eps) } + attr_accessor :eps + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx) } + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay) } + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay) } + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Gopay) } + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay) } + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::IdBankTransfer) } + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal) } + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb) } + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna) } + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini) } + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Link) } + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay) } + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco) } + attr_accessor :multibanco + # Configuration name. + sig { returns(String) } + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo) } + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::P24) } + attr_accessor :p24 + # Configuration's parent configuration. Specify to create a child configuration. + sig { returns(String) } + attr_accessor :parent + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow) } + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal) } + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Payto) } + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay) } + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Qris) } + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay) } + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit) } + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Shopeepay) } + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort) } + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Swish) } + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Twint) } + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount) } + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay) } + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfigurationService::CreateParams::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentMethodConfigurationService::CreateParams::AcssDebit, affirm: ::Stripe::PaymentMethodConfigurationService::CreateParams::Affirm, afterpay_clearpay: ::Stripe::PaymentMethodConfigurationService::CreateParams::AfterpayClearpay, alipay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Alipay, alma: ::Stripe::PaymentMethodConfigurationService::CreateParams::Alma, amazon_pay: ::Stripe::PaymentMethodConfigurationService::CreateParams::AmazonPay, apple_pay: ::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePay, apple_pay_later: ::Stripe::PaymentMethodConfigurationService::CreateParams::ApplePayLater, au_becs_debit: ::Stripe::PaymentMethodConfigurationService::CreateParams::AuBecsDebit, bacs_debit: ::Stripe::PaymentMethodConfigurationService::CreateParams::BacsDebit, bancontact: ::Stripe::PaymentMethodConfigurationService::CreateParams::Bancontact, blik: ::Stripe::PaymentMethodConfigurationService::CreateParams::Blik, boleto: ::Stripe::PaymentMethodConfigurationService::CreateParams::Boleto, card: ::Stripe::PaymentMethodConfigurationService::CreateParams::Card, cartes_bancaires: ::Stripe::PaymentMethodConfigurationService::CreateParams::CartesBancaires, cashapp: ::Stripe::PaymentMethodConfigurationService::CreateParams::Cashapp, customer_balance: ::Stripe::PaymentMethodConfigurationService::CreateParams::CustomerBalance, eps: ::Stripe::PaymentMethodConfigurationService::CreateParams::Eps, expand: T::Array[String], fpx: ::Stripe::PaymentMethodConfigurationService::CreateParams::Fpx, giropay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Giropay, google_pay: ::Stripe::PaymentMethodConfigurationService::CreateParams::GooglePay, gopay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Gopay, grabpay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Grabpay, id_bank_transfer: ::Stripe::PaymentMethodConfigurationService::CreateParams::IdBankTransfer, ideal: ::Stripe::PaymentMethodConfigurationService::CreateParams::Ideal, jcb: ::Stripe::PaymentMethodConfigurationService::CreateParams::Jcb, klarna: ::Stripe::PaymentMethodConfigurationService::CreateParams::Klarna, konbini: ::Stripe::PaymentMethodConfigurationService::CreateParams::Konbini, link: ::Stripe::PaymentMethodConfigurationService::CreateParams::Link, mobilepay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Mobilepay, multibanco: ::Stripe::PaymentMethodConfigurationService::CreateParams::Multibanco, name: String, oxxo: ::Stripe::PaymentMethodConfigurationService::CreateParams::Oxxo, p24: ::Stripe::PaymentMethodConfigurationService::CreateParams::P24, parent: String, paynow: ::Stripe::PaymentMethodConfigurationService::CreateParams::Paynow, paypal: ::Stripe::PaymentMethodConfigurationService::CreateParams::Paypal, payto: ::Stripe::PaymentMethodConfigurationService::CreateParams::Payto, promptpay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Promptpay, qris: ::Stripe::PaymentMethodConfigurationService::CreateParams::Qris, revolut_pay: ::Stripe::PaymentMethodConfigurationService::CreateParams::RevolutPay, sepa_debit: ::Stripe::PaymentMethodConfigurationService::CreateParams::SepaDebit, shopeepay: ::Stripe::PaymentMethodConfigurationService::CreateParams::Shopeepay, sofort: ::Stripe::PaymentMethodConfigurationService::CreateParams::Sofort, swish: ::Stripe::PaymentMethodConfigurationService::CreateParams::Swish, twint: ::Stripe::PaymentMethodConfigurationService::CreateParams::Twint, us_bank_account: ::Stripe::PaymentMethodConfigurationService::CreateParams::UsBankAccount, wechat_pay: ::Stripe::PaymentMethodConfigurationService::CreateParams::WechatPay, zip: ::Stripe::PaymentMethodConfigurationService::CreateParams::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + parent: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Affirm < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AfterpayClearpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alipay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Alma < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AmazonPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class ApplePayLater < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class AuBecsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class BacsDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Bancontact < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Blik < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Boleto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Card < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Card::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Card::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CartesBancaires < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Cashapp < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class CustomerBalance < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Eps < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Fpx < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Giropay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class GooglePay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Gopay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Gopay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Gopay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Grabpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class IdBankTransfer < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::IdBankTransfer::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::IdBankTransfer::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Ideal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Jcb < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Klarna < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Konbini < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Link < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Link::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Link::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Mobilepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Multibanco < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Oxxo < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class P24 < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::P24::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::P24::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paynow < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Paypal < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Payto < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Payto::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Payto::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Promptpay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Qris < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Qris::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Qris::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class RevolutPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class SepaDebit < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Shopeepay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Shopeepay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Shopeepay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Sofort < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Swish < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Twint < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class UsBankAccount < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class WechatPay < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + class Zip < Stripe::RequestParams + class DisplayPreference < Stripe::RequestParams + # The account's preference for whether or not to display this payment method. + sig { returns(String) } + attr_accessor :preference + sig { params(preference: String).void } + def initialize(preference: nil); end + end + # Whether or not the payment method should be displayed. + sig { + returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip::DisplayPreference) + } + attr_accessor :display_preference + sig { + params(display_preference: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip::DisplayPreference).void + } + def initialize(display_preference: nil); end + end + # Canadian pre-authorized debit payments, check this [page](https://stripe.com/docs/payments/acss-debit) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit) } + attr_accessor :acss_debit + # Whether the configuration can be used for new payments. + sig { returns(T::Boolean) } + attr_accessor :active + # [Affirm](https://www.affirm.com/) gives your customers a way to split purchases over a series of payments. Depending on the purchase, they can pay with four interest-free payments (Split Pay) or pay over a longer term (Installments), which might include interest. Check this [page](https://stripe.com/docs/payments/affirm) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm) } + attr_accessor :affirm + # Afterpay gives your customers a way to pay for purchases in installments, check this [page](https://stripe.com/docs/payments/afterpay-clearpay) for more details like country availability. Afterpay is particularly popular among businesses selling fashion, beauty, and sports products. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # Alipay is a digital wallet in China that has more than a billion active users worldwide. Alipay users can pay on the web or on a mobile device using login credentials or their Alipay app. Alipay has a low dispute rate and reduces fraud by authenticating payments using the customer's login credentials. Check this [page](https://stripe.com/docs/payments/alipay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay) } + attr_accessor :alipay + # Alma is a Buy Now, Pay Later payment method that offers customers the ability to pay in 2, 3, or 4 installments. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma) } + attr_accessor :alma + # Amazon Pay is a wallet payment method that lets your customers check out the same way as on Amazon. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay) } + attr_accessor :amazon_pay + # Stripe users can accept [Apple Pay](/payments/apple-pay) in iOS applications in iOS 9 and later, and on the web in Safari starting with iOS 10 or macOS Sierra. There are no additional fees to process Apple Pay payments, and the [pricing](/pricing) is the same as other card transactions. Check this [page](https://stripe.com/docs/apple-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay) } + attr_accessor :apple_pay + # Apple Pay Later, a payment method for customers to buy now and pay later, gives your customers a way to split purchases into four installments across six weeks. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater) } + attr_accessor :apple_pay_later + # Stripe users in Australia can accept Bulk Electronic Clearing System (BECS) direct debit payments from customers with an Australian bank account. Check this [page](https://stripe.com/docs/payments/au-becs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit) } + attr_accessor :au_becs_debit + # Stripe users in the UK can accept Bacs Direct Debit payments from customers with a UK bank account, check this [page](https://stripe.com/docs/payments/payment-methods/bacs-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit) } + attr_accessor :bacs_debit + # Bancontact is the most popular online payment method in Belgium, with over 15 million cards in circulation. [Customers](https://stripe.com/docs/api/customers) use a Bancontact card or mobile app linked to a Belgian bank account to make online payments that are secure, guaranteed, and confirmed immediately. Check this [page](https://stripe.com/docs/payments/bancontact) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact) } + attr_accessor :bancontact + # BLIK is a [single use](https://stripe.com/docs/payments/payment-methods#usage) payment method that requires customers to authenticate their payments. When customers want to pay online using BLIK, they request a six-digit code from their banking application and enter it into the payment collection form. Check this [page](https://stripe.com/docs/payments/blik) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik) } + attr_accessor :blik + # Boleto is an official (regulated by the Central Bank of Brazil) payment method in Brazil. Check this [page](https://stripe.com/docs/payments/boleto) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto) } + attr_accessor :boleto + # Cards are a popular way for consumers and businesses to pay online or in person. Stripe supports global and local card networks. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Card) } + attr_accessor :card + # Cartes Bancaires is France's local card network. More than 95% of these cards are co-branded with either Visa or Mastercard, meaning you can process these cards over either Cartes Bancaires or the Visa or Mastercard networks. Check this [page](https://stripe.com/docs/payments/cartes-bancaires) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires) } + attr_accessor :cartes_bancaires + # Cash App is a popular consumer app in the US that allows customers to bank, invest, send, and receive money using their digital wallet. Check this [page](https://stripe.com/docs/payments/cash-app-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp) } + attr_accessor :cashapp + # Uses a customer’s [cash balance](https://stripe.com/docs/payments/customer-balance) for the payment. The cash balance can be funded via a bank transfer. Check this [page](https://stripe.com/docs/payments/bank-transfers) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance) } + attr_accessor :customer_balance + # EPS is an Austria-based payment method that allows customers to complete transactions online using their bank credentials. EPS is supported by all Austrian banks and is accepted by over 80% of Austrian online retailers. Check this [page](https://stripe.com/docs/payments/eps) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps) } + attr_accessor :eps + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Financial Process Exchange (FPX) is a Malaysia-based payment method that allows customers to complete transactions online using their bank credentials. Bank Negara Malaysia (BNM), the Central Bank of Malaysia, and eleven other major Malaysian financial institutions are members of the PayNet Group, which owns and operates FPX. It is one of the most popular online payment methods in Malaysia, with nearly 90 million transactions in 2018 according to BNM. Check this [page](https://stripe.com/docs/payments/fpx) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx) } + attr_accessor :fpx + # giropay is a German payment method based on online banking, introduced in 2006. It allows customers to complete transactions online using their online banking environment, with funds debited from their bank account. Depending on their bank, customers confirm payments on giropay using a second factor of authentication or a PIN. giropay accounts for 10% of online checkouts in Germany. Check this [page](https://stripe.com/docs/payments/giropay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay) } + attr_accessor :giropay + # Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer's Google account. Check this [page](https://stripe.com/docs/google-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay) } + attr_accessor :google_pay + # GoPay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Gojek app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Gojek app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Gopay) } + attr_accessor :gopay + # GrabPay is a payment method developed by [Grab](https://www.grab.com/sg/consumer/finance/pay/). GrabPay is a digital wallet - customers maintain a balance in their wallets that they pay out with. Check this [page](https://stripe.com/docs/payments/grabpay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay) } + attr_accessor :grabpay + # Stripe users in Indonesia can receive bank transfers from customers in Indonesia. Bank transfers are a popular B2C and B2B payment method in Indonesia. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::IdBankTransfer) } + attr_accessor :id_bank_transfer + # iDEAL is a Netherlands-based payment method that allows customers to complete transactions online using their bank credentials. All major Dutch banks are members of Currence, the scheme that operates iDEAL, making it the most popular online payment method in the Netherlands with a share of online transactions close to 55%. Check this [page](https://stripe.com/docs/payments/ideal) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal) } + attr_accessor :ideal + # JCB is a credit card company based in Japan. JCB is currently available in Japan to businesses approved by JCB, and available to all businesses in Australia, Canada, Hong Kong, Japan, New Zealand, Singapore, Switzerland, United Kingdom, United States, and all countries in the European Economic Area except Iceland. Check this [page](https://support.stripe.com/questions/accepting-japan-credit-bureau-%28jcb%29-payments) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb) } + attr_accessor :jcb + # Klarna gives customers a range of [payment options](https://stripe.com/docs/payments/klarna#payment-options) during checkout. Available payment options vary depending on the customer's billing address and the transaction amount. These payment options make it convenient for customers to purchase items in all price ranges. Check this [page](https://stripe.com/docs/payments/klarna) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna) } + attr_accessor :klarna + # Konbini allows customers in Japan to pay for bills and online purchases at convenience stores with cash. Check this [page](https://stripe.com/docs/payments/konbini) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini) } + attr_accessor :konbini + # [Link](https://stripe.com/docs/payments/link) is a payment method network. With Link, users save their payment details once, then reuse that information to pay with one click for any business on the network. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Link) } + attr_accessor :link + # MobilePay is a [single-use](https://stripe.com/docs/payments/payment-methods#usage) card wallet payment method used in Denmark and Finland. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the MobilePay app. Check this [page](https://stripe.com/docs/payments/mobilepay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay) } + attr_accessor :mobilepay + # Stripe users in Europe and the United States can accept Multibanco payments from customers in Portugal using [Sources](https://stripe.com/docs/sources)—a single integration path for creating payments using any supported method. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco) } + attr_accessor :multibanco + # Configuration name. + sig { returns(String) } + attr_accessor :name + # OXXO is a Mexican chain of convenience stores with thousands of locations across Latin America and represents nearly 20% of online transactions in Mexico. OXXO allows customers to pay bills and online purchases in-store with cash. Check this [page](https://stripe.com/docs/payments/oxxo) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo) } + attr_accessor :oxxo + # Przelewy24 is a Poland-based payment method aggregator that allows customers to complete transactions online using bank transfers and other methods. Bank transfers account for 30% of online payments in Poland and Przelewy24 provides a way for customers to pay with over 165 banks. Check this [page](https://stripe.com/docs/payments/p24) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::P24) } + attr_accessor :p24 + # PayNow is a Singapore-based payment method that allows customers to make a payment using their preferred app from participating banks and participating non-bank financial institutions. Check this [page](https://stripe.com/docs/payments/paynow) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow) } + attr_accessor :paynow + # PayPal, a digital wallet popular with customers in Europe, allows your customers worldwide to pay using their PayPal account. Check this [page](https://stripe.com/docs/payments/paypal) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal) } + attr_accessor :paypal + # PayTo is a [real-time](https://docs.stripe.com/payments/real-time) payment method that enables customers in Australia to pay by providing their bank account details. Customers must accept a mandate authorizing you to debit their account. Check this [page](https://docs.stripe.com/payments/payto) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Payto) } + attr_accessor :payto + # PromptPay is a Thailand-based payment method that allows customers to make a payment using their preferred app from participating banks. Check this [page](https://stripe.com/docs/payments/promptpay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay) } + attr_accessor :promptpay + # QRIS is a [real-time](https://docs.stripe.com/payments/real-time) payment method popular in Indonesia. When paying with QRIS, customers authenticate and approve payments by scanning a QR code in their preferred digital wallet app. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Qris) } + attr_accessor :qris + # Revolut Pay, developed by Revolut, a global finance app, is a digital wallet payment method. Revolut Pay uses the customer’s stored balance or cards to fund the payment, and offers the option for non-Revolut customers to save their details after their first purchase. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay) } + attr_accessor :revolut_pay + # The [Single Euro Payments Area (SEPA)](https://en.wikipedia.org/wiki/Single_Euro_Payments_Area) is an initiative of the European Union to simplify payments within and across member countries. SEPA established and enforced banking standards to allow for the direct debiting of every EUR-denominated bank account within the SEPA region, check this [page](https://stripe.com/docs/payments/sepa-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit) } + attr_accessor :sepa_debit + # ShopeePay is a [single use](https://stripe.com/docs/payments/payment-methods#usage) digital wallet payment method popular in Indonesia. When paying with GoPay, customers authenticate and approve payments using the Shopee app. Desktop checkout is performed by scanning a QR code. When checking out on mobile, customers are redirected to the Shopee app to confirm payment. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Shopeepay) } + attr_accessor :shopeepay + # Stripe users in Europe and the United States can use the [Payment Intents API](https://stripe.com/docs/payments/payment-intents)—a single integration path for creating payments using any supported method—to accept [Sofort](https://www.sofort.com/) payments from customers. Check this [page](https://stripe.com/docs/payments/sofort) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort) } + attr_accessor :sofort + # Swish is a [real-time](https://stripe.com/docs/payments/real-time) payment method popular in Sweden. It allows customers to [authenticate and approve](https://stripe.com/docs/payments/payment-methods#customer-actions) payments using the Swish mobile app and the Swedish BankID mobile app. Check this [page](https://stripe.com/docs/payments/swish) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish) } + attr_accessor :swish + # Twint is a payment method popular in Switzerland. It allows customers to pay using their mobile phone. Check this [page](https://docs.stripe.com/payments/twint) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint) } + attr_accessor :twint + # Stripe users in the United States can accept ACH direct debit payments from customers with a US bank account using the Automated Clearing House (ACH) payments system operated by Nacha. Check this [page](https://stripe.com/docs/payments/ach-direct-debit) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount) } + attr_accessor :us_bank_account + # WeChat, owned by Tencent, is China's leading mobile app with over 1 billion monthly active users. Chinese consumers can use WeChat Pay to pay for goods and services inside of businesses' apps and websites. WeChat Pay users buy most frequently in gaming, e-commerce, travel, online education, and food/nutrition. Check this [page](https://stripe.com/docs/payments/wechat-pay) for more details. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay) } + attr_accessor :wechat_pay + # Zip gives your customers a way to split purchases over a series of payments. Check this [page](https://stripe.com/docs/payments/zip) for more details like country availability. + sig { returns(::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AcssDebit, active: T::Boolean, affirm: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Affirm, afterpay_clearpay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AfterpayClearpay, alipay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Alipay, alma: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Alma, amazon_pay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AmazonPay, apple_pay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePay, apple_pay_later: ::Stripe::PaymentMethodConfigurationService::UpdateParams::ApplePayLater, au_becs_debit: ::Stripe::PaymentMethodConfigurationService::UpdateParams::AuBecsDebit, bacs_debit: ::Stripe::PaymentMethodConfigurationService::UpdateParams::BacsDebit, bancontact: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Bancontact, blik: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Blik, boleto: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Boleto, card: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Card, cartes_bancaires: ::Stripe::PaymentMethodConfigurationService::UpdateParams::CartesBancaires, cashapp: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Cashapp, customer_balance: ::Stripe::PaymentMethodConfigurationService::UpdateParams::CustomerBalance, eps: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Eps, expand: T::Array[String], fpx: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Fpx, giropay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Giropay, google_pay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::GooglePay, gopay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Gopay, grabpay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Grabpay, id_bank_transfer: ::Stripe::PaymentMethodConfigurationService::UpdateParams::IdBankTransfer, ideal: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Ideal, jcb: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Jcb, klarna: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Klarna, konbini: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Konbini, link: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Link, mobilepay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Mobilepay, multibanco: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Multibanco, name: String, oxxo: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Oxxo, p24: ::Stripe::PaymentMethodConfigurationService::UpdateParams::P24, paynow: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Paynow, paypal: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Paypal, payto: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Payto, promptpay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Promptpay, qris: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Qris, revolut_pay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::RevolutPay, sepa_debit: ::Stripe::PaymentMethodConfigurationService::UpdateParams::SepaDebit, shopeepay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Shopeepay, sofort: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Sofort, swish: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Swish, twint: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Twint, us_bank_account: ::Stripe::PaymentMethodConfigurationService::UpdateParams::UsBankAccount, wechat_pay: ::Stripe::PaymentMethodConfigurationService::UpdateParams::WechatPay, zip: ::Stripe::PaymentMethodConfigurationService::UpdateParams::Zip).void + } + def initialize( + acss_debit: nil, + active: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + alma: nil, + amazon_pay: nil, + apple_pay: nil, + apple_pay_later: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + blik: nil, + boleto: nil, + card: nil, + cartes_bancaires: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + google_pay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + jcb: nil, + klarna: nil, + konbini: nil, + link: nil, + mobilepay: nil, + multibanco: nil, + name: nil, + oxxo: nil, + p24: nil, + paynow: nil, + paypal: nil, + payto: nil, + promptpay: nil, + qris: nil, + revolut_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + # Creates a payment method configuration + sig { + params(params: T.any(::Stripe::PaymentMethodConfigurationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration) + } + def create(params = {}, opts = {}); end + + # List payment method configurations + sig { + params(params: T.any(::Stripe::PaymentMethodConfigurationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieve payment method configuration + sig { + params(configuration: String, params: T.any(::Stripe::PaymentMethodConfigurationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration) + } + def retrieve(configuration, params = {}, opts = {}); end + + # Update payment method configuration + sig { + params(configuration: String, params: T.any(::Stripe::PaymentMethodConfigurationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodConfiguration) + } + def update(configuration, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_method_domain_service.rbi b/rbi/stripe/services/payment_method_domain_service.rbi new file mode 100644 index 000000000..118e2cf53 --- /dev/null +++ b/rbi/stripe/services/payment_method_domain_service.rbi @@ -0,0 +1,110 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentMethodDomainService < StripeService + class ListParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + sig { returns(String) } + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods will not appear in Elements + sig { returns(T::Boolean) } + attr_accessor :enabled + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(domain_name: String, enabled: T::Boolean, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + domain_name: nil, + enabled: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # The domain name that this payment method domain object represents. + sig { returns(String) } + attr_accessor :domain_name + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(domain_name: String, enabled: T::Boolean, expand: T::Array[String]).void } + def initialize(domain_name: nil, enabled: nil, expand: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Whether this payment method domain is enabled. If the domain is not enabled, payment methods that require a payment method domain will not appear in Elements. + sig { returns(T::Boolean) } + attr_accessor :enabled + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(enabled: T::Boolean, expand: T::Array[String]).void } + def initialize(enabled: nil, expand: nil); end + end + class ValidateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a payment method domain. + sig { + params(params: T.any(::Stripe::PaymentMethodDomainService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def create(params = {}, opts = {}); end + + # Lists the details of existing payment method domains. + sig { + params(params: T.any(::Stripe::PaymentMethodDomainService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing payment method domain. + sig { + params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomainService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def retrieve(payment_method_domain, params = {}, opts = {}); end + + # Updates an existing payment method domain. + sig { + params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomainService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def update(payment_method_domain, params = {}, opts = {}); end + + # Some payment methods such as Apple Pay require additional steps to verify a domain. If the requirements weren't satisfied when the domain was created, the payment method will be inactive on the domain. + # The payment method doesn't appear in Elements for this domain until it is active. + # + # To activate a payment method on an existing payment method domain, complete the required validation steps specific to the payment method, and then validate the payment method domain with this endpoint. + # + # Related guides: [Payment method domains](https://stripe.com/docs/payments/payment-methods/pmd-registration). + sig { + params(payment_method_domain: String, params: T.any(::Stripe::PaymentMethodDomainService::ValidateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethodDomain) + } + def validate(payment_method_domain, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_method_service.rbi b/rbi/stripe/services/payment_method_service.rbi new file mode 100644 index 000000000..d159f0e51 --- /dev/null +++ b/rbi/stripe/services/payment_method_service.rbi @@ -0,0 +1,883 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentMethodService < StripeService + class ListParams < Stripe::RequestParams + # The ID of the customer whose PaymentMethods will be retrieved. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future payment method types. If your integration expects only one type of payment method in the response, make sure to provide a type value in the request. + sig { returns(String) } + attr_accessor :type + sig { + params(customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, type: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentMethodService::CreateParams::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentMethodService::CreateParams::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + sig { returns(String) } + attr_accessor :preferred + sig { params(preferred: String).void } + def initialize(preferred: nil); end + end + # The card's CVC. It is highly recommended to always include this value. + sig { returns(String) } + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + sig { returns(Integer) } + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(Integer) } + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Card::Networks) } + attr_accessor :networks + # The card number, as a string without any separators. + sig { returns(String) } + attr_accessor :number + # For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format card: {token: "tok_visa"}. + sig { returns(String) } + attr_accessor :token + sig { + params(cvc: String, exp_month: Integer, exp_year: Integer, networks: ::Stripe::PaymentMethodService::CreateParams::Card::Networks, number: String, token: String).void + } + def initialize( + cvc: nil, + exp_month: nil, + exp_year: nil, + networks: nil, + number: nil, + token: nil + ); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentMethodService::CreateParams::Klarna::Dob) } + attr_accessor :dob + sig { params(dob: ::Stripe::PaymentMethodService::CreateParams::Klarna::Dob).void } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { returns(::Stripe::PaymentMethodService::CreateParams::Rechnung::Dob) } + attr_accessor :dob + sig { params(dob: ::Stripe::PaymentMethodService::CreateParams::Rechnung::Dob).void } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::AfterpayClearpay) } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::PaymentMethodService::CreateParams::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::PaymentMethodService::CreateParams::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentMethodService::CreateParams::BillingDetails) } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Boleto) } + attr_accessor :boleto + # If this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Card) } + attr_accessor :card + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Cashapp) } + attr_accessor :cashapp + # The `Customer` to whom the original PaymentMethod is attached. + sig { returns(String) } + attr_accessor :customer + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::CustomerBalance) } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Eps) } + attr_accessor :eps + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::IdBankTransfer) } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::InteracPresent) } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Payco) } + attr_accessor :payco + # The PaymentMethod to share. + sig { returns(String) } + attr_accessor :payment_method + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::PaymentMethodService::CreateParams::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::PaymentMethodService::CreateParams::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::UsBankAccount) } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::PaymentMethodService::CreateParams::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::PaymentMethodService::CreateParams::AcssDebit, affirm: ::Stripe::PaymentMethodService::CreateParams::Affirm, afterpay_clearpay: ::Stripe::PaymentMethodService::CreateParams::AfterpayClearpay, alipay: ::Stripe::PaymentMethodService::CreateParams::Alipay, allow_redisplay: String, alma: ::Stripe::PaymentMethodService::CreateParams::Alma, amazon_pay: ::Stripe::PaymentMethodService::CreateParams::AmazonPay, au_becs_debit: ::Stripe::PaymentMethodService::CreateParams::AuBecsDebit, bacs_debit: ::Stripe::PaymentMethodService::CreateParams::BacsDebit, bancontact: ::Stripe::PaymentMethodService::CreateParams::Bancontact, billing_details: ::Stripe::PaymentMethodService::CreateParams::BillingDetails, blik: ::Stripe::PaymentMethodService::CreateParams::Blik, boleto: ::Stripe::PaymentMethodService::CreateParams::Boleto, card: ::Stripe::PaymentMethodService::CreateParams::Card, cashapp: ::Stripe::PaymentMethodService::CreateParams::Cashapp, customer: String, customer_balance: ::Stripe::PaymentMethodService::CreateParams::CustomerBalance, eps: ::Stripe::PaymentMethodService::CreateParams::Eps, expand: T::Array[String], fpx: ::Stripe::PaymentMethodService::CreateParams::Fpx, giropay: ::Stripe::PaymentMethodService::CreateParams::Giropay, gopay: ::Stripe::PaymentMethodService::CreateParams::Gopay, grabpay: ::Stripe::PaymentMethodService::CreateParams::Grabpay, id_bank_transfer: ::Stripe::PaymentMethodService::CreateParams::IdBankTransfer, ideal: ::Stripe::PaymentMethodService::CreateParams::Ideal, interac_present: ::Stripe::PaymentMethodService::CreateParams::InteracPresent, kakao_pay: ::Stripe::PaymentMethodService::CreateParams::KakaoPay, klarna: ::Stripe::PaymentMethodService::CreateParams::Klarna, konbini: ::Stripe::PaymentMethodService::CreateParams::Konbini, kr_card: ::Stripe::PaymentMethodService::CreateParams::KrCard, link: ::Stripe::PaymentMethodService::CreateParams::Link, mb_way: ::Stripe::PaymentMethodService::CreateParams::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::PaymentMethodService::CreateParams::Mobilepay, multibanco: ::Stripe::PaymentMethodService::CreateParams::Multibanco, naver_pay: ::Stripe::PaymentMethodService::CreateParams::NaverPay, oxxo: ::Stripe::PaymentMethodService::CreateParams::Oxxo, p24: ::Stripe::PaymentMethodService::CreateParams::P24, payco: ::Stripe::PaymentMethodService::CreateParams::Payco, payment_method: String, paynow: ::Stripe::PaymentMethodService::CreateParams::Paynow, paypal: ::Stripe::PaymentMethodService::CreateParams::Paypal, payto: ::Stripe::PaymentMethodService::CreateParams::Payto, pix: ::Stripe::PaymentMethodService::CreateParams::Pix, promptpay: ::Stripe::PaymentMethodService::CreateParams::Promptpay, qris: ::Stripe::PaymentMethodService::CreateParams::Qris, radar_options: ::Stripe::PaymentMethodService::CreateParams::RadarOptions, rechnung: ::Stripe::PaymentMethodService::CreateParams::Rechnung, revolut_pay: ::Stripe::PaymentMethodService::CreateParams::RevolutPay, samsung_pay: ::Stripe::PaymentMethodService::CreateParams::SamsungPay, sepa_debit: ::Stripe::PaymentMethodService::CreateParams::SepaDebit, shopeepay: ::Stripe::PaymentMethodService::CreateParams::Shopeepay, sofort: ::Stripe::PaymentMethodService::CreateParams::Sofort, swish: ::Stripe::PaymentMethodService::CreateParams::Swish, twint: ::Stripe::PaymentMethodService::CreateParams::Twint, type: String, us_bank_account: ::Stripe::PaymentMethodService::CreateParams::UsBankAccount, wechat_pay: ::Stripe::PaymentMethodService::CreateParams::WechatPay, zip: ::Stripe::PaymentMethodService::CreateParams::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + card: nil, + cashapp: nil, + customer: nil, + customer_balance: nil, + eps: nil, + expand: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + payment_method: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::PaymentMethodService::UpdateParams::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::PaymentMethodService::UpdateParams::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + sig { returns(T.nilable(String)) } + attr_accessor :preferred + sig { params(preferred: T.nilable(String)).void } + def initialize(preferred: nil); end + end + # Two-digit number representing the card's expiration month. + sig { returns(Integer) } + attr_accessor :exp_month + # Four-digit number representing the card's expiration year. + sig { returns(Integer) } + attr_accessor :exp_year + # Contains information about card networks used to process the payment. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::Card::Networks) } + attr_accessor :networks + sig { + params(exp_month: Integer, exp_year: Integer, networks: ::Stripe::PaymentMethodService::UpdateParams::Card::Networks).void + } + def initialize(exp_month: nil, exp_year: nil, networks: nil); end + end + class Link < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class UsBankAccount < Stripe::RequestParams + # Bank account holder type. + sig { returns(String) } + attr_accessor :account_holder_type + # Bank account type. + sig { returns(String) } + attr_accessor :account_type + sig { params(account_holder_type: String, account_type: String).void } + def initialize(account_holder_type: nil, account_type: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::BillingDetails) } + attr_accessor :billing_details + # If this is a `card` PaymentMethod, this hash contains the user's card details. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::Card) } + attr_accessor :card + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::Link) } + attr_accessor :link + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::NaverPay) } + attr_accessor :naver_pay + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::Payto) } + attr_accessor :payto + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { returns(::Stripe::PaymentMethodService::UpdateParams::UsBankAccount) } + attr_accessor :us_bank_account + sig { + params(allow_redisplay: String, billing_details: ::Stripe::PaymentMethodService::UpdateParams::BillingDetails, card: ::Stripe::PaymentMethodService::UpdateParams::Card, expand: T::Array[String], link: ::Stripe::PaymentMethodService::UpdateParams::Link, metadata: T.nilable(T::Hash[String, String]), naver_pay: ::Stripe::PaymentMethodService::UpdateParams::NaverPay, payto: ::Stripe::PaymentMethodService::UpdateParams::Payto, us_bank_account: ::Stripe::PaymentMethodService::UpdateParams::UsBankAccount).void + } + def initialize( + allow_redisplay: nil, + billing_details: nil, + card: nil, + expand: nil, + link: nil, + metadata: nil, + naver_pay: nil, + payto: nil, + us_bank_account: nil + ); end + end + class AttachParams < Stripe::RequestParams + # The ID of the customer to which to attach the PaymentMethod. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(customer: String, expand: T::Array[String]).void } + def initialize(customer: nil, expand: nil); end + end + class DetachParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Attaches a PaymentMethod object to a Customer. + # + # To attach a new PaymentMethod to a customer for future payments, we recommend you use a [SetupIntent](https://stripe.com/docs/api/setup_intents) + # or a PaymentIntent with [setup_future_usage](https://stripe.com/docs/api/payment_intents/create#create_payment_intent-setup_future_usage). + # These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach + # endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for + # future use, which makes later declines and payment friction more likely. + # See [Optimizing cards for future payments](https://stripe.com/docs/payments/payment-intents#future-usage) for more information about setting up + # future payments. + # + # To use this PaymentMethod as the default for invoice or subscription payments, + # set [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/update#update_customer-invoice_settings-default_payment_method), + # on the Customer to the PaymentMethod's ID. + sig { + params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::AttachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def attach(payment_method, params = {}, opts = {}); end + + # Creates a PaymentMethod object. Read the [Stripe.js reference](https://stripe.com/docs/stripe-js/reference#stripe-create-payment-method) to learn how to create PaymentMethods via Stripe.js. + # + # Instead of creating a PaymentMethod directly, we recommend using the [PaymentIntents API to accept a payment immediately or the SetupIntent](https://stripe.com/docs/payments/accept-a-payment) API to collect payment method details ahead of a future payment. + sig { + params(params: T.any(::Stripe::PaymentMethodService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def create(params = {}, opts = {}); end + + # Detaches a PaymentMethod object from a Customer. After a PaymentMethod is detached, it can no longer be used for a payment or re-attached to a Customer. + sig { + params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def detach(payment_method, params = {}, opts = {}); end + + # Returns a list of PaymentMethods for Treasury flows. If you want to list the PaymentMethods attached to a Customer for payments, you should use the [List a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer_list) API instead. + sig { + params(params: T.any(::Stripe::PaymentMethodService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use [Retrieve a Customer's PaymentMethods](https://stripe.com/docs/api/payment_methods/customer) + sig { + params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def retrieve(payment_method, params = {}, opts = {}); end + + # Updates a PaymentMethod object. A PaymentMethod must be attached a customer to be updated. + sig { + params(payment_method: String, params: T.any(::Stripe::PaymentMethodService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentMethod) + } + def update(payment_method, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payment_record_service.rbi b/rbi/stripe/services/payment_record_service.rbi new file mode 100644 index 000000000..ed7ecdae5 --- /dev/null +++ b/rbi/stripe/services/payment_record_service.rbi @@ -0,0 +1,521 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PaymentRecordService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReportPaymentAttemptParams < Stripe::RequestParams + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :failed_at + sig { params(failed_at: Integer).void } + def initialize(failed_at: nil); end + end + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :guaranteed_at + sig { params(guaranteed_at: Integer).void } + def initialize(guaranteed_at: nil); end + end + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address associated with the method of payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails::Address) + } + attr_accessor :address + # The billing email associated with the method of payment. + sig { returns(String) } + attr_accessor :email + # The billing name associated with the method of payment. + sig { returns(String) } + attr_accessor :name + # The billing phone number associated with the method of payment. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + sig { returns(String) } + attr_accessor :display_name + # The custom payment method type associated with this payment. + sig { returns(String) } + attr_accessor :type + sig { params(display_name: String, type: String).void } + def initialize(display_name: nil, type: nil); end + end + # The billing details associated with the method of payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails) + } + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails::Custom) + } + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + sig { returns(String) } + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + sig { returns(String) } + attr_accessor :type + sig { + params(billing_details: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails::BillingDetails, custom: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails::Custom, payment_method: String, type: String).void + } + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The physical shipping address. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::ShippingDetails::Address) + } + attr_accessor :address + # The shipping recipient's name. + sig { returns(String) } + attr_accessor :name + # The shipping recipient's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::ShippingDetails::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the payment attempt failure. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::Failed) } + attr_accessor :failed + # Information about the payment attempt guarantee. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::Guaranteed) } + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The outcome of the reported payment. + sig { returns(String) } + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails) + } + attr_accessor :payment_method_details + # Shipping information for this payment. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentAttemptParams::ShippingDetails) } + attr_accessor :shipping_details + sig { + params(description: String, expand: T::Array[String], failed: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::Failed, guaranteed: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::Guaranteed, initiated_at: Integer, metadata: T::Hash[String, String], outcome: String, payment_method_details: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::PaymentMethodDetails, shipping_details: ::Stripe::PaymentRecordService::ReportPaymentAttemptParams::ShippingDetails).void + } + def initialize( + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + shipping_details: nil + ); end + end + class ReportPaymentAttemptCanceledParams < Stripe::RequestParams + # When the reported payment was canceled. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :canceled_at + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(canceled_at: Integer, expand: T::Array[String], metadata: T::Hash[String, String]).void + } + def initialize(canceled_at: nil, expand: nil, metadata: nil); end + end + class ReportPaymentAttemptFailedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # When the reported payment failed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :failed_at + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], failed_at: Integer, metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, failed_at: nil, metadata: nil); end + end + class ReportPaymentAttemptGuaranteedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :guaranteed_at + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], guaranteed_at: Integer, metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, guaranteed_at: nil, metadata: nil); end + end + class ReportPaymentParams < Stripe::RequestParams + class AmountRequested < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A positive integer representing the amount in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) e.g., 100 cents for $1.00 or 100 for ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :value + sig { params(currency: String, value: Integer).void } + def initialize(currency: nil, value: nil); end + end + class CustomerDetails < Stripe::RequestParams + # The customer who made the payment. + sig { returns(String) } + attr_accessor :customer + # The customer's phone number. + sig { returns(String) } + attr_accessor :email + # The customer's name. + sig { returns(String) } + attr_accessor :name + # The customer's phone number. + sig { returns(String) } + attr_accessor :phone + sig { params(customer: String, email: String, name: String, phone: String).void } + def initialize(customer: nil, email: nil, name: nil, phone: nil); end + end + class Failed < Stripe::RequestParams + # When the reported payment failed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :failed_at + sig { params(failed_at: Integer).void } + def initialize(failed_at: nil); end + end + class Guaranteed < Stripe::RequestParams + # When the reported payment was guaranteed. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :guaranteed_at + sig { params(guaranteed_at: Integer).void } + def initialize(guaranteed_at: nil); end + end + class PaymentMethodDetails < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The billing address associated with the method of payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails::BillingDetails::Address) + } + attr_accessor :address + # The billing email associated with the method of payment. + sig { returns(String) } + attr_accessor :email + # The billing name associated with the method of payment. + sig { returns(String) } + attr_accessor :name + # The billing phone number associated with the method of payment. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails::BillingDetails::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Custom < Stripe::RequestParams + # Display name for the custom (user-defined) payment method type used to make this payment. + sig { returns(String) } + attr_accessor :display_name + # The custom payment method type associated with this payment. + sig { returns(String) } + attr_accessor :type + sig { params(display_name: String, type: String).void } + def initialize(display_name: nil, type: nil); end + end + # The billing details associated with the method of payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails::BillingDetails) + } + attr_accessor :billing_details + # Information about the custom (user-defined) payment method used to make this payment. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails::Custom) + } + attr_accessor :custom + # ID of the Stripe Payment Method used to make this payment. + sig { returns(String) } + attr_accessor :payment_method + # The type of the payment method details. An additional hash is included on the payment_method_details with a name matching this value. It contains additional information specific to the type. + sig { returns(String) } + attr_accessor :type + sig { + params(billing_details: ::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails::BillingDetails, custom: ::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails::Custom, payment_method: String, type: String).void + } + def initialize(billing_details: nil, custom: nil, payment_method: nil, type: nil); end + end + class ShippingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The physical shipping address. + sig { + returns(::Stripe::PaymentRecordService::ReportPaymentParams::ShippingDetails::Address) + } + attr_accessor :address + # The shipping recipient's name. + sig { returns(String) } + attr_accessor :name + # The shipping recipient's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::PaymentRecordService::ReportPaymentParams::ShippingDetails::Address, name: String, phone: String).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + # The amount you intend to collect for this payment. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentParams::AmountRequested) } + attr_accessor :amount_requested + # Customer information for this payment. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentParams::CustomerDetails) } + attr_accessor :customer_details + # Indicates whether the customer was present in your checkout flow during this payment. + sig { returns(String) } + attr_accessor :customer_presence + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about the payment attempt failure. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentParams::Failed) } + attr_accessor :failed + # Information about the payment attempt guarantee. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentParams::Guaranteed) } + attr_accessor :guaranteed + # When the reported payment was initiated. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :initiated_at + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The outcome of the reported payment. + sig { returns(String) } + attr_accessor :outcome + # Information about the Payment Method debited for this payment. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails) } + attr_accessor :payment_method_details + # An opaque string for manual reconciliation of this payment, for example a check number or a payment processor ID. + sig { returns(String) } + attr_accessor :payment_reference + # Shipping information for this payment. + sig { returns(::Stripe::PaymentRecordService::ReportPaymentParams::ShippingDetails) } + attr_accessor :shipping_details + sig { + params(amount_requested: ::Stripe::PaymentRecordService::ReportPaymentParams::AmountRequested, customer_details: ::Stripe::PaymentRecordService::ReportPaymentParams::CustomerDetails, customer_presence: String, description: String, expand: T::Array[String], failed: ::Stripe::PaymentRecordService::ReportPaymentParams::Failed, guaranteed: ::Stripe::PaymentRecordService::ReportPaymentParams::Guaranteed, initiated_at: Integer, metadata: T::Hash[String, String], outcome: String, payment_method_details: ::Stripe::PaymentRecordService::ReportPaymentParams::PaymentMethodDetails, payment_reference: String, shipping_details: ::Stripe::PaymentRecordService::ReportPaymentParams::ShippingDetails).void + } + def initialize( + amount_requested: nil, + customer_details: nil, + customer_presence: nil, + description: nil, + expand: nil, + failed: nil, + guaranteed: nil, + initiated_at: nil, + metadata: nil, + outcome: nil, + payment_method_details: nil, + payment_reference: nil, + shipping_details: nil + ); end + end + # Report a new Payment Record. You may report a Payment Record as it is + # initialized and later report updates through the other report_* methods, or report Payment + # Records in a terminal state directly, through this method. + sig { + params(params: T.any(::Stripe::PaymentRecordService::ReportPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment(params = {}, opts = {}); end + + # Report a new payment attempt on the specified Payment Record. A new payment + # attempt can only be specified if all other payment attempts are canceled or failed. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecordService::ReportPaymentAttemptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt(id, params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # was canceled. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecordService::ReportPaymentAttemptCanceledParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt_canceled(id, params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # failed or errored. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecordService::ReportPaymentAttemptFailedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt_failed(id, params = {}, opts = {}); end + + # Report that the most recent payment attempt on the specified Payment Record + # was guaranteed. + sig { + params(id: String, params: T.any(::Stripe::PaymentRecordService::ReportPaymentAttemptGuaranteedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def report_payment_attempt_guaranteed(id, params = {}, opts = {}); end + + # Retrieves a Payment Record with the given ID + sig { + params(id: String, params: T.any(::Stripe::PaymentRecordService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PaymentRecord) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/payout_service.rbi b/rbi/stripe/services/payout_service.rbi new file mode 100644 index 000000000..0537f481a --- /dev/null +++ b/rbi/stripe/services/payout_service.rbi @@ -0,0 +1,197 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PayoutService < StripeService + class ListParams < Stripe::RequestParams + class ArrivalDate < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return payouts that are expected to arrive during the given date interval. + sig { returns(T.any(::Stripe::PayoutService::ListParams::ArrivalDate, Integer)) } + attr_accessor :arrival_date + # Only return payouts that were created during the given date interval. + sig { returns(T.any(::Stripe::PayoutService::ListParams::Created, Integer)) } + attr_accessor :created + # The ID of an external account - only return payouts sent to this external account. + sig { returns(String) } + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return payouts that have the given status: `pending`, `paid`, `failed`, or `canceled`. + sig { returns(String) } + attr_accessor :status + sig { + params(arrival_date: T.any(::Stripe::PayoutService::ListParams::ArrivalDate, Integer), created: T.any(::Stripe::PayoutService::ListParams::Created, Integer), destination: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + arrival_date: nil, + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # A positive integer in cents representing how much to payout. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The ID of a bank account or a card to send the payout to. If you don't provide a destination, we use the default external account for the specified currency. + sig { returns(String) } + attr_accessor :destination + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The method used to send this payout, which is `standard` or `instant`. We support `instant` for payouts to debit cards and bank accounts in certain countries. Learn more about [bank support for Instant Payouts](https://stripe.com/docs/payouts/instant-payouts-banks). + sig { returns(String) } + attr_accessor :method + # The balance type of your Stripe balance to draw this payout from. Balances for different payment sources are kept separately. You can find the amounts with the Balances API. One of `bank_account`, `card`, or `fpx`. + sig { returns(String) } + attr_accessor :source_type + # A string that displays on the recipient's bank or card statement (up to 22 characters). A `statement_descriptor` that's longer than 22 characters return an error. Most banks truncate this information and display it inconsistently. Some banks might not display it at all. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, description: String, destination: String, expand: T::Array[String], metadata: T::Hash[String, String], method: String, source_type: String, statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + method: nil, + source_type: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T::Hash[String, String]).void } + def initialize(expand: nil, metadata: nil); end + end + # You can cancel a previously created payout if its status is pending. Stripe refunds the funds to your available balance. You can't cancel automatic Stripe payouts. + sig { + params(payout: String, params: T.any(::Stripe::PayoutService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def cancel(payout, params = {}, opts = {}); end + + # To send funds to your own bank account, create a new payout object. Your [Stripe balance](https://stripe.com/docs/api#balance) must cover the payout amount. If it doesn't, you receive an “Insufficient Funds” error. + # + # If your API key is in test mode, money won't actually be sent, though every other action occurs as if you're in live mode. + # + # If you create a manual payout on a Stripe account that uses multiple payment source types, you need to specify the source type balance that the payout draws from. The [balance object](https://stripe.com/docs/api#balance_object) details available and pending amounts by source type. + sig { + params(params: T.any(::Stripe::PayoutService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def create(params = {}, opts = {}); end + + # Returns a list of existing payouts sent to third-party bank accounts or payouts that Stripe sent to you. The payouts return in sorted order, with the most recently created payouts appearing first. + sig { + params(params: T.any(::Stripe::PayoutService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing payout. Supply the unique payout ID from either a payout creation request or the payout list. Stripe returns the corresponding payout information. + sig { + params(payout: String, params: T.any(::Stripe::PayoutService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def retrieve(payout, params = {}, opts = {}); end + + # Reverses a payout by debiting the destination bank account. At this time, you can only reverse payouts for connected accounts to US bank accounts. If the payout is manual and in the pending status, use /v1/payouts/:id/cancel instead. + # + # By requesting a reversal through /v1/payouts/:id/reverse, you confirm that the authorized signatory of the selected bank account authorizes the debit on the bank account and that no other authorization is required. + sig { + params(payout: String, params: T.any(::Stripe::PayoutService::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def reverse(payout, params = {}, opts = {}); end + + # Updates the specified payout by setting the values of the parameters you pass. We don't change parameters that you don't provide. This request only accepts the metadata as arguments. + sig { + params(payout: String, params: T.any(::Stripe::PayoutService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Payout) + } + def update(payout, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/plan_service.rbi b/rbi/stripe/services/plan_service.rbi new file mode 100644 index 000000000..da0bff716 --- /dev/null +++ b/rbi/stripe/services/plan_service.rbi @@ -0,0 +1,286 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PlanService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Whether the plan is currently available for new subscriptions. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A brief description of the plan, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # The product the plan belongs to. This cannot be changed once it has been used in a subscription or subscription schedule. + sig { returns(String) } + attr_accessor :product + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(Integer) } + attr_accessor :trial_period_days + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), nickname: String, product: String, trial_period_days: Integer).void + } + def initialize( + active: nil, + expand: nil, + metadata: nil, + nickname: nil, + product: nil, + trial_period_days: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return plans that are active or inactive (e.g., pass `false` to list all inactive plans). + sig { returns(T::Boolean) } + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::PlanService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return plans for the given product. + sig { returns(String) } + attr_accessor :product + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, created: T.any(::Stripe::PlanService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, product: String, starting_after: String).void + } + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + product: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Product < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(String) } + attr_accessor :unit_label + sig { + params(active: T::Boolean, id: String, metadata: T::Hash[String, String], name: String, statement_descriptor: String, tax_code: String, unit_label: String).void + } + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + class TransformUsage < Stripe::RequestParams + # Divide usage by this number. + sig { returns(Integer) } + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + sig { returns(String) } + attr_accessor :round + sig { params(divide_by: Integer, round: String).void } + def initialize(divide_by: nil, round: nil); end + end + # Whether the plan is currently available for new subscriptions. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies a usage aggregation strategy for plans of `usage_type=metered`. Allowed values are `sum` for summing up all usage during a period, `last_during_period` for using the last usage record reported within a period, `last_ever` for using the last usage record ever (across period bounds) or `max` which uses the usage record with the maximum reported usage during a period. Defaults to `sum`. + sig { returns(String) } + attr_accessor :aggregate_usage + # A positive integer in cents (or local equivalent) (or 0 for a free plan) representing how much to charge on a recurring basis. + sig { returns(Integer) } + attr_accessor :amount + # Same as `amount`, but accepts a decimal value with at most 12 decimal places. Only one of `amount` and `amount_decimal` can be set. + sig { returns(String) } + attr_accessor :amount_decimal + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `amount`) will be charged per unit in `quantity` (for plans with `usage_type=licensed`), or per unit of total usage (for plans with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # An identifier randomly generated by Stripe. Used to identify this plan when subscribing a customer. You can optionally override this ID, but the ID must be unique across all plans in your Stripe account. You can, however, use the same plan ID in both live and test modes. + sig { returns(String) } + attr_accessor :id + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The meter tracking the usage of a metered price + sig { returns(String) } + attr_accessor :meter + # A brief description of the plan, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # Attribute for param field product + sig { returns(T.any(::Stripe::PlanService::CreateParams::Product, String)) } + attr_accessor :product + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::PlanService::CreateParams::Tier]) } + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + sig { returns(String) } + attr_accessor :tiers_mode + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + sig { returns(::Stripe::PlanService::CreateParams::TransformUsage) } + attr_accessor :transform_usage + # Default number of trial days when subscribing a customer to this plan using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(Integer) } + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + sig { returns(String) } + attr_accessor :usage_type + sig { + params(active: T::Boolean, aggregate_usage: String, amount: Integer, amount_decimal: String, billing_scheme: String, currency: String, expand: T::Array[String], id: String, interval: String, interval_count: Integer, metadata: T.nilable(T::Hash[String, String]), meter: String, nickname: String, product: T.any(::Stripe::PlanService::CreateParams::Product, String), tiers: T::Array[::Stripe::PlanService::CreateParams::Tier], tiers_mode: String, transform_usage: ::Stripe::PlanService::CreateParams::TransformUsage, trial_period_days: Integer, usage_type: String).void + } + def initialize( + active: nil, + aggregate_usage: nil, + amount: nil, + amount_decimal: nil, + billing_scheme: nil, + currency: nil, + expand: nil, + id: nil, + interval: nil, + interval_count: nil, + metadata: nil, + meter: nil, + nickname: nil, + product: nil, + tiers: nil, + tiers_mode: nil, + transform_usage: nil, + trial_period_days: nil, + usage_type: nil + ); end + end + # You can now model subscriptions more flexibly using the [Prices API](https://stripe.com/docs/api#prices). It replaces the Plans API and is backwards compatible to simplify your migration. + sig { + params(params: T.any(::Stripe::PlanService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def create(params = {}, opts = {}); end + + # Deleting plans means new subscribers can't be added. Existing subscribers aren't affected. + sig { + params(plan: String, params: T.any(::Stripe::PlanService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def delete(plan, params = {}, opts = {}); end + + # Returns a list of your plans. + sig { + params(params: T.any(::Stripe::PlanService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the plan with the given ID. + sig { + params(plan: String, params: T.any(::Stripe::PlanService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def retrieve(plan, params = {}, opts = {}); end + + # Updates the specified plan by setting the values of the parameters passed. Any parameters not provided are left unchanged. By design, you cannot change a plan's ID, amount, currency, or billing cycle. + sig { + params(plan: String, params: T.any(::Stripe::PlanService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Plan) + } + def update(plan, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/price_service.rbi b/rbi/stripe/services/price_service.rbi new file mode 100644 index 000000000..f8c8a111b --- /dev/null +++ b/rbi/stripe/services/price_service.rbi @@ -0,0 +1,551 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PriceService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Recurring < Stripe::RequestParams + # Filter by billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # Filter by the price's meter. + sig { returns(String) } + attr_accessor :meter + # Filter by the usage type for this price. Can be either `metered` or `licensed`. + sig { returns(String) } + attr_accessor :usage_type + sig { params(interval: String, meter: String, usage_type: String).void } + def initialize(interval: nil, meter: nil, usage_type: nil); end + end + # Only return prices that are active or inactive (e.g., pass `false` to list all inactive prices). + sig { returns(T::Boolean) } + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::PriceService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return prices for the given currency. + sig { returns(String) } + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return the price with these lookup_keys, if any exist. You can specify up to 10 lookup_keys. + sig { returns(T::Array[String]) } + attr_accessor :lookup_keys + # Only return prices for the given product. + sig { returns(String) } + attr_accessor :product + # Only return prices with these recurring fields. + sig { returns(::Stripe::PriceService::ListParams::Recurring) } + attr_accessor :recurring + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return prices of type `recurring` or `one_time`. + sig { returns(String) } + attr_accessor :type + sig { + params(active: T::Boolean, created: T.any(::Stripe::PriceService::ListParams::Created, Integer), currency: String, ending_before: String, expand: T::Array[String], limit: Integer, lookup_keys: T::Array[String], product: String, recurring: ::Stripe::PriceService::ListParams::Recurring, starting_after: String, type: String).void + } + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + lookup_keys: nil, + product: nil, + recurring: nil, + starting_after: nil, + type: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::PriceService::CreateParams::CurrencyOptions::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::PriceService::CreateParams::CurrencyOptions::Tier]) } + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(custom_unit_amount: ::Stripe::PriceService::CreateParams::CurrencyOptions::CustomUnitAmount, tax_behavior: String, tiers: T::Array[::Stripe::PriceService::CreateParams::CurrencyOptions::Tier], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class ProductData < Stripe::RequestParams + # Whether the product is currently available for purchase. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # The identifier for the product. Must be unique. If not provided, an identifier will be randomly generated. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(String) } + attr_accessor :unit_label + sig { + params(active: T::Boolean, id: String, metadata: T::Hash[String, String], name: String, statement_descriptor: String, tax_code: String, unit_label: String).void + } + def initialize( + active: nil, + id: nil, + metadata: nil, + name: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil + ); end + end + class Recurring < Stripe::RequestParams + # Specifies a usage aggregation strategy for prices of `usage_type=metered`. Defaults to `sum`. + sig { returns(String) } + attr_accessor :aggregate_usage + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + # The meter tracking the usage of a metered price + sig { returns(String) } + attr_accessor :meter + # Default number of trial days when subscribing a customer to this price using [`trial_from_plan=true`](https://stripe.com/docs/api#create_subscription-trial_from_plan). + sig { returns(Integer) } + attr_accessor :trial_period_days + # Configures how the quantity per period should be determined. Can be either `metered` or `licensed`. `licensed` automatically bills the `quantity` set when adding it to a subscription. `metered` aggregates the total usage based on usage records. Defaults to `licensed`. + sig { returns(String) } + attr_accessor :usage_type + sig { + params(aggregate_usage: String, interval: String, interval_count: Integer, meter: String, trial_period_days: Integer, usage_type: String).void + } + def initialize( + aggregate_usage: nil, + interval: nil, + interval_count: nil, + meter: nil, + trial_period_days: nil, + usage_type: nil + ); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + class TransformQuantity < Stripe::RequestParams + # Divide usage by this number. + sig { returns(Integer) } + attr_accessor :divide_by + # After division, either round the result `up` or `down`. + sig { returns(String) } + attr_accessor :round + sig { params(divide_by: Integer, round: String).void } + def initialize(divide_by: nil, round: nil); end + end + # Whether the price can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Describes how to compute the price per period. Either `per_unit` or `tiered`. `per_unit` indicates that the fixed amount (specified in `unit_amount` or `unit_amount_decimal`) will be charged per unit in `quantity` (for prices with `usage_type=licensed`), or per unit of total usage (for prices with `usage_type=metered`). `tiered` indicates that the unit pricing will be computed using a tiering strategy as defined using the `tiers` and `tiers_mode` attributes. + sig { returns(String) } + attr_accessor :billing_scheme + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { returns(T::Hash[String, ::Stripe::PriceService::CreateParams::CurrencyOptions]) } + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::PriceService::CreateParams::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # A brief description of the price, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # These fields can be used to create a new product that this price will belong to. + sig { returns(::Stripe::PriceService::CreateParams::ProductData) } + attr_accessor :product_data + # The recurring components of a price such as `interval` and `usage_type`. + sig { returns(::Stripe::PriceService::CreateParams::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::PriceService::CreateParams::Tier]) } + attr_accessor :tiers + # Defines if the tiering price should be `graduated` or `volume` based. In `volume`-based tiering, the maximum quantity within a period determines the per unit price, in `graduated` tiering pricing can successively change as the quantity grows. + sig { returns(String) } + attr_accessor :tiers_mode + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + # Apply a transformation to the reported usage or set quantity before computing the billed price. Cannot be combined with `tiers`. + sig { returns(::Stripe::PriceService::CreateParams::TransformQuantity) } + attr_accessor :transform_quantity + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required, unless `billing_scheme=tiered`. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(active: T::Boolean, billing_scheme: String, currency: String, currency_options: T::Hash[String, ::Stripe::PriceService::CreateParams::CurrencyOptions], custom_unit_amount: ::Stripe::PriceService::CreateParams::CustomUnitAmount, expand: T::Array[String], lookup_key: String, metadata: T::Hash[String, String], nickname: String, product: String, product_data: ::Stripe::PriceService::CreateParams::ProductData, recurring: ::Stripe::PriceService::CreateParams::Recurring, tax_behavior: String, tiers: T::Array[::Stripe::PriceService::CreateParams::Tier], tiers_mode: String, transfer_lookup_key: T::Boolean, transform_quantity: ::Stripe::PriceService::CreateParams::TransformQuantity, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + active: nil, + billing_scheme: nil, + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + nickname: nil, + product: nil, + product_data: nil, + recurring: nil, + tax_behavior: nil, + tiers: nil, + tiers_mode: nil, + transfer_lookup_key: nil, + transform_quantity: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::PriceService::UpdateParams::CurrencyOptions::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { returns(T::Array[::Stripe::PriceService::UpdateParams::CurrencyOptions::Tier]) } + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(custom_unit_amount: ::Stripe::PriceService::UpdateParams::CurrencyOptions::CustomUnitAmount, tax_behavior: String, tiers: T::Array[::Stripe::PriceService::UpdateParams::CurrencyOptions::Tier], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class MigrateTo < Stripe::RequestParams + # The behavior controlling the point in the subscription lifecycle after which to migrate the price. Currently must be `at_cycle_end`. + sig { returns(String) } + attr_accessor :behavior + # The time after which subscriptions should start using the new price. + sig { returns(Integer) } + attr_accessor :effective_after + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + sig { params(behavior: String, effective_after: Integer, price: String).void } + def initialize(behavior: nil, effective_after: nil, price: nil); end + end + # Whether the price can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T.nilable(T::Hash[String, ::Stripe::PriceService::UpdateParams::CurrencyOptions])) + } + attr_accessor :currency_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A lookup key used to retrieve prices dynamically from a static string. This may be up to 200 characters. + sig { returns(String) } + attr_accessor :lookup_key + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # If specified, subscriptions using this price will be updated to use the new referenced price. + sig { returns(T.nilable(::Stripe::PriceService::UpdateParams::MigrateTo)) } + attr_accessor :migrate_to + # A brief description of the price, hidden from customers. + sig { returns(String) } + attr_accessor :nickname + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # If set to true, will atomically remove the lookup key from the existing price, and assign it to this price. + sig { returns(T::Boolean) } + attr_accessor :transfer_lookup_key + sig { + params(active: T::Boolean, currency_options: T.nilable(T::Hash[String, ::Stripe::PriceService::UpdateParams::CurrencyOptions]), expand: T::Array[String], lookup_key: String, metadata: T.nilable(T::Hash[String, String]), migrate_to: T.nilable(::Stripe::PriceService::UpdateParams::MigrateTo), nickname: String, tax_behavior: String, transfer_lookup_key: T::Boolean).void + } + def initialize( + active: nil, + currency_options: nil, + expand: nil, + lookup_key: nil, + metadata: nil, + migrate_to: nil, + nickname: nil, + tax_behavior: nil, + transfer_lookup_key: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for prices](https://stripe.com/docs/search#query-fields-for-prices). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + # Creates a new price for an existing product. The price can be recurring or one-time. + sig { + params(params: T.any(::Stripe::PriceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price) + } + def create(params = {}, opts = {}); end + + # Returns a list of your active prices, excluding [inline prices](https://stripe.com/docs/products-prices/pricing-models#inline-pricing). For the list of inactive prices, set active to false. + sig { + params(params: T.any(::Stripe::PriceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the price with the given ID. + sig { + params(price: String, params: T.any(::Stripe::PriceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price) + } + def retrieve(price, params = {}, opts = {}); end + + # Search for prices you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::PriceService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Updates the specified price by setting the values of the parameters passed. Any parameters not provided are left unchanged. + sig { + params(price: String, params: T.any(::Stripe::PriceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Price) + } + def update(price, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/product_feature_service.rbi b/rbi/stripe/services/product_feature_service.rbi new file mode 100644 index 000000000..241358297 --- /dev/null +++ b/rbi/stripe/services/product_feature_service.rbi @@ -0,0 +1,69 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ProductFeatureService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # The ID of the [Feature](https://stripe.com/docs/api/entitlements/feature) object attached to this product. + sig { returns(String) } + attr_accessor :entitlement_feature + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(entitlement_feature: String, expand: T::Array[String]).void } + def initialize(entitlement_feature: nil, expand: nil); end + end + # Creates a product_feature, which represents a feature attachment to a product + sig { + params(product: String, params: T.any(::Stripe::ProductFeatureService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ProductFeature) + } + def create(product, params = {}, opts = {}); end + + # Deletes the feature attachment to a product + sig { + params(product: String, id: String, params: T.any(::Stripe::ProductFeatureService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ProductFeature) + } + def delete(product, id, params = {}, opts = {}); end + + # Retrieve a list of features for a product + sig { + params(product: String, params: T.any(::Stripe::ProductFeatureService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(product, params = {}, opts = {}); end + + # Retrieves a product_feature, which represents a feature attachment to a product + sig { + params(product: String, id: String, params: T.any(::Stripe::ProductFeatureService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ProductFeature) + } + def retrieve(product, id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/product_service.rbi b/rbi/stripe/services/product_service.rbi new file mode 100644 index 000000000..fff85a71c --- /dev/null +++ b/rbi/stripe/services/product_service.rbi @@ -0,0 +1,503 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ProductService < StripeService + attr_reader :features + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + # Whether the product is available for purchase. + sig { returns(T::Boolean) } + attr_accessor :active + # The ID of the [Price](https://stripe.com/docs/api/prices) object that is the default price for this product. + sig { returns(String) } + attr_accessor :default_price + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + sig { returns(T.nilable(T::Array[::Stripe::ProductService::UpdateParams::MarketingFeature])) } + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { returns(T.nilable(::Stripe::ProductService::UpdateParams::PackageDimensions)) } + attr_accessor :package_dimensions + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. May only be set if `type=service`. Only used for subscription payments. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(T.nilable(String)) } + attr_accessor :tax_code + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. May only be set if `type=service`. + sig { returns(T.nilable(String)) } + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + sig { returns(T.nilable(String)) } + attr_accessor :url + sig { + params(active: T::Boolean, default_price: String, description: T.nilable(String), expand: T::Array[String], images: T.nilable(T::Array[String]), marketing_features: T.nilable(T::Array[::Stripe::ProductService::UpdateParams::MarketingFeature]), metadata: T.nilable(T::Hash[String, String]), name: String, package_dimensions: T.nilable(::Stripe::ProductService::UpdateParams::PackageDimensions), shippable: T::Boolean, statement_descriptor: String, tax_code: T.nilable(String), unit_label: T.nilable(String), url: T.nilable(String)).void + } + def initialize( + active: nil, + default_price: nil, + description: nil, + expand: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + unit_label: nil, + url: nil + ); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return products that are active or inactive (e.g., pass `false` to list all inactive products). + sig { returns(T::Boolean) } + attr_accessor :active + # Only return products that were created during the given date interval. + sig { returns(T.any(::Stripe::ProductService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Only return products with the given IDs. Cannot be used with [starting_after](https://stripe.com/docs/api#list_products-starting_after) or [ending_before](https://stripe.com/docs/api#list_products-ending_before). + sig { returns(T::Array[String]) } + attr_accessor :ids + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return products that can be shipped (i.e., physical, not digital products). + sig { returns(T::Boolean) } + attr_accessor :shippable + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return products of this type. + sig { returns(String) } + attr_accessor :type + # Only return products with the given url. + sig { returns(String) } + attr_accessor :url + sig { + params(active: T::Boolean, created: T.any(::Stripe::ProductService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], ids: T::Array[String], limit: Integer, shippable: T::Boolean, starting_after: String, type: String, url: String).void + } + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + ids: nil, + limit: nil, + shippable: nil, + starting_after: nil, + type: nil, + url: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DefaultPriceData < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Tier < Stripe::RequestParams + # The flat billing amount for an entire tier, regardless of the number of units in the tier. + sig { returns(Integer) } + attr_accessor :flat_amount + # Same as `flat_amount`, but accepts a decimal value representing an integer in the minor units of the currency. Only one of `flat_amount` and `flat_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :flat_amount_decimal + # The per unit billing amount for each individual unit for which this tier applies. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + # Specifies the upper bound of this tier. The lower bound of a tier is the upper bound of the previous tier adding one. Use `inf` to define a fallback tier. + sig { returns(T.any(String, Integer)) } + attr_accessor :up_to + sig { + params(flat_amount: Integer, flat_amount_decimal: String, unit_amount: Integer, unit_amount_decimal: String, up_to: T.any(String, Integer)).void + } + def initialize( + flat_amount: nil, + flat_amount_decimal: nil, + unit_amount: nil, + unit_amount_decimal: nil, + up_to: nil + ); end + end + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { + returns(::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount) + } + attr_accessor :custom_unit_amount + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # Each element represents a pricing tier. This parameter requires `billing_scheme` to be set to `tiered`. See also the documentation for `billing_scheme`. + sig { + returns(T::Array[::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::Tier]) + } + attr_accessor :tiers + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(custom_unit_amount: ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::CustomUnitAmount, tax_behavior: String, tiers: T::Array[::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions::Tier], unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + custom_unit_amount: nil, + tax_behavior: nil, + tiers: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class CustomUnitAmount < Stripe::RequestParams + # Pass in `true` to enable `custom_unit_amount`, otherwise omit `custom_unit_amount`. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The maximum unit amount the customer can specify for this item. + sig { returns(Integer) } + attr_accessor :maximum + # The minimum unit amount the customer can specify for this item. Must be at least the minimum charge amount. + sig { returns(Integer) } + attr_accessor :minimum + # The starting unit amount which can be updated by the customer. + sig { returns(Integer) } + attr_accessor :preset + sig { + params(enabled: T::Boolean, maximum: Integer, minimum: Integer, preset: Integer).void + } + def initialize(enabled: nil, maximum: nil, minimum: nil, preset: nil); end + end + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Prices defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions]) + } + attr_accessor :currency_options + # When set, provides configuration for the amount to be adjusted by the customer during Checkout Sessions and Payment Links. + sig { returns(::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount) } + attr_accessor :custom_unit_amount + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. One of `unit_amount`, `unit_amount_decimal`, or `custom_unit_amount` is required. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, currency_options: T::Hash[String, ::Stripe::ProductService::CreateParams::DefaultPriceData::CurrencyOptions], custom_unit_amount: ::Stripe::ProductService::CreateParams::DefaultPriceData::CustomUnitAmount, recurring: ::Stripe::ProductService::CreateParams::DefaultPriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + currency_options: nil, + custom_unit_amount: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class MarketingFeature < Stripe::RequestParams + # The marketing feature name. Up to 80 characters long. + sig { returns(String) } + attr_accessor :name + sig { params(name: String).void } + def initialize(name: nil); end + end + class PackageDimensions < Stripe::RequestParams + # Height, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :height + # Length, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :length + # Weight, in ounces. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :weight + # Width, in inches. Maximum precision is 2 decimal places. + sig { returns(Float) } + attr_accessor :width + sig { params(height: Float, length: Float, weight: Float, width: Float).void } + def initialize(height: nil, length: nil, weight: nil, width: nil); end + end + class Provisioning < Stripe::RequestParams + class GiftCard < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + # The initial amount with which the provisioned gift card will be created. + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + # Attribute for param field fixed_amount + sig { + returns(::Stripe::ProductService::CreateParams::Provisioning::GiftCard::FixedAmount) + } + attr_accessor :fixed_amount + # The specific type of gift_card provisioning, only `fixed_amount` currently supported. + sig { returns(String) } + attr_accessor :type + sig { + params(fixed_amount: ::Stripe::ProductService::CreateParams::Provisioning::GiftCard::FixedAmount, type: String).void + } + def initialize(fixed_amount: nil, type: nil); end + end + # Attribute for param field gift_card + sig { returns(::Stripe::ProductService::CreateParams::Provisioning::GiftCard) } + attr_accessor :gift_card + # The type of provisioning, only `gift_card` currently supported. + sig { returns(String) } + attr_accessor :type + sig { + params(gift_card: ::Stripe::ProductService::CreateParams::Provisioning::GiftCard, type: String).void + } + def initialize(gift_card: nil, type: nil); end + end + # Whether the product is currently available for purchase. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object. This Price will be set as the default price for this product. + sig { returns(::Stripe::ProductService::CreateParams::DefaultPriceData) } + attr_accessor :default_price_data + # The product's description, meant to be displayable to the customer. Use this field to optionally store a long form explanation of the product being sold for your own rendering purposes. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # An identifier will be randomly generated by Stripe. You can optionally override this ID, but the ID must be unique across all products in your Stripe account. + sig { returns(String) } + attr_accessor :id + # A list of up to 8 URLs of images for this product, meant to be displayable to the customer. + sig { returns(T::Array[String]) } + attr_accessor :images + # A list of up to 15 marketing features for this product. These are displayed in [pricing tables](https://stripe.com/docs/payments/checkout/pricing-table). + sig { returns(T::Array[::Stripe::ProductService::CreateParams::MarketingFeature]) } + attr_accessor :marketing_features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The product's name, meant to be displayable to the customer. + sig { returns(String) } + attr_accessor :name + # The dimensions of this product for shipping purposes. + sig { returns(::Stripe::ProductService::CreateParams::PackageDimensions) } + attr_accessor :package_dimensions + # Provisioning configuration for this product. + sig { returns(::Stripe::ProductService::CreateParams::Provisioning) } + attr_accessor :provisioning + # Whether this product is shipped (i.e., physical goods). + sig { returns(T::Boolean) } + attr_accessor :shippable + # An arbitrary string to be displayed on your customer's credit card or bank statement. While most banks display this information consistently, some may display it incorrectly or not at all. + # + # This may be up to 22 characters. The statement description may not include `<`, `>`, `\`, `"`, `'` characters, and will appear on your customer's statement in capital letters. Non-ASCII characters are automatically stripped. + # It must contain at least one letter. Only used for subscription payments. + sig { returns(String) } + attr_accessor :statement_descriptor + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + # The type of the product. Defaults to `service` if not explicitly specified, enabling use of this product with Subscriptions and Plans. Set this parameter to `good` to use this product with Orders and SKUs. On API versions before `2018-02-05`, this field defaults to `good` for compatibility reasons. + sig { returns(String) } + attr_accessor :type + # A label that represents units of this product. When set, this will be included in customers' receipts, invoices, Checkout, and the customer portal. + sig { returns(String) } + attr_accessor :unit_label + # A URL of a publicly-accessible webpage for this product. + sig { returns(String) } + attr_accessor :url + sig { + params(active: T::Boolean, default_price_data: ::Stripe::ProductService::CreateParams::DefaultPriceData, description: String, expand: T::Array[String], id: String, images: T::Array[String], marketing_features: T::Array[::Stripe::ProductService::CreateParams::MarketingFeature], metadata: T::Hash[String, String], name: String, package_dimensions: ::Stripe::ProductService::CreateParams::PackageDimensions, provisioning: ::Stripe::ProductService::CreateParams::Provisioning, shippable: T::Boolean, statement_descriptor: String, tax_code: String, type: String, unit_label: String, url: String).void + } + def initialize( + active: nil, + default_price_data: nil, + description: nil, + expand: nil, + id: nil, + images: nil, + marketing_features: nil, + metadata: nil, + name: nil, + package_dimensions: nil, + provisioning: nil, + shippable: nil, + statement_descriptor: nil, + tax_code: nil, + type: nil, + unit_label: nil, + url: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for products](https://stripe.com/docs/search#query-fields-for-products). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + # Creates a new product object. + sig { + params(params: T.any(::Stripe::ProductService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def create(params = {}, opts = {}); end + + # Delete a product. Deleting a product is only possible if it has no prices associated with it. Additionally, deleting a product with type=good is only possible if it has no SKUs associated with it. + sig { + params(id: String, params: T.any(::Stripe::ProductService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def delete(id, params = {}, opts = {}); end + + # Returns a list of your products. The products are returned sorted by creation date, with the most recently created products appearing first. + sig { + params(params: T.any(::Stripe::ProductService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing product. Supply the unique product ID from either a product creation request or the product list, and Stripe will return the corresponding product information. + sig { + params(id: String, params: T.any(::Stripe::ProductService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def retrieve(id, params = {}, opts = {}); end + + # Search for products you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::ProductService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Updates the specific product by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(id: String, params: T.any(::Stripe::ProductService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Product) + } + def update(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/promotion_code_service.rbi b/rbi/stripe/services/promotion_code_service.rbi new file mode 100644 index 000000000..a94af0583 --- /dev/null +++ b/rbi/stripe/services/promotion_code_service.rbi @@ -0,0 +1,210 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class PromotionCodeService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Filter promotion codes by whether they are active. + sig { returns(T::Boolean) } + attr_accessor :active + # Only return promotion codes that have this case-insensitive code. + sig { returns(String) } + attr_accessor :code + # Only return promotion codes for this coupon. + sig { returns(String) } + attr_accessor :coupon + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::PromotionCodeService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return promotion codes that are restricted to this customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, code: String, coupon: String, created: T.any(::Stripe::PromotionCodeService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + code: nil, + coupon: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + sig { returns(Integer) } + attr_accessor :minimum_amount + sig { params(minimum_amount: Integer).void } + def initialize(minimum_amount: nil); end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::PromotionCodeService::CreateParams::Restrictions::CurrencyOptions]) + } + attr_accessor :currency_options + # A Boolean indicating if the Promotion Code should only be redeemed for Customers without any successful payments or invoices + sig { returns(T::Boolean) } + attr_accessor :first_time_transaction + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + sig { returns(Integer) } + attr_accessor :minimum_amount + # Three-letter [ISO code](https://stripe.com/docs/currencies) for minimum_amount + sig { returns(String) } + attr_accessor :minimum_amount_currency + sig { + params(currency_options: T::Hash[String, ::Stripe::PromotionCodeService::CreateParams::Restrictions::CurrencyOptions], first_time_transaction: T::Boolean, minimum_amount: Integer, minimum_amount_currency: String).void + } + def initialize( + currency_options: nil, + first_time_transaction: nil, + minimum_amount: nil, + minimum_amount_currency: nil + ); end + end + # Whether the promotion code is currently active. + sig { returns(T::Boolean) } + attr_accessor :active + # The customer-facing code. Regardless of case, this code must be unique across all active promotion codes for a specific customer. Valid characters are lower case letters (a-z), upper case letters (A-Z), and digits (0-9). + # + # If left blank, we will generate one automatically. + sig { returns(String) } + attr_accessor :code + # The coupon for this promotion code. + sig { returns(String) } + attr_accessor :coupon + # The customer that this promotion code can be used by. If not set, the promotion code can be used by all customers. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The timestamp at which this promotion code will expire. If the coupon has specified a `redeems_by`, then this value cannot be after the coupon's `redeems_by`. + sig { returns(Integer) } + attr_accessor :expires_at + # A positive integer specifying the number of times the promotion code can be redeemed. If the coupon has specified a `max_redemptions`, then this value cannot be greater than the coupon's `max_redemptions`. + sig { returns(Integer) } + attr_accessor :max_redemptions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + sig { returns(::Stripe::PromotionCodeService::CreateParams::Restrictions) } + attr_accessor :restrictions + sig { + params(active: T::Boolean, code: String, coupon: String, customer: String, expand: T::Array[String], expires_at: Integer, max_redemptions: Integer, metadata: T::Hash[String, String], restrictions: ::Stripe::PromotionCodeService::CreateParams::Restrictions).void + } + def initialize( + active: nil, + code: nil, + coupon: nil, + customer: nil, + expand: nil, + expires_at: nil, + max_redemptions: nil, + metadata: nil, + restrictions: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Restrictions < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # Minimum amount required to redeem this Promotion Code into a Coupon (e.g., a purchase must be $100 or more to work). + sig { returns(Integer) } + attr_accessor :minimum_amount + sig { params(minimum_amount: Integer).void } + def initialize(minimum_amount: nil); end + end + # Promotion codes defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::PromotionCodeService::UpdateParams::Restrictions::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(currency_options: T::Hash[String, ::Stripe::PromotionCodeService::UpdateParams::Restrictions::CurrencyOptions]).void + } + def initialize(currency_options: nil); end + end + # Whether the promotion code is currently active. A promotion code can only be reactivated when the coupon is still valid and the promotion code is otherwise redeemable. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Settings that restrict the redemption of the promotion code. + sig { returns(::Stripe::PromotionCodeService::UpdateParams::Restrictions) } + attr_accessor :restrictions + sig { + params(active: T::Boolean, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), restrictions: ::Stripe::PromotionCodeService::UpdateParams::Restrictions).void + } + def initialize(active: nil, expand: nil, metadata: nil, restrictions: nil); end + end + # A promotion code points to a coupon. You can optionally restrict the code to a specific customer, redemption limit, and expiration date. + sig { + params(params: T.any(::Stripe::PromotionCodeService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode) + } + def create(params = {}, opts = {}); end + + # Returns a list of your promotion codes. + sig { + params(params: T.any(::Stripe::PromotionCodeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the promotion code with the given ID. In order to retrieve a promotion code by the customer-facing code use [list](https://stripe.com/docs/api/promotion_codes/list) with the desired code. + sig { + params(promotion_code: String, params: T.any(::Stripe::PromotionCodeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode) + } + def retrieve(promotion_code, params = {}, opts = {}); end + + # Updates the specified promotion code by setting the values of the parameters passed. Most fields are, by design, not editable. + sig { + params(promotion_code: String, params: T.any(::Stripe::PromotionCodeService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::PromotionCode) + } + def update(promotion_code, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi b/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi new file mode 100644 index 000000000..aece54ed2 --- /dev/null +++ b/rbi/stripe/services/quote_computed_upfront_line_items_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class QuoteComputedUpfrontLineItemsService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # When retrieving a quote, there is an includable [computed.upfront.line_items](https://stripe.com/docs/api/quotes/object#quote_object-computed-upfront-line_items) property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of upfront line items. + sig { + params(quote: String, params: T.any(::Stripe::QuoteComputedUpfrontLineItemsService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(quote, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/quote_line_item_service.rbi b/rbi/stripe/services/quote_line_item_service.rbi new file mode 100644 index 000000000..ec659e2a0 --- /dev/null +++ b/rbi/stripe/services/quote_line_item_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class QuoteLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # When retrieving a quote, there is an includable line_items property containing the first handful of those items. There is also a URL where you can retrieve the full (paginated) list of line items. + sig { + params(quote: String, params: T.any(::Stripe::QuoteLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(quote, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/quote_line_service.rbi b/rbi/stripe/services/quote_line_service.rbi new file mode 100644 index 000000000..819935d04 --- /dev/null +++ b/rbi/stripe/services/quote_line_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class QuoteLineService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Retrieves a paginated list of lines for a quote. These lines describe changes that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { + params(quote: String, params: T.any(::Stripe::QuoteLineService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(quote, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/quote_preview_invoice_service.rbi b/rbi/stripe/services/quote_preview_invoice_service.rbi new file mode 100644 index 000000000..37625e0eb --- /dev/null +++ b/rbi/stripe/services/quote_preview_invoice_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class QuotePreviewInvoiceService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Preview the invoices that would be generated by accepting the quote. + sig { + params(quote: String, params: T.any(::Stripe::QuotePreviewInvoiceService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(quote, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi b/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi new file mode 100644 index 000000000..c51b20afa --- /dev/null +++ b/rbi/stripe/services/quote_preview_subscription_schedule_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class QuotePreviewSubscriptionScheduleService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Preview the schedules that would be generated by accepting the quote + sig { + params(quote: String, params: T.any(::Stripe::QuotePreviewSubscriptionScheduleService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(quote, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/quote_service.rbi b/rbi/stripe/services/quote_service.rbi new file mode 100644 index 000000000..5a90a62e2 --- /dev/null +++ b/rbi/stripe/services/quote_service.rbi @@ -0,0 +1,2390 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class QuoteService < StripeService + attr_reader :preview_invoices + attr_reader :preview_subscription_schedules + attr_reader :lines + attr_reader :line_items + attr_reader :computed_upfront_line_items + class ListParams < Stripe::RequestParams + # The ID of the customer whose quotes will be retrieved. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The subscription which the quote updates. + sig { returns(String) } + attr_accessor :from_subscription + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the quote. + sig { returns(String) } + attr_accessor :status + # Provides a list of quotes that are associated with the specified test clock. The response will not include quotes with test clocks if this and the customer parameter is not set. + sig { returns(String) } + attr_accessor :test_clock + sig { + params(customer: String, ending_before: String, expand: T::Array[String], from_subscription: String, limit: Integer, starting_after: String, status: String, test_clock: String).void + } + def initialize( + customer: nil, + ending_before: nil, + expand: nil, + from_subscription: nil, + limit: nil, + starting_after: nil, + status: nil, + test_clock: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::QuoteService::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::QuoteService::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::QuoteService::CreateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::QuoteService::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class FromQuote < Stripe::RequestParams + # Whether this quote is a revision of the previous quote. + sig { returns(T::Boolean) } + attr_accessor :is_revision + # The `id` of the quote that will be cloned. + sig { returns(String) } + attr_accessor :quote + sig { params(is_revision: T::Boolean, quote: String).void } + def initialize(is_revision: nil, quote: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(days_until_due: Integer, issuer: ::Stripe::QuoteService::CreateParams::InvoiceSettings::Issuer).void + } + def initialize(days_until_due: nil, issuer: nil); end + end + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::CreateParams::Line::Action::SetItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details for the `add_discount` type. + sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount) } + attr_accessor :add_discount + # Details for the `add_item` type. + sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::AddItem) } + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + sig { returns(T::Hash[String, String]) } + attr_accessor :add_metadata + # Details for the `remove_discount` type. + sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::RemoveDiscount) } + attr_accessor :remove_discount + # Details for the `remove_item` type. + sig { returns(::Stripe::QuoteService::CreateParams::Line::Action::RemoveItem) } + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + sig { returns(T::Array[String]) } + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetDiscount]) } + attr_accessor :set_discounts + # Details for the `set_items` type. + sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem]) } + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set_metadata + # The type of action the quote line performs. + sig { returns(String) } + attr_accessor :type + sig { + params(add_discount: ::Stripe::QuoteService::CreateParams::Line::Action::AddDiscount, add_item: ::Stripe::QuoteService::CreateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::QuoteService::CreateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::QuoteService::CreateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::QuoteService::CreateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ); end + end + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + sig { returns(String) } + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void } + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end + end + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt::DiscountEnd) } + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt::Duration) } + attr_accessor :duration + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::QuoteService::CreateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::QuoteService::CreateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { returns(::Stripe::QuoteService::CreateParams::Line::SetPauseCollection::Set) } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::QuoteService::CreateParams::Line::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt::DiscountEnd) } + attr_accessor :discount_end + # The timestamp the given line ends at. + sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt::LineEndsAt) } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::QuoteService::CreateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::QuoteService::CreateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { returns(::Stripe::QuoteService::CreateParams::Line::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::QuoteService::CreateParams::Line::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # An array of operations the quote line performs. + sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line::Action]) } + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + sig { returns(::Stripe::QuoteService::CreateParams::Line::AppliesTo) } + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + sig { returns(::Stripe::QuoteService::CreateParams::Line::CancelSubscriptionSchedule) } + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + sig { returns(::Stripe::QuoteService::CreateParams::Line::EndsAt) } + attr_accessor :ends_at + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { returns(::Stripe::QuoteService::CreateParams::Line::SetPauseCollection) } + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + sig { returns(String) } + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(::Stripe::QuoteService::CreateParams::Line::StartsAt) } + attr_accessor :starts_at + # Settings related to subscription trials. + sig { returns(::Stripe::QuoteService::CreateParams::Line::TrialSettings) } + attr_accessor :trial_settings + sig { + params(actions: T::Array[::Stripe::QuoteService::CreateParams::Line::Action], applies_to: ::Stripe::QuoteService::CreateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::QuoteService::CreateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::QuoteService::CreateParams::Line::EndsAt, proration_behavior: String, set_pause_collection: ::Stripe::QuoteService::CreateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::QuoteService::CreateParams::Line::StartsAt, trial_settings: ::Stripe::QuoteService::CreateParams::Line::TrialSettings).void + } + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::CreateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::QuoteService::CreateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The discounts applied to this line item. + sig { + returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount])) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::QuoteService::CreateParams::LineItem::PriceData) } + attr_accessor :price_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T.nilable(T::Array[::Stripe::QuoteService::CreateParams::LineItem::Discount]), price: String, price_data: ::Stripe::QuoteService::CreateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Describes the period to bill for upon accepting the quote. + sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance) } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + sig { returns(T.nilable(String)) } + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # The id of a subscription that the quote will update. By default, the quote will contain the state of the subscription (such as line items, collection method and billing thresholds) unless overridden. + sig { returns(String) } + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + sig { + returns(T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling)) + } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + sig { returns(T.nilable(Integer)) } + attr_accessor :trial_period_days + sig { + params(bill_on_acceptance: ::Stripe::QuoteService::CreateParams::SubscriptionData::BillOnAcceptance, billing_behavior: String, billing_cycle_anchor: T.nilable(String), description: String, effective_date: T.nilable(T.any(String, Integer)), end_behavior: String, from_subscription: String, metadata: T::Hash[String, String], prebilling: T.nilable(::Stripe::QuoteService::CreateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void + } + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + from_subscription: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ); end + end + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::AppliesTo) } + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + sig { + returns(::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance) + } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. This is only relevant when `applies_to.type=new_reference`. + sig { returns(String) } + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(applies_to: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: ::Stripe::QuoteService::CreateParams::SubscriptionDataOverride::BillOnAcceptance, billing_behavior: String, customer: String, description: String, end_behavior: String, proration_behavior: String).void + } + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, amount_percent: Float, destination: String).void } + def initialize(amount: nil, amount_percent: nil, destination: nil); end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + sig { returns(T::Boolean) } + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + sig { returns(::Stripe::QuoteService::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + sig { returns(String) } + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. If no value is passed, the default description configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The discounts applied to the quote. + sig { returns(T.nilable(T::Array[::Stripe::QuoteService::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. If no value is passed, the default expiration date configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(Integer) } + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. If no value is passed, the default footer configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(T.nilable(String)) } + attr_accessor :footer + # Clone an existing quote. The new quote will be created in `status=draft`. When using this parameter, you cannot specify any other parameters except for `expires_at`. + sig { returns(::Stripe::QuoteService::CreateParams::FromQuote) } + attr_accessor :from_quote + # A header that will be displayed on the quote PDF. If no value is passed, the default header configured in your [quote template settings](https://dashboard.stripe.com/settings/billing/quote) will be used. + sig { returns(T.nilable(String)) } + attr_accessor :header + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::QuoteService::CreateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::QuoteService::CreateParams::LineItem]) } + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { returns(T::Array[::Stripe::QuoteService::CreateParams::Line]) } + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + sig { returns(::Stripe::QuoteService::CreateParams::SubscriptionData) } + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + sig { returns(T::Array[::Stripe::QuoteService::CreateParams::SubscriptionDataOverride]) } + attr_accessor :subscription_data_overrides + # ID of the test clock to attach to the quote. + sig { returns(String) } + attr_accessor :test_clock + # The data with which to automatically create a Transfer for each of the invoices. + sig { returns(T.nilable(::Stripe::QuoteService::CreateParams::TransferData)) } + attr_accessor :transfer_data + sig { + params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::QuoteService::CreateParams::AutomaticTax, collection_method: String, customer: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::QuoteService::CreateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), from_quote: ::Stripe::QuoteService::CreateParams::FromQuote, header: T.nilable(String), invoice_settings: ::Stripe::QuoteService::CreateParams::InvoiceSettings, line_items: T::Array[::Stripe::QuoteService::CreateParams::LineItem], lines: T::Array[::Stripe::QuoteService::CreateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::QuoteService::CreateParams::SubscriptionData, subscription_data_overrides: T::Array[::Stripe::QuoteService::CreateParams::SubscriptionDataOverride], test_clock: String, transfer_data: T.nilable(::Stripe::QuoteService::CreateParams::TransferData)).void + } + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + from_quote: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + test_clock: nil, + transfer_data: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Controls whether Stripe will automatically compute tax on the resulting invoices or subscriptions as well as the quote itself. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::QuoteService::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { returns(::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd::Duration) } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Number of days within which a customer must pay the invoice generated by this quote. This value will be `null` for quotes where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(days_until_due: Integer, issuer: ::Stripe::QuoteService::UpdateParams::InvoiceSettings::Issuer).void + } + def initialize(days_until_due: nil, issuer: nil); end + end + class Line < Stripe::RequestParams + class Action < Stripe::RequestParams + class AddDiscount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class AddItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class RemoveDiscount < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class RemoveItem < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class SetDiscount < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class SetItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Trial) } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::QuoteService::UpdateParams::Line::Action::SetItem::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details for the `add_discount` type. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount) } + attr_accessor :add_discount + # Details for the `add_item` type. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::AddItem) } + attr_accessor :add_item + # Details for the `add_metadata` type: specify a hash of key-value pairs. + sig { returns(T::Hash[String, String]) } + attr_accessor :add_metadata + # Details for the `remove_discount` type. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::RemoveDiscount) } + attr_accessor :remove_discount + # Details for the `remove_item` type. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::Action::RemoveItem) } + attr_accessor :remove_item + # Details for the `remove_metadata` type: specify an array of metadata keys. + sig { returns(T::Array[String]) } + attr_accessor :remove_metadata + # Details for the `set_discounts` type. + sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetDiscount]) } + attr_accessor :set_discounts + # Details for the `set_items` type. + sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem]) } + attr_accessor :set_items + # Details for the `set_metadata` type: specify an array of key-value pairs. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set_metadata + # The type of action the quote line performs. + sig { returns(String) } + attr_accessor :type + sig { + params(add_discount: ::Stripe::QuoteService::UpdateParams::Line::Action::AddDiscount, add_item: ::Stripe::QuoteService::UpdateParams::Line::Action::AddItem, add_metadata: T::Hash[String, String], remove_discount: ::Stripe::QuoteService::UpdateParams::Line::Action::RemoveDiscount, remove_item: ::Stripe::QuoteService::UpdateParams::Line::Action::RemoveItem, remove_metadata: T::Array[String], set_discounts: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetDiscount], set_items: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action::SetItem], set_metadata: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize( + add_discount: nil, + add_item: nil, + add_metadata: nil, + remove_discount: nil, + remove_item: nil, + remove_metadata: nil, + set_discounts: nil, + set_items: nil, + set_metadata: nil, + type: nil + ); end + end + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class CancelSubscriptionSchedule < Stripe::RequestParams + # Timestamp helper to cancel the underlying schedule on the accompanying line's start date. Must be set to `line_starts_at`. + sig { returns(String) } + attr_accessor :cancel_at + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Boolean that defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { params(cancel_at: String, invoice_now: T::Boolean, prorate: T::Boolean).void } + def initialize(cancel_at: nil, invoice_now: nil, prorate: nil); end + end + class EndsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt::DiscountEnd) } + attr_accessor :discount_end + # Time span for the quote line starting from the `starts_at` date. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt::Duration) } + attr_accessor :duration + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `ends_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::QuoteService::UpdateParams::Line::EndsAt::DiscountEnd, duration: ::Stripe::QuoteService::UpdateParams::Line::EndsAt::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection::Set) } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class StartsAt < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Use the `end` time of a given discount. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt::DiscountEnd) } + attr_accessor :discount_end + # The timestamp the given line ends at. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt::LineEndsAt) } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # Select a way to pass in `starts_at`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::QuoteService::UpdateParams::Line::StartsAt::DiscountEnd, line_ends_at: ::Stripe::QuoteService::UpdateParams::Line::StartsAt::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::QuoteService::UpdateParams::Line::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # An array of operations the quote line performs. + sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line::Action]) } + attr_accessor :actions + # Details to identify the subscription schedule the quote line applies to. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::AppliesTo) } + attr_accessor :applies_to + # For point-in-time quote lines (having no `ends_at` timestamp), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the Quote Line `starts_at` timestamp.For time-span based quote lines (having both `starts_at` and `ends_at`), the only valid value is `automatic`, which removes any previously configured billing cycle anchor resets during the window of time spanning the quote line. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # A point-in-time operation that cancels an existing subscription schedule at the line's starts_at timestamp. Currently only compatible with `quote_acceptance_date` for `starts_at`. When using cancel_subscription_schedule, the subscription schedule on the quote remains unalterable, except for modifications to the metadata, collection_method or invoice_settings. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::CancelSubscriptionSchedule) } + attr_accessor :cancel_subscription_schedule + # Details to identify the end of the time range modified by the proposed change. If not supplied, the quote line is considered a point-in-time operation that only affects the exact timestamp at `starts_at`, and a restricted set of attributes is supported on the quote line. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::EndsAt) } + attr_accessor :ends_at + # The ID of an existing line on the quote. + sig { returns(String) } + attr_accessor :id + # Changes to how Stripe handles prorations during the quote line's time span. Affects if and how prorations are created when a future phase starts. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection) } + attr_accessor :set_pause_collection + # Timestamp helper to end the underlying schedule early, based on the acompanying line's start or end date. + sig { returns(String) } + attr_accessor :set_schedule_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::StartsAt) } + attr_accessor :starts_at + # Settings related to subscription trials. + sig { returns(::Stripe::QuoteService::UpdateParams::Line::TrialSettings) } + attr_accessor :trial_settings + sig { + params(actions: T::Array[::Stripe::QuoteService::UpdateParams::Line::Action], applies_to: ::Stripe::QuoteService::UpdateParams::Line::AppliesTo, billing_cycle_anchor: String, cancel_subscription_schedule: ::Stripe::QuoteService::UpdateParams::Line::CancelSubscriptionSchedule, ends_at: ::Stripe::QuoteService::UpdateParams::Line::EndsAt, id: String, proration_behavior: String, set_pause_collection: ::Stripe::QuoteService::UpdateParams::Line::SetPauseCollection, set_schedule_end: String, starts_at: ::Stripe::QuoteService::UpdateParams::Line::StartsAt, trial_settings: ::Stripe::QuoteService::UpdateParams::Line::TrialSettings).void + } + def initialize( + actions: nil, + applies_to: nil, + billing_cycle_anchor: nil, + cancel_subscription_schedule: nil, + ends_at: nil, + id: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + starts_at: nil, + trial_settings: nil + ); end + end + class LineItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::QuoteService::UpdateParams::LineItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::QuoteService::UpdateParams::LineItem::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The discounts applied to this line item. + sig { + returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount])) + } + attr_accessor :discounts + # The ID of an existing line item on the quote. + sig { returns(String) } + attr_accessor :id + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::QuoteService::UpdateParams::LineItem::PriceData) } + attr_accessor :price_data + # The quantity of the line item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the line item. When set, the `default_tax_rates` on the quote do not apply to this line item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::LineItem::Discount]), id: String, price: String, price_data: ::Stripe::QuoteService::UpdateParams::LineItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + id: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class SubscriptionData < Stripe::RequestParams + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + sig { params(iterations: Integer).void } + def initialize(iterations: nil); end + end + # Describes the period to bill for upon accepting the quote. + sig { + returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance)) + } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # When specified as `reset`, the subscription will always start a new billing period when the quote is accepted. + sig { returns(T.nilable(String)) } + attr_accessor :billing_cycle_anchor + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # When creating a new subscription, the date of which the subscription schedule will start after the quote is accepted. When updating a subscription, the date of which the subscription will be updated using a subscription schedule. The special value `current_period_end` can be provided to update a subscription at the end of its current period. The `effective_date` is ignored if it is in the past when the quote is accepted. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :effective_date + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that will set metadata on the subscription or subscription schedule when the quote is accepted. If a recurring price is included in `line_items`, this field will be passed to the resulting subscription's `metadata` field. If `subscription_data.effective_date` is used, this field will be passed to the resulting subscription schedule's `phases.metadata` field. Unlike object-level metadata, this field is declarative. Updates will clear prior values. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If specified, the invoicing for the given billing cycle iterations will be processed when the quote is accepted. Cannot be used with `effective_date`. + sig { + returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::Prebilling)) + } + attr_accessor :prebilling + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + # Integer representing the number of trial period days before the customer is charged for the first time. + sig { returns(T.nilable(Integer)) } + attr_accessor :trial_period_days + sig { + params(bill_on_acceptance: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::BillOnAcceptance), billing_behavior: String, billing_cycle_anchor: T.nilable(String), description: T.nilable(String), effective_date: T.nilable(T.any(String, Integer)), end_behavior: String, metadata: T::Hash[String, String], prebilling: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionData::Prebilling), proration_behavior: String, trial_period_days: T.nilable(Integer)).void + } + def initialize( + bill_on_acceptance: nil, + billing_behavior: nil, + billing_cycle_anchor: nil, + description: nil, + effective_date: nil, + end_behavior: nil, + metadata: nil, + prebilling: nil, + proration_behavior: nil, + trial_period_days: nil + ); end + end + class SubscriptionDataOverride < Stripe::RequestParams + class AppliesTo < Stripe::RequestParams + # A custom string that identifies a new subscription schedule being created upon quote acceptance. All quote lines with the same `new_reference` field will be applied to the creation of a new subscription schedule. + sig { returns(String) } + attr_accessor :new_reference + # The ID of the schedule the line applies to. + sig { returns(String) } + attr_accessor :subscription_schedule + # Describes whether the quote line is affecting a new schedule or an existing schedule. + sig { returns(String) } + attr_accessor :type + sig { params(new_reference: String, subscription_schedule: String, type: String).void } + def initialize(new_reference: nil, subscription_schedule: nil, type: nil); end + end + class BillOnAcceptance < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class LineStartsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of a Quote line to start the bill period from. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt) + } + attr_accessor :line_starts_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_from` time. + sig { returns(String) } + attr_accessor :type + sig { + params(line_starts_at: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom::LineStartsAt, timestamp: Integer, type: String).void + } + def initialize(line_starts_at: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class LineEndsAt < Stripe::RequestParams + # The ID of a quote line. + sig { returns(String) } + attr_accessor :id + # The position of the previous quote line in the `lines` array after which this line should begin. Indexes start from 0 and must be less than the index of the current line in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(id: String, index: Integer).void } + def initialize(id: nil, index: nil); end + end + # Details of the duration over which to bill. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration) + } + attr_accessor :duration + # Details of a Quote line item from which to bill until. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt) + } + attr_accessor :line_ends_at + # A precise Unix timestamp. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of method to specify the `bill_until` time. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::Duration, line_ends_at: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil::LineEndsAt, timestamp: Integer, type: String).void + } + def initialize(duration: nil, line_ends_at: nil, timestamp: nil, type: nil); end + end + # The start of the period to bill from when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom) + } + attr_accessor :bill_from + # The end of the period to bill until when the Quote is accepted. + sig { + returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil) + } + attr_accessor :bill_until + sig { + params(bill_from: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillFrom, bill_until: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance::BillUntil).void + } + def initialize(bill_from: nil, bill_until: nil); end + end + # Whether the override applies to an existing Subscription Schedule or a new Subscription Schedule. + sig { returns(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::AppliesTo) } + attr_accessor :applies_to + # Describes the period to bill for upon accepting the quote. + sig { + returns(T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance)) + } + attr_accessor :bill_on_acceptance + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # The customer the Subscription Data override applies to. + sig { returns(String) } + attr_accessor :customer + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + # Determines how to handle [prorations](https://stripe.com/docs/subscriptions/billing-cycle#prorations). When creating a subscription, valid values are `create_prorations` or `none`. + # + # When updating a subscription, valid values are `create_prorations`, `none`, or `always_invoice`. + # + # Passing `create_prorations` will cause proration invoice items to be created when applicable. These proration items will only be invoiced immediately under [certain conditions](https://stripe.com/docs/subscriptions/upgrading-downgrading#immediate-payment). In order to always invoice immediately for prorations, pass `always_invoice`. + # + # Prorations can be disabled by passing `none`. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(applies_to: ::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::AppliesTo, bill_on_acceptance: T.nilable(::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride::BillOnAcceptance), billing_behavior: String, customer: String, description: T.nilable(String), end_behavior: String, proration_behavior: String).void + } + def initialize( + applies_to: nil, + bill_on_acceptance: nil, + billing_behavior: nil, + customer: nil, + description: nil, + end_behavior: nil, + proration_behavior: nil + ); end + end + class TransferData < Stripe::RequestParams + # The amount that will be transferred automatically when the invoice is paid. If no amount is set, the full amount is transferred. There cannot be any line items with recurring prices when using this field. + sig { returns(Integer) } + attr_accessor :amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. There must be at least 1 line item with a recurring price to use this field. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount: Integer, amount_percent: Float, destination: String).void } + def initialize(amount: nil, amount_percent: nil, destination: nil); end + end + # Set to true to allow quote lines to have `starts_at` in the past if collection is paused between `starts_at` and now. + sig { returns(T::Boolean) } + attr_accessor :allow_backdated_lines + # The amount of the application fee (if any) that will be requested to be applied to the payment and transferred to the application owner's Stripe account. There cannot be any line items with recurring prices when using this field. + sig { returns(T.nilable(Integer)) } + attr_accessor :application_fee_amount + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. There must be at least 1 line item with a recurring price to use this field. + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Settings for automatic tax lookup for this quote and resulting invoices and subscriptions. + sig { returns(::Stripe::QuoteService::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay invoices at the end of the subscription cycle or at invoice finalization using the default payment method attached to the subscription or customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The customer for which this quote belongs to. A customer is required before finalizing the quote. Once specified, it cannot be changed. + sig { returns(String) } + attr_accessor :customer + # The tax rates that will apply to any line item that does not have `tax_rates` set. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # A description that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The discounts applied to the quote. + sig { returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :expires_at + # A footer that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } + attr_accessor :footer + # A header that will be displayed on the quote PDF. + sig { returns(T.nilable(String)) } + attr_accessor :header + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::QuoteService::UpdateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of line items the customer is being quoted for. Each line item includes information about the product, the quantity, and the resulting cost. + sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::LineItem]) } + attr_accessor :line_items + # A list of [quote lines](https://docs.stripe.com/api/quote_lines) on the quote. These lines describe changes, in the order provided, that will be used to create new subscription schedules or update existing subscription schedules when the quote is accepted. + sig { returns(T::Array[::Stripe::QuoteService::UpdateParams::Line]) } + attr_accessor :lines + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # When creating a subscription or subscription schedule, the specified configuration data will be used. There must be at least one line item with a recurring price for a subscription or subscription schedule to be created. A subscription schedule is created if `subscription_data[effective_date]` is present and in the future, otherwise a subscription is created. + sig { returns(::Stripe::QuoteService::UpdateParams::SubscriptionData) } + attr_accessor :subscription_data + # List representing overrides for `subscription_data` configurations for specific subscription schedules. + sig { + returns(T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride])) + } + attr_accessor :subscription_data_overrides + # The data with which to automatically create a Transfer for each of the invoices. + sig { returns(T.nilable(::Stripe::QuoteService::UpdateParams::TransferData)) } + attr_accessor :transfer_data + sig { + params(allow_backdated_lines: T::Boolean, application_fee_amount: T.nilable(Integer), application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::QuoteService::UpdateParams::AutomaticTax, collection_method: String, customer: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::Discount]), expand: T::Array[String], expires_at: Integer, footer: T.nilable(String), header: T.nilable(String), invoice_settings: ::Stripe::QuoteService::UpdateParams::InvoiceSettings, line_items: T::Array[::Stripe::QuoteService::UpdateParams::LineItem], lines: T::Array[::Stripe::QuoteService::UpdateParams::Line], metadata: T::Hash[String, String], on_behalf_of: T.nilable(String), subscription_data: ::Stripe::QuoteService::UpdateParams::SubscriptionData, subscription_data_overrides: T.nilable(T::Array[::Stripe::QuoteService::UpdateParams::SubscriptionDataOverride]), transfer_data: T.nilable(::Stripe::QuoteService::UpdateParams::TransferData)).void + } + def initialize( + allow_backdated_lines: nil, + application_fee_amount: nil, + application_fee_percent: nil, + automatic_tax: nil, + collection_method: nil, + customer: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + expires_at: nil, + footer: nil, + header: nil, + invoice_settings: nil, + line_items: nil, + lines: nil, + metadata: nil, + on_behalf_of: nil, + subscription_data: nil, + subscription_data_overrides: nil, + transfer_data: nil + ); end + end + class AcceptParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FinalizeQuoteParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A future timestamp on which the quote will be canceled if in `open` or `draft` status. Measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :expires_at + sig { params(expand: T::Array[String], expires_at: Integer).void } + def initialize(expand: nil, expires_at: nil); end + end + class MarkDraftParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class MarkStaleParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Reason the Quote is being marked stale. + sig { returns(String) } + attr_accessor :reason + sig { params(expand: T::Array[String], reason: String).void } + def initialize(expand: nil, reason: nil); end + end + class ReestimateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListPreviewInvoiceLinesParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Accepts the specified quote. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::AcceptParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def accept(quote, params = {}, opts = {}); end + + # Cancels the quote. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def cancel(quote, params = {}, opts = {}); end + + # A quote models prices and services for a customer. Default options for header, description, footer, and expires_at can be set in the dashboard via the [quote template](https://dashboard.stripe.com/settings/billing/quote). + sig { + params(params: T.any(::Stripe::QuoteService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def create(params = {}, opts = {}); end + + # Finalizes the quote. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::FinalizeQuoteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def finalize_quote(quote, params = {}, opts = {}); end + + # Returns a list of your quotes. + sig { + params(params: T.any(::Stripe::QuoteService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Preview the invoice line items that would be generated by accepting the quote. + sig { + params(quote: String, preview_invoice: String, params: T.any(::Stripe::QuoteService::ListPreviewInvoiceLinesParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list_preview_invoice_lines(quote, preview_invoice, params = {}, opts = {}); end + + # Converts a stale quote to draft. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::MarkDraftParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def mark_draft(quote, params = {}, opts = {}); end + + # Converts a draft or open quote to stale. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::MarkStaleParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def mark_stale(quote, params = {}, opts = {}); end + + # Download the PDF for a finalized quote. Explanation for special handling can be found [here](https://docs.stripe.com/quotes/overview#quote_pdf) + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped) + } + def pdf(quote, params = {}, opts = {}, &read_body_chunk_block); end + + # Recompute the upcoming invoice estimate for the quote. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::ReestimateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def reestimate(quote, params = {}, opts = {}); end + + # Retrieves the quote with the given ID. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def retrieve(quote, params = {}, opts = {}); end + + # A quote models prices and services for a customer. + sig { + params(quote: String, params: T.any(::Stripe::QuoteService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Quote) + } + def update(quote, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/radar/early_fraud_warning_service.rbi b/rbi/stripe/services/radar/early_fraud_warning_service.rbi new file mode 100644 index 000000000..f2c05d3dd --- /dev/null +++ b/rbi/stripe/services/radar/early_fraud_warning_service.rbi @@ -0,0 +1,83 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Radar + class EarlyFraudWarningService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return early fraud warnings for the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return early fraud warnings that were created during the given date interval. + sig { + returns(T.any(::Stripe::Radar::EarlyFraudWarningService::ListParams::Created, Integer)) + } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return early fraud warnings for charges that were created by the PaymentIntent specified by this PaymentIntent ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::Radar::EarlyFraudWarningService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of early fraud warnings. + sig { + params(params: T.any(::Stripe::Radar::EarlyFraudWarningService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an early fraud warning that has previously been created. + # + # Please refer to the [early fraud warning](https://stripe.com/docs/api#early_fraud_warning_object) object reference for more details. + sig { + params(early_fraud_warning: String, params: T.any(::Stripe::Radar::EarlyFraudWarningService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::EarlyFraudWarning) + } + def retrieve(early_fraud_warning, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/radar/value_list_item_service.rbi b/rbi/stripe/services/radar/value_list_item_service.rbi new file mode 100644 index 000000000..7e522da75 --- /dev/null +++ b/rbi/stripe/services/radar/value_list_item_service.rbi @@ -0,0 +1,107 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Radar + class ValueListItemService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return items that were created during the given date interval. + sig { returns(T.any(::Stripe::Radar::ValueListItemService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Return items belonging to the parent list whose value matches the specified value (using an "is like" match). + sig { returns(String) } + attr_accessor :value + # Identifier for the parent value list this item belongs to. + sig { returns(String) } + attr_accessor :value_list + sig { + params(created: T.any(::Stripe::Radar::ValueListItemService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, value: String, value_list: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + value: nil, + value_list: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The value of the item (whose type must match the type of the parent value list). + sig { returns(String) } + attr_accessor :value + # The identifier of the value list which the created item will be added to. + sig { returns(String) } + attr_accessor :value_list + sig { params(expand: T::Array[String], value: String, value_list: String).void } + def initialize(expand: nil, value: nil, value_list: nil); end + end + # Creates a new ValueListItem object, which is added to the specified parent value list. + sig { + params(params: T.any(::Stripe::Radar::ValueListItemService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem) + } + def create(params = {}, opts = {}); end + + # Deletes a ValueListItem object, removing it from its parent value list. + sig { + params(item: String, params: T.any(::Stripe::Radar::ValueListItemService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem) + } + def delete(item, params = {}, opts = {}); end + + # Returns a list of ValueListItem objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Radar::ValueListItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a ValueListItem object. + sig { + params(item: String, params: T.any(::Stripe::Radar::ValueListItemService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueListItem) + } + def retrieve(item, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/radar/value_list_service.rbi b/rbi/stripe/services/radar/value_list_service.rbi new file mode 100644 index 000000000..e180ee0f0 --- /dev/null +++ b/rbi/stripe/services/radar/value_list_service.rbi @@ -0,0 +1,139 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Radar + class ValueListService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # The name of the value list for use in rules. + sig { returns(String) } + attr_accessor :alias + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The human-readable name of the value list. + sig { returns(String) } + attr_accessor :name + sig { + params(alias_: String, expand: T::Array[String], metadata: T::Hash[String, String], name: String).void + } + def initialize(alias_: nil, expand: nil, metadata: nil, name: nil); end + end + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # The alias used to reference the value list when writing rules. + sig { returns(String) } + attr_accessor :alias + # A value contained within a value list - returns all value lists containing this value. + sig { returns(String) } + attr_accessor :contains + # Only return value lists that were created during the given date interval. + sig { returns(T.any(::Stripe::Radar::ValueListService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(alias_: String, contains: String, created: T.any(::Stripe::Radar::ValueListService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + alias_: nil, + contains: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # The name of the value list for use in rules. + sig { returns(String) } + attr_accessor :alias + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Type of the items in the value list. One of `card_fingerprint`, `us_bank_account_fingerprint`, `sepa_debit_fingerprint`, `card_bin`, `email`, `ip_address`, `country`, `string`, `case_sensitive_string`, or `customer_id`. Use `string` if the item type is unknown or mixed. + sig { returns(String) } + attr_accessor :item_type + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The human-readable name of the value list. + sig { returns(String) } + attr_accessor :name + sig { + params(alias_: String, expand: T::Array[String], item_type: String, metadata: T::Hash[String, String], name: String).void + } + def initialize(alias_: nil, expand: nil, item_type: nil, metadata: nil, name: nil); end + end + # Creates a new ValueList object, which can then be referenced in rules. + sig { + params(params: T.any(::Stripe::Radar::ValueListService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def create(params = {}, opts = {}); end + + # Deletes a ValueList object, also deleting any items contained within the value list. To be deleted, a value list must not be referenced in any rules. + sig { + params(value_list: String, params: T.any(::Stripe::Radar::ValueListService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def delete(value_list, params = {}, opts = {}); end + + # Returns a list of ValueList objects. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::Radar::ValueListService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a ValueList object. + sig { + params(value_list: String, params: T.any(::Stripe::Radar::ValueListService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def retrieve(value_list, params = {}, opts = {}); end + + # Updates a ValueList object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. Note that item_type is immutable. + sig { + params(value_list: String, params: T.any(::Stripe::Radar::ValueListService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Radar::ValueList) + } + def update(value_list, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/radar_service.rbi b/rbi/stripe/services/radar_service.rbi new file mode 100644 index 000000000..0d7491083 --- /dev/null +++ b/rbi/stripe/services/radar_service.rbi @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class RadarService < StripeService + attr_reader :early_fraud_warnings + attr_reader :value_lists + attr_reader :value_list_items + end +end \ No newline at end of file diff --git a/rbi/stripe/services/refund_service.rbi b/rbi/stripe/services/refund_service.rbi new file mode 100644 index 000000000..f1ed9628e --- /dev/null +++ b/rbi/stripe/services/refund_service.rbi @@ -0,0 +1,181 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class RefundService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return refunds for the charge specified by this charge ID. + sig { returns(String) } + attr_accessor :charge + # Only return refunds that were created during the given date interval. + sig { returns(T.any(::Stripe::RefundService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return refunds for the PaymentIntent specified by this ID. + sig { returns(String) } + attr_accessor :payment_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(charge: String, created: T.any(::Stripe::RefundService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, payment_intent: String, starting_after: String).void + } + def initialize( + charge: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_intent: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Attribute for param field amount + sig { returns(Integer) } + attr_accessor :amount + # The identifier of the charge to refund. + sig { returns(String) } + attr_accessor :charge + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Customer whose customer balance to refund from. + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # For payment methods without native refund support (e.g., Konbini, PromptPay), use this email from the customer to receive refund instructions. + sig { returns(String) } + attr_accessor :instructions_email + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Origin of the refund + sig { returns(String) } + attr_accessor :origin + # The identifier of the PaymentIntent to refund. + sig { returns(String) } + attr_accessor :payment_intent + # String indicating the reason for the refund. If set, possible values are `duplicate`, `fraudulent`, and `requested_by_customer`. If you believe the charge to be fraudulent, specifying `fraudulent` as the reason will add the associated card and email to your [block lists](https://stripe.com/docs/radar/lists), and will also help us improve our fraud detection algorithms. + sig { returns(String) } + attr_accessor :reason + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :refund_application_fee + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount).

A transfer can be reversed only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :reverse_transfer + sig { + params(amount: Integer, charge: String, currency: String, customer: String, expand: T::Array[String], instructions_email: String, metadata: T.nilable(T::Hash[String, String]), origin: String, payment_intent: String, reason: String, refund_application_fee: T::Boolean, reverse_transfer: T::Boolean).void + } + def initialize( + amount: nil, + charge: nil, + currency: nil, + customer: nil, + expand: nil, + instructions_email: nil, + metadata: nil, + origin: nil, + payment_intent: nil, + reason: nil, + refund_application_fee: nil, + reverse_transfer: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels a refund with a status of requires_action. + # + # You can't cancel refunds in other states. Only refunds for payment methods that require customer action can enter the requires_action state. + sig { + params(refund: String, params: T.any(::Stripe::RefundService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def cancel(refund, params = {}, opts = {}); end + + # When you create a new refund, you must specify a Charge or a PaymentIntent object on which to create it. + # + # Creating a new refund will refund a charge that has previously been created but not yet refunded. + # Funds will be refunded to the credit or debit card that was originally charged. + # + # You can optionally refund only part of a charge. + # You can do so multiple times, until the entire charge has been refunded. + # + # Once entirely refunded, a charge can't be refunded again. + # This method will raise an error when called on an already-refunded charge, + # or when trying to refund more money than is left on a charge. + sig { + params(params: T.any(::Stripe::RefundService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def create(params = {}, opts = {}); end + + # Returns a list of all refunds you created. We return the refunds in sorted order, with the most recent refunds appearing first. The 10 most recent refunds are always available by default on the Charge object. + sig { + params(params: T.any(::Stripe::RefundService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing refund. + sig { + params(refund: String, params: T.any(::Stripe::RefundService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def retrieve(refund, params = {}, opts = {}); end + + # Updates the refund that you specify by setting the values of the passed parameters. Any parameters that you don't provide remain unchanged. + # + # This request only accepts metadata as an argument. + sig { + params(refund: String, params: T.any(::Stripe::RefundService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def update(refund, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/reporting/report_run_service.rbi b/rbi/stripe/services/reporting/report_run_service.rbi new file mode 100644 index 000000000..a26e23ae3 --- /dev/null +++ b/rbi/stripe/services/reporting/report_run_service.rbi @@ -0,0 +1,131 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Reporting + class ReportRunService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return Report Runs that were created during the given date interval. + sig { returns(T.any(::Stripe::Reporting::ReportRunService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Reporting::ReportRunService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Parameters < Stripe::RequestParams + # The set of report columns to include in the report output. If omitted, the Report Type is run with its default column set. + sig { returns(T::Array[String]) } + attr_accessor :columns + # Connected account ID to filter for in the report run. + sig { returns(String) } + attr_accessor :connected_account + # Currency of objects to be included in the report run. + sig { returns(String) } + attr_accessor :currency + # Ending timestamp of data to be included in the report run (exclusive). + sig { returns(Integer) } + attr_accessor :interval_end + # Starting timestamp of data to be included in the report run. + sig { returns(Integer) } + attr_accessor :interval_start + # Payout ID by which to filter the report run. + sig { returns(String) } + attr_accessor :payout + # Category of balance transactions to be included in the report run. + sig { returns(String) } + attr_accessor :reporting_category + # Defaults to `Etc/UTC`. The output timezone for all timestamps in the report. A list of possible time zone values is maintained at the [IANA Time Zone Database](http://www.iana.org/time-zones). Has no effect on `interval_start` or `interval_end`. + sig { returns(String) } + attr_accessor :timezone + sig { + params(columns: T::Array[String], connected_account: String, currency: String, interval_end: Integer, interval_start: Integer, payout: String, reporting_category: String, timezone: String).void + } + def initialize( + columns: nil, + connected_account: nil, + currency: nil, + interval_end: nil, + interval_start: nil, + payout: nil, + reporting_category: nil, + timezone: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Parameters specifying how the report should be run. Different Report Types have different required and optional parameters, listed in the [API Access to Reports](https://stripe.com/docs/reporting/statements/api) documentation. + sig { returns(::Stripe::Reporting::ReportRunService::CreateParams::Parameters) } + attr_accessor :parameters + # The ID of the [report type](https://stripe.com/docs/reporting/statements/api#report-types) to run, such as `"balance.summary.1"`. + sig { returns(String) } + attr_accessor :report_type + sig { + params(expand: T::Array[String], parameters: ::Stripe::Reporting::ReportRunService::CreateParams::Parameters, report_type: String).void + } + def initialize(expand: nil, parameters: nil, report_type: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Creates a new object and begin running the report. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + sig { + params(params: T.any(::Stripe::Reporting::ReportRunService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportRun) + } + def create(params = {}, opts = {}); end + + # Returns a list of Report Runs, with the most recent appearing first. + sig { + params(params: T.any(::Stripe::Reporting::ReportRunService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing Report Run. + sig { + params(report_run: String, params: T.any(::Stripe::Reporting::ReportRunService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportRun) + } + def retrieve(report_run, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/reporting/report_type_service.rbi b/rbi/stripe/services/reporting/report_type_service.rbi new file mode 100644 index 000000000..8ad7fb31f --- /dev/null +++ b/rbi/stripe/services/reporting/report_type_service.rbi @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Reporting + class ReportTypeService < StripeService + class ListParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a full list of Report Types. + sig { + params(params: T.any(::Stripe::Reporting::ReportTypeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a Report Type. (Certain report types require a [live-mode API key](https://stripe.com/docs/keys#test-live-modes).) + sig { + params(report_type: String, params: T.any(::Stripe::Reporting::ReportTypeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reporting::ReportType) + } + def retrieve(report_type, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/reporting_service.rbi b/rbi/stripe/services/reporting_service.rbi new file mode 100644 index 000000000..129278a43 --- /dev/null +++ b/rbi/stripe/services/reporting_service.rbi @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ReportingService < StripeService + attr_reader :report_runs + attr_reader :report_types + end +end \ No newline at end of file diff --git a/rbi/stripe/services/review_service.rbi b/rbi/stripe/services/review_service.rbi new file mode 100644 index 000000000..31cc85198 --- /dev/null +++ b/rbi/stripe/services/review_service.rbi @@ -0,0 +1,82 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ReviewService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return reviews that were created during the given date interval. + sig { returns(T.any(::Stripe::ReviewService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::ReviewService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ApproveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Approves a Review object, closing it and removing it from the list of reviews. + sig { + params(review: String, params: T.any(::Stripe::ReviewService::ApproveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review) + } + def approve(review, params = {}, opts = {}); end + + # Returns a list of Review objects that have open set to true. The objects are sorted in descending order by creation date, with the most recently created object appearing first. + sig { + params(params: T.any(::Stripe::ReviewService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Review object. + sig { + params(review: String, params: T.any(::Stripe::ReviewService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Review) + } + def retrieve(review, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/setup_attempt_service.rbi b/rbi/stripe/services/setup_attempt_service.rbi new file mode 100644 index 000000000..8289f3ff1 --- /dev/null +++ b/rbi/stripe/services/setup_attempt_service.rbi @@ -0,0 +1,63 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SetupAttemptService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A filter on the list, based on the object `created` field. The value + # can be a string with an integer Unix timestamp or a + # dictionary with a number of different query options. + sig { returns(T.any(::Stripe::SetupAttemptService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return SetupAttempts created by the SetupIntent specified by + # this ID. + sig { returns(String) } + attr_accessor :setup_intent + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::SetupAttemptService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, setup_intent: String, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + setup_intent: nil, + starting_after: nil + ); end + end + # Returns a list of SetupAttempts that associate with a provided SetupIntent. + sig { + params(params: T.any(::Stripe::SetupAttemptService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/setup_intent_service.rbi b/rbi/stripe/services/setup_intent_service.rbi new file mode 100644 index 000000000..326f398de --- /dev/null +++ b/rbi/stripe/services/setup_intent_service.rbi @@ -0,0 +1,3609 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SetupIntentService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } + attr_accessor :attach_to_self + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::SetupIntentService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return SetupIntents for the customer specified by this customer ID. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return SetupIntents that associate with the specified payment method. + sig { returns(String) } + attr_accessor :payment_method + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(attach_to_self: T::Boolean, created: T.any(::Stripe::SetupIntentService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, payment_method: String, starting_after: String).void + } + def initialize( + attach_to_self: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + payment_method: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AutomaticPaymentMethods < Stripe::RequestParams + # Controls whether this SetupIntent will accept redirect-based payment methods. + # + # Redirect-based payment methods may require your customer to be redirected to a payment method's app or site for authentication or additional steps. To [confirm](https://stripe.com/docs/api/setup_intents/confirm) this SetupIntent, you may be required to provide a `return_url` to redirect customers back to your site after they authenticate or complete the setup. + sig { returns(String) } + attr_accessor :allow_redirects + # Whether this feature is enabled. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(allow_redirects: String, enabled: T::Boolean).void } + def initialize(allow_redirects: nil, enabled: nil); end + end + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { returns(::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance) } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::SetupIntentService::CreateParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Blik, boleto: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Eps, fpx: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Fpx, giropay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Giropay, gopay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Klarna, konbini: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::KrCard, link: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Link, mb_way: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Oxxo, p24: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::P24, payco: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payco, paynow: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paynow, paypal: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Paypal, payto: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Payto, pix: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Pix, promptpay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Promptpay, qris: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Qris, radar_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Sofort, swish: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Swish, twint: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::WechatPay, zip: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(currency: nil, mandate_options: nil, verification_method: nil); end + end + class AmazonPay < Stripe::RequestParams + + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, currency: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, network_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(mandate_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_three_d_secure: String, three_d_secure: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + sig { params(persistent_token: String).void } + def initialize(persistent_token: nil); end + end + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + sig { returns(String) } + attr_accessor :billing_agreement_id + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(billing_agreement_id: String, currency: String, subsellers: T::Array[String]).void + } + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Payto::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount::Networks, verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ); end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit) } + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AmazonPay) } + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit) } + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card) } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent) + } + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link) } + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit) } + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + sig { + returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AcssDebit, amazon_pay: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::AmazonPay, bacs_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::BacsDebit, card: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Card, card_present: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::CardPresent, link: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Link, paypal: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Paypal, payto: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::Payto, sepa_debit: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::SepaDebit, us_bank_account: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions::UsBankAccount).void + } + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + class SingleUse < Stripe::RequestParams + # Amount the customer is granting permission to collect later. A positive integer representing how much to charge in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to charge $1.00 or 100 to charge ¥100, a zero-decimal currency). The minimum amount is $0.50 US or [equivalent in charge currency](https://stripe.com/docs/currencies#minimum-and-maximum-charge-amounts). The amount value supports up to eight digits (e.g., a value of 99999999 for a USD charge of $999,999.99). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + sig { params(amount: Integer, currency: String).void } + def initialize(amount: nil, currency: nil); end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } + attr_accessor :attach_to_self + # When you enable this parameter, this SetupIntent accepts payment methods that you enable in the Dashboard and that are compatible with its other parameters. + sig { returns(::Stripe::SetupIntentService::CreateParams::AutomaticPaymentMethods) } + attr_accessor :automatic_payment_methods + # Set to `true` to attempt to confirm this SetupIntent immediately. This parameter defaults to `false`. If a card is the attached payment method, you can provide a `return_url` in case further authentication is necessary. + sig { returns(T::Boolean) } + attr_accessor :confirm + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T::Array[String]) } + attr_accessor :flow_directions + # This hash contains details about the mandate to create. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + sig { returns(T.nilable(::Stripe::SetupIntentService::CreateParams::MandateData)) } + attr_accessor :mandate_data + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Stripe account ID created for this SetupIntent. + sig { returns(String) } + attr_accessor :on_behalf_of + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + sig { returns(::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can use. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + # The URL to redirect your customer back to after they authenticate or cancel their payment on the payment method's app or site. To redirect to a mobile application, you can alternatively supply an application URI scheme. This parameter can only be used with [`confirm=true`](https://stripe.com/docs/api/setup_intents/create#create_setup_intent-confirm). + sig { returns(String) } + attr_accessor :return_url + # If you populate this hash, this SetupIntent generates a `single_use` mandate after successful completion. + sig { returns(::Stripe::SetupIntentService::CreateParams::SingleUse) } + attr_accessor :single_use + # Indicates how the payment method is intended to be used in the future. If not provided, this value defaults to `off_session`. + sig { returns(String) } + attr_accessor :usage + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(attach_to_self: T::Boolean, automatic_payment_methods: ::Stripe::SetupIntentService::CreateParams::AutomaticPaymentMethods, confirm: T::Boolean, confirmation_token: String, customer: String, description: String, expand: T::Array[String], flow_directions: T::Array[String], mandate_data: T.nilable(::Stripe::SetupIntentService::CreateParams::MandateData), metadata: T::Hash[String, String], on_behalf_of: String, payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::SetupIntentService::CreateParams::PaymentMethodData, payment_method_options: ::Stripe::SetupIntentService::CreateParams::PaymentMethodOptions, payment_method_types: T::Array[String], return_url: String, single_use: ::Stripe::SetupIntentService::CreateParams::SingleUse, usage: String, use_stripe_sdk: T::Boolean).void + } + def initialize( + attach_to_self: nil, + automatic_payment_methods: nil, + confirm: nil, + confirmation_token: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + mandate_data: nil, + metadata: nil, + on_behalf_of: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil, + return_url: nil, + single_use: nil, + usage: nil, + use_stripe_sdk: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # The client secret of the SetupIntent. We require this string if you use a publishable key to retrieve the SetupIntent. + sig { returns(String) } + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(client_secret: String, expand: T::Array[String]).void } + def initialize(client_secret: nil, expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RadarOptions) } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Blik, boleto: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Eps, fpx: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Fpx, giropay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Giropay, gopay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Klarna, konbini: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::KrCard, link: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Link, mb_way: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Oxxo, p24: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::P24, payco: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payco, paynow: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paynow, paypal: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Paypal, payto: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Payto, pix: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Pix, promptpay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Promptpay, qris: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Qris, radar_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Sofort, swish: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Swish, twint: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::WechatPay, zip: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(currency: nil, mandate_options: nil, verification_method: nil); end + end + class AmazonPay < Stripe::RequestParams + + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, currency: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, network_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(mandate_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_three_d_secure: String, three_d_secure: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + sig { params(persistent_token: String).void } + def initialize(persistent_token: nil); end + end + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + sig { returns(String) } + attr_accessor :billing_agreement_id + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(billing_agreement_id: String, currency: String, subsellers: T::Array[String]).void + } + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Payto::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount::Networks, verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ); end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit) } + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AmazonPay) } + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit) } + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card) } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent) + } + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link) } + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit) } + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + sig { + returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AcssDebit, amazon_pay: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::AmazonPay, bacs_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::BacsDebit, card: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Card, card_present: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::CardPresent, link: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Link, paypal: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Paypal, payto: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::Payto, sepa_debit: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::SepaDebit, us_bank_account: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions::UsBankAccount).void + } + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # If present, the SetupIntent's payment method will be attached to the in-context Stripe Account. + # + # It can only be used for this Stripe Account’s own money movement flows like InboundTransfer and OutboundTransfers. It cannot be set to true when setting up a PaymentMethod for a Customer, and defaults to false when attaching a PaymentMethod to a Customer. + sig { returns(T::Boolean) } + attr_accessor :attach_to_self + # ID of the Customer this SetupIntent belongs to, if one exists. + # + # If present, the SetupIntent's payment method will be attached to the Customer on successful setup. Payment methods attached to other Customers cannot be used with this SetupIntent. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Indicates the directions of money movement for which this payment method is intended to be used. + # + # Include `inbound` if you intend to use the payment method as the origin to pull funds from. Include `outbound` if you intend to use the payment method as the destination to send funds to. You can include both if you intend to use the payment method for both purposes. + sig { returns(T::Array[String]) } + attr_accessor :flow_directions + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. To unset this field to null, pass in an empty string. + sig { returns(String) } + attr_accessor :payment_method + # The ID of the [payment method configuration](https://stripe.com/docs/api/payment_method_configurations) to use with this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method_configuration + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + sig { returns(::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The list of payment method types (for example, card) that this SetupIntent can set up. If you don't provide this, Stripe will dynamically show relevant payment methods from your [payment method settings](https://dashboard.stripe.com/settings/payment_methods). + sig { returns(T::Array[String]) } + attr_accessor :payment_method_types + sig { + params(attach_to_self: T::Boolean, customer: String, description: String, expand: T::Array[String], flow_directions: T::Array[String], metadata: T.nilable(T::Hash[String, String]), payment_method: String, payment_method_configuration: String, payment_method_data: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodData, payment_method_options: ::Stripe::SetupIntentService::UpdateParams::PaymentMethodOptions, payment_method_types: T::Array[String]).void + } + def initialize( + attach_to_self: nil, + customer: nil, + description: nil, + expand: nil, + flow_directions: nil, + metadata: nil, + payment_method: nil, + payment_method_configuration: nil, + payment_method_data: nil, + payment_method_options: nil, + payment_method_types: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Reason for canceling this SetupIntent. Possible values are: `abandoned`, `requested_by_customer`, or `duplicate` + sig { returns(String) } + attr_accessor :cancellation_reason + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(cancellation_reason: String, expand: T::Array[String]).void } + def initialize(cancellation_reason: nil, expand: nil); end + end + class ConfirmParams < Stripe::RequestParams + class MandateData < Stripe::RequestParams + class CustomerAcceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + + end + class Online < Stripe::RequestParams + # The IP address from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :ip_address + # The user agent of the browser from which the Mandate was accepted by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(ip_address: String, user_agent: String).void } + def initialize(ip_address: nil, user_agent: nil); end + end + # The time at which the customer accepted the Mandate. + sig { returns(Integer) } + attr_accessor :accepted_at + # If this is a Mandate accepted offline, this hash contains details about the offline acceptance. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline) + } + attr_accessor :offline + # If this is a Mandate accepted online, this hash contains details about the online acceptance. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online) + } + attr_accessor :online + # The type of customer acceptance information included with the Mandate. One of `online` or `offline`. + sig { returns(String) } + attr_accessor :type + sig { + params(accepted_at: Integer, offline: ::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Offline, online: ::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance::Online, type: String).void + } + def initialize(accepted_at: nil, offline: nil, online: nil, type: nil); end + end + # This hash contains details about the customer acceptance of the Mandate. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance) + } + attr_accessor :customer_acceptance + sig { + params(customer_acceptance: ::Stripe::SetupIntentService::ConfirmParams::MandateData::CustomerAcceptance).void + } + def initialize(customer_acceptance: nil); end + end + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AcssDebit) } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Affirm) } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alipay) } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alma) } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AmazonPay) } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit) } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BacsDebit) } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Bancontact) } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Blik) } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Boleto) } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp) } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Eps) } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Fpx) } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Giropay) } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Gopay) } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Grabpay) } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Ideal) } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KakaoPay) } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna) } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Konbini) } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KrCard) } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Link) } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::MbWay) } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Mobilepay) } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Multibanco) } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NaverPay) } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Oxxo) } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::P24) } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payco) } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paynow) } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paypal) } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payto) } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Pix) } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Promptpay) } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Qris) } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RadarOptions) + } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Rechnung) } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RevolutPay) } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SamsungPay) } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SepaDebit) } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Shopeepay) } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Sofort) } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Swish) } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Twint) } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::WechatPay) } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Zip) } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::BillingDetails, blik: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Blik, boleto: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Boleto, cashapp: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Eps, fpx: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Fpx, giropay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Giropay, gopay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Gopay, grabpay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Ideal, interac_present: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Klarna, konbini: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Konbini, kr_card: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::KrCard, link: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Link, mb_way: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Oxxo, p24: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::P24, payco: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payco, paynow: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paynow, paypal: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Paypal, payto: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Payto, pix: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Pix, promptpay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Promptpay, qris: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Qris, radar_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Sofort, swish: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Swish, twint: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::WechatPay, zip: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # A URL for custom mandate text to render during confirmation step. + # The URL will be rendered with additional GET parameters `payment_intent` and `payment_intent_client_secret` when confirming a Payment Intent, + # or `setup_intent` and `setup_intent_client_secret` when confirming a Setup Intent. + sig { returns(T.nilable(String)) } + attr_accessor :custom_mandate_url + # List of Stripe products where this mandate can be selected automatically. + sig { returns(T::Array[String]) } + attr_accessor :default_for + # Description of the mandate interval. Only required if 'payment_schedule' parameter is 'interval' or 'combined'. + sig { returns(String) } + attr_accessor :interval_description + # Payment schedule for the mandate. + sig { returns(String) } + attr_accessor :payment_schedule + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { + params(custom_mandate_url: T.nilable(String), default_for: T::Array[String], interval_description: String, payment_schedule: String, transaction_type: String).void + } + def initialize( + custom_mandate_url: nil, + default_for: nil, + interval_description: nil, + payment_schedule: nil, + transaction_type: nil + ); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(currency: String, mandate_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(currency: nil, mandate_options: nil, verification_method: nil); end + end + class AmazonPay < Stripe::RequestParams + + end + class BacsDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'DDIC' or 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # Currency in which future payments will be charged. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + # End date of the mandate or subscription. If not provided, the mandate will be active until canceled. If provided, end date should be after start date. + sig { returns(Integer) } + attr_accessor :end_date + # Specifies payment frequency. One of `day`, `week`, `month`, `year`, or `sporadic`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between payments. For example, `interval=month` and `interval_count=3` indicates one payment every three months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). This parameter is optional when `interval=sporadic`. + sig { returns(Integer) } + attr_accessor :interval_count + # Unique identifier for the mandate or subscription. + sig { returns(String) } + attr_accessor :reference + # Start date of the mandate or subscription. Start date should not be lesser than yesterday. + sig { returns(Integer) } + attr_accessor :start_date + # Specifies the type of mandates supported. Possible values are `india`. + sig { returns(T::Array[String]) } + attr_accessor :supported_types + sig { + params(amount: Integer, amount_type: String, currency: String, description: String, end_date: Integer, interval: String, interval_count: Integer, reference: String, start_date: Integer, supported_types: T::Array[String]).void + } + def initialize( + amount: nil, + amount_type: nil, + currency: nil, + description: nil, + end_date: nil, + interval: nil, + interval_count: nil, + reference: nil, + start_date: nil, + supported_types: nil + ); end + end + class ThreeDSecure < Stripe::RequestParams + class NetworkOptions < Stripe::RequestParams + class CartesBancaires < Stripe::RequestParams + # The cryptogram calculation algorithm used by the card Issuer's ACS + # to calculate the Authentication cryptogram. Also known as `cavvAlgorithm`. + # messageExtension: CB-AVALGO + sig { returns(String) } + attr_accessor :cb_avalgo + # The exemption indicator returned from Cartes Bancaires in the ARes. + # message extension: CB-EXEMPTION; string (4 characters) + # This is a 3 byte bitmap (low significant byte first and most significant + # bit first) that has been Base64 encoded + sig { returns(String) } + attr_accessor :cb_exemption + # The risk score returned from Cartes Bancaires in the ARes. + # message extension: CB-SCORE; numeric value 0-99 + sig { returns(Integer) } + attr_accessor :cb_score + sig { params(cb_avalgo: String, cb_exemption: String, cb_score: Integer).void } + def initialize(cb_avalgo: nil, cb_exemption: nil, cb_score: nil); end + end + # Cartes Bancaires-specific 3DS fields. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires) + } + attr_accessor :cartes_bancaires + sig { + params(cartes_bancaires: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions::CartesBancaires).void + } + def initialize(cartes_bancaires: nil); end + end + # The `transStatus` returned from the card Issuer’s ACS in the ARes. + sig { returns(String) } + attr_accessor :ares_trans_status + # The cryptogram, also known as the "authentication value" (AAV, CAVV or + # AEVV). This value is 20 bytes, base64-encoded into a 28-character string. + # (Most 3D Secure providers will return the base64-encoded version, which + # is what you should specify here.) + sig { returns(String) } + attr_accessor :cryptogram + # The Electronic Commerce Indicator (ECI) is returned by your 3D Secure + # provider and indicates what degree of authentication was performed. + sig { returns(String) } + attr_accessor :electronic_commerce_indicator + # Network specific 3DS fields. Network specific arguments require an + # explicit card brand choice. The parameter `payment_method_options.card.network`` + # must be populated accordingly + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions) + } + attr_accessor :network_options + # The challenge indicator (`threeDSRequestorChallengeInd`) which was requested in the + # AReq sent to the card Issuer's ACS. A string containing 2 digits from 01-99. + sig { returns(String) } + attr_accessor :requestor_challenge_indicator + # For 3D Secure 1, the XID. For 3D Secure 2, the Directory Server + # Transaction ID (dsTransID). + sig { returns(String) } + attr_accessor :transaction_id + # The version of 3D Secure that was performed. + sig { returns(String) } + attr_accessor :version + sig { + params(ares_trans_status: String, cryptogram: String, electronic_commerce_indicator: String, network_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure::NetworkOptions, requestor_challenge_indicator: String, transaction_id: String, version: String).void + } + def initialize( + ares_trans_status: nil, + cryptogram: nil, + electronic_commerce_indicator: nil, + network_options: nil, + requestor_challenge_indicator: nil, + transaction_id: nil, + version: nil + ); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # When specified, this parameter signals that a card has been collected + # as MOTO (Mail Order Telephone Order) and thus out of scope for SCA. This + # parameter can only be provided during confirmation. + sig { returns(T::Boolean) } + attr_accessor :moto + # Selected network to process this SetupIntent on. Depends on the available networks of the card attached to the SetupIntent. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. If not provided, this value defaults to `automatic`. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + # If 3D Secure authentication was performed with a third-party provider, + # the authentication details to use for this setup. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(mandate_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::MandateOptions, moto: T::Boolean, network: String, request_three_d_secure: String, three_d_secure: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card::ThreeDSecure).void + } + def initialize( + mandate_options: nil, + moto: nil, + network: nil, + request_three_d_secure: nil, + three_d_secure: nil + ); end + end + class CardPresent < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + # [Deprecated] This is a legacy parameter that no longer has any function. + sig { returns(String) } + attr_accessor :persistent_token + sig { params(persistent_token: String).void } + def initialize(persistent_token: nil); end + end + class Paypal < Stripe::RequestParams + # The PayPal Billing Agreement ID (BAID). This is an ID generated by PayPal which represents the mandate between the merchant and the customer. + sig { returns(String) } + attr_accessor :billing_agreement_id + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # The Stripe connected account IDs of the sellers on the platform for this transaction (optional). Only allowed when [separate charges and transfers](https://stripe.com/docs/connect/separate-charges-and-transfers) are used. + sig { returns(T::Array[String]) } + attr_accessor :subsellers + sig { + params(billing_agreement_id: String, currency: String, subsellers: T::Array[String]).void + } + def initialize(billing_agreement_id: nil, currency: nil, subsellers: nil); end + end + class Payto < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount that will be collected. It is required when `amount_type` is `fixed`. + sig { returns(Integer) } + attr_accessor :amount + # The type of amount that will be collected. The amount charged must be exact or up to the value of `amount` param for `fixed` or `maximum` type respectively. + sig { returns(String) } + attr_accessor :amount_type + # Date, in YYYY-MM-DD format, after which payments will not be collected. Defaults to no end date. + sig { returns(String) } + attr_accessor :end_date + # The periodicity at which payments will be collected. + sig { returns(String) } + attr_accessor :payment_schedule + # The number of payments that will be made during a payment period. Defaults to 1 except for when `payment_schedule` is `adhoc`. In that case, it defaults to no limit. + sig { returns(Integer) } + attr_accessor :payments_per_period + # The purpose for which payments are made. Defaults to retail. + sig { returns(String) } + attr_accessor :purpose + # Date, in YYYY-MM-DD format, from which payments will be collected. Defaults to confirmation time. + sig { returns(String) } + attr_accessor :start_date + sig { + params(amount: Integer, amount_type: String, end_date: String, payment_schedule: String, payments_per_period: Integer, purpose: String, start_date: String).void + } + def initialize( + amount: nil, + amount_type: nil, + end_date: nil, + payment_schedule: nil, + payments_per_period: nil, + purpose: nil, + start_date: nil + ); end + end + # Additional fields for Mandate creation. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Payto::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class SepaDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Prefix used to generate the Mandate reference. Must be at most 12 characters long. Must consist of only uppercase letters, numbers, spaces, or the following special characters: '/', '_', '-', '&', '.'. Cannot begin with 'STRIPE'. + sig { returns(T.nilable(String)) } + attr_accessor :reference_prefix + sig { params(reference_prefix: T.nilable(String)).void } + def initialize(reference_prefix: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions) + } + attr_accessor :mandate_options + sig { + params(mandate_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit::MandateOptions).void + } + def initialize(mandate_options: nil); end + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + class ManualEntry < Stripe::RequestParams + # Settings for configuring manual entry of account details. + sig { returns(String) } + attr_accessor :mode + sig { params(mode: String).void } + def initialize(mode: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # Customize manual entry behavior + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry) + } + attr_accessor :manual_entry + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + # For webview integrations only. Upon completing OAuth login in the native browser, the user will be redirected to this URL to return to your app. + sig { returns(String) } + attr_accessor :return_url + sig { + params(filters: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, manual_entry: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections::ManualEntry, permissions: T::Array[String], prefetch: T::Array[String], return_url: String).void + } + def initialize( + filters: nil, + manual_entry: nil, + permissions: nil, + prefetch: nil, + return_url: nil + ); end + end + class MandateOptions < Stripe::RequestParams + # The method used to collect offline mandate customer acceptance. + sig { returns(T.nilable(String)) } + attr_accessor :collection_method + sig { params(collection_method: T.nilable(String)).void } + def initialize(collection_method: nil); end + end + class Networks < Stripe::RequestParams + # Triggers validations to run across the selected networks + sig { returns(T::Array[String]) } + attr_accessor :requested + sig { params(requested: T::Array[String]).void } + def initialize(requested: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Additional fields for Mandate creation + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions) + } + attr_accessor :mandate_options + # Additional fields for network related functions + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks) + } + attr_accessor :networks + # Bank account verification method. + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::FinancialConnections, mandate_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::MandateOptions, networks: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount::Networks, verification_method: String).void + } + def initialize( + financial_connections: nil, + mandate_options: nil, + networks: nil, + verification_method: nil + ); end + end + # If this is a `acss_debit` SetupIntent, this sub-hash contains details about the ACSS Debit payment method options. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit) + } + attr_accessor :acss_debit + # If this is a `amazon_pay` SetupIntent, this sub-hash contains details about the AmazonPay payment method options. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay) + } + attr_accessor :amazon_pay + # If this is a `bacs_debit` SetupIntent, this sub-hash contains details about the Bacs Debit payment method options. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit) + } + attr_accessor :bacs_debit + # Configuration for any card setup attempted on this SetupIntent. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card) } + attr_accessor :card + # If this is a `card_present` PaymentMethod, this sub-hash contains details about the card-present payment method options. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent) + } + attr_accessor :card_present + # If this is a `link` PaymentMethod, this sub-hash contains details about the Link payment method options. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link) } + attr_accessor :link + # If this is a `paypal` PaymentMethod, this sub-hash contains details about the PayPal payment method options. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Paypal) } + attr_accessor :paypal + # If this is a `payto` SetupIntent, this sub-hash contains details about the PayTo payment method options. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Payto) } + attr_accessor :payto + # If this is a `sepa_debit` SetupIntent, this sub-hash contains details about the SEPA Debit payment method options. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit) + } + attr_accessor :sepa_debit + # If this is a `us_bank_account` SetupIntent, this sub-hash contains details about the US bank account payment method options. + sig { + returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AcssDebit, amazon_pay: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::AmazonPay, bacs_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::BacsDebit, card: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Card, card_present: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::CardPresent, link: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Link, paypal: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Paypal, payto: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::Payto, sepa_debit: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::SepaDebit, us_bank_account: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions::UsBankAccount).void + } + def initialize( + acss_debit: nil, + amazon_pay: nil, + bacs_debit: nil, + card: nil, + card_present: nil, + link: nil, + paypal: nil, + payto: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # ID of the ConfirmationToken used to confirm this SetupIntent. + # + # If the provided ConfirmationToken contains properties that are also being provided in this request, such as `payment_method`, then the values in this request will take precedence. + sig { returns(String) } + attr_accessor :confirmation_token + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Attribute for param field mandate_data + sig { returns(T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData)) } + attr_accessor :mandate_data + # ID of the payment method (a PaymentMethod, Card, or saved Source object) to attach to this SetupIntent. + sig { returns(String) } + attr_accessor :payment_method + # When included, this hash creates a PaymentMethod that is set as the [`payment_method`](https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method) + # value in the SetupIntent. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData) } + attr_accessor :payment_method_data + # Payment method-specific configuration for this SetupIntent. + sig { returns(::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions) } + attr_accessor :payment_method_options + # The URL to redirect your customer back to after they authenticate on the payment method's app or site. + # If you'd prefer to redirect to a mobile application, you can alternatively supply an application URI scheme. + # This parameter is only used for cards and other redirect-based payment methods. + sig { returns(String) } + attr_accessor :return_url + # Set to `true` when confirming server-side and using Stripe.js, iOS, or Android client-side SDKs to handle the next actions. + sig { returns(T::Boolean) } + attr_accessor :use_stripe_sdk + sig { + params(confirmation_token: String, expand: T::Array[String], mandate_data: T.nilable(::Stripe::SetupIntentService::ConfirmParams::MandateData), payment_method: String, payment_method_data: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodData, payment_method_options: ::Stripe::SetupIntentService::ConfirmParams::PaymentMethodOptions, return_url: String, use_stripe_sdk: T::Boolean).void + } + def initialize( + confirmation_token: nil, + expand: nil, + mandate_data: nil, + payment_method: nil, + payment_method_data: nil, + payment_method_options: nil, + return_url: nil, + use_stripe_sdk: nil + ); end + end + class VerifyMicrodepositsParams < Stripe::RequestParams + # Two positive integers, in *cents*, equal to the values of the microdeposits sent to the bank account. + sig { returns(T::Array[Integer]) } + attr_accessor :amounts + # A six-character code starting with SM present in the microdeposit sent to the bank account. + sig { returns(String) } + attr_accessor :descriptor_code + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { + params(amounts: T::Array[Integer], descriptor_code: String, expand: T::Array[String]).void + } + def initialize(amounts: nil, descriptor_code: nil, expand: nil); end + end + # You can cancel a SetupIntent object when it's in one of these statuses: requires_payment_method, requires_confirmation, or requires_action. + # + # After you cancel it, setup is abandoned and any operations on the SetupIntent fail with an error. You can't cancel the SetupIntent for a Checkout Session. [Expire the Checkout Session](https://stripe.com/docs/api/checkout/sessions/expire) instead. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def cancel(intent, params = {}, opts = {}); end + + # Confirm that your customer intends to set up the current or + # provided payment method. For example, you would confirm a SetupIntent + # when a customer hits the “Save” button on a payment method management + # page on your website. + # + # If the selected payment method does not require any additional + # steps from the customer, the SetupIntent will transition to the + # succeeded status. + # + # Otherwise, it will transition to the requires_action status and + # suggest additional actions via next_action. If setup fails, + # the SetupIntent will transition to the + # requires_payment_method status or the canceled status if the + # confirmation limit is reached. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntentService::ConfirmParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def confirm(intent, params = {}, opts = {}); end + + # Creates a SetupIntent object. + # + # After you create the SetupIntent, attach a payment method and [confirm](https://stripe.com/docs/api/setup_intents/confirm) + # it to collect any required permissions to charge the payment method later. + sig { + params(params: T.any(::Stripe::SetupIntentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def create(params = {}, opts = {}); end + + # Returns a list of SetupIntents. + sig { + params(params: T.any(::Stripe::SetupIntentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a SetupIntent that has previously been created. + # + # Client-side retrieval using a publishable key is allowed when the client_secret is provided in the query string. + # + # When retrieved with a publishable key, only a subset of properties will be returned. Please refer to the [SetupIntent](https://stripe.com/docs/api#setup_intent_object) object reference for more details. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def retrieve(intent, params = {}, opts = {}); end + + # Updates a SetupIntent object. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntentService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def update(intent, params = {}, opts = {}); end + + # Verifies microdeposits on a SetupIntent object. + sig { + params(intent: String, params: T.any(::Stripe::SetupIntentService::VerifyMicrodepositsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SetupIntent) + } + def verify_microdeposits(intent, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/shipping_rate_service.rbi b/rbi/stripe/services/shipping_rate_service.rbi new file mode 100644 index 000000000..baa73fbce --- /dev/null +++ b/rbi/stripe/services/shipping_rate_service.rbi @@ -0,0 +1,235 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class ShippingRateService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return shipping rates that are active or inactive. + sig { returns(T::Boolean) } + attr_accessor :active + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::ShippingRateService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return shipping rates for the given currency. + sig { returns(String) } + attr_accessor :currency + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, created: T.any(::Stripe::ShippingRateService::ListParams::Created, Integer), currency: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + created: nil, + currency: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DeliveryEstimate < Stripe::RequestParams + class Maximum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + class Minimum < Stripe::RequestParams + # A unit of time. + sig { returns(String) } + attr_accessor :unit + # Must be greater than 0. + sig { returns(Integer) } + attr_accessor :value + sig { params(unit: String, value: Integer).void } + def initialize(unit: nil, value: nil); end + end + # The upper bound of the estimated range. If empty, represents no upper bound i.e., infinite. + sig { returns(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Maximum) } + attr_accessor :maximum + # The lower bound of the estimated range. If empty, represents no lower bound. + sig { returns(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Minimum) } + attr_accessor :minimum + sig { + params(maximum: ::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Maximum, minimum: ::Stripe::ShippingRateService::CreateParams::DeliveryEstimate::Minimum).void + } + def initialize(maximum: nil, minimum: nil); end + end + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::ShippingRateService::CreateParams::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(amount: Integer, currency: String, currency_options: T::Hash[String, ::Stripe::ShippingRateService::CreateParams::FixedAmount::CurrencyOptions]).void + } + def initialize(amount: nil, currency: nil, currency_options: nil); end + end + # The estimated range for how long shipping will take, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(::Stripe::ShippingRateService::CreateParams::DeliveryEstimate) } + attr_accessor :delivery_estimate + # The name of the shipping rate, meant to be displayable to the customer. This will appear on CheckoutSessions. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { returns(::Stripe::ShippingRateService::CreateParams::FixedAmount) } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. The Shipping tax code is `txcd_92010001`. + sig { returns(String) } + attr_accessor :tax_code + # The type of calculation to use on the shipping rate. + sig { returns(String) } + attr_accessor :type + sig { + params(delivery_estimate: ::Stripe::ShippingRateService::CreateParams::DeliveryEstimate, display_name: String, expand: T::Array[String], fixed_amount: ::Stripe::ShippingRateService::CreateParams::FixedAmount, metadata: T::Hash[String, String], tax_behavior: String, tax_code: String, type: String).void + } + def initialize( + delivery_estimate: nil, + display_name: nil, + expand: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil, + tax_code: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class FixedAmount < Stripe::RequestParams + class CurrencyOptions < Stripe::RequestParams + # A non-negative integer in cents representing how much to charge. + sig { returns(Integer) } + attr_accessor :amount + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { params(amount: Integer, tax_behavior: String).void } + def initialize(amount: nil, tax_behavior: nil); end + end + # Shipping rates defined in each available currency option. Each key must be a three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html) and a [supported currency](https://stripe.com/docs/currencies). + sig { + returns(T::Hash[String, ::Stripe::ShippingRateService::UpdateParams::FixedAmount::CurrencyOptions]) + } + attr_accessor :currency_options + sig { + params(currency_options: T::Hash[String, ::Stripe::ShippingRateService::UpdateParams::FixedAmount::CurrencyOptions]).void + } + def initialize(currency_options: nil); end + end + # Whether the shipping rate can be used for new purchases. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :active + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Describes a fixed amount to charge for shipping. Must be present if type is `fixed_amount`. + sig { returns(::Stripe::ShippingRateService::UpdateParams::FixedAmount) } + attr_accessor :fixed_amount + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Specifies whether the rate is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. + sig { returns(String) } + attr_accessor :tax_behavior + sig { + params(active: T::Boolean, expand: T::Array[String], fixed_amount: ::Stripe::ShippingRateService::UpdateParams::FixedAmount, metadata: T.nilable(T::Hash[String, String]), tax_behavior: String).void + } + def initialize( + active: nil, + expand: nil, + fixed_amount: nil, + metadata: nil, + tax_behavior: nil + ); end + end + # Creates a new shipping rate object. + sig { + params(params: T.any(::Stripe::ShippingRateService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate) + } + def create(params = {}, opts = {}); end + + # Returns a list of your shipping rates. + sig { + params(params: T.any(::Stripe::ShippingRateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Returns the shipping rate object with the given ID. + sig { + params(shipping_rate_token: String, params: T.any(::Stripe::ShippingRateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate) + } + def retrieve(shipping_rate_token, params = {}, opts = {}); end + + # Updates an existing shipping rate object. + sig { + params(shipping_rate_token: String, params: T.any(::Stripe::ShippingRateService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ShippingRate) + } + def update(shipping_rate_token, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/sigma/scheduled_query_run_service.rbi b/rbi/stripe/services/sigma/scheduled_query_run_service.rbi new file mode 100644 index 000000000..76e359e96 --- /dev/null +++ b/rbi/stripe/services/sigma/scheduled_query_run_service.rbi @@ -0,0 +1,46 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Sigma + class ScheduledQueryRunService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of scheduled query runs. + sig { + params(params: T.any(::Stripe::Sigma::ScheduledQueryRunService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an scheduled query run. + sig { + params(scheduled_query_run: String, params: T.any(::Stripe::Sigma::ScheduledQueryRunService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Sigma::ScheduledQueryRun) + } + def retrieve(scheduled_query_run, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/sigma_service.rbi b/rbi/stripe/services/sigma_service.rbi new file mode 100644 index 000000000..f95d00d8a --- /dev/null +++ b/rbi/stripe/services/sigma_service.rbi @@ -0,0 +1,9 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SigmaService < StripeService + attr_reader :scheduled_query_runs + end +end \ No newline at end of file diff --git a/rbi/stripe/services/source_service.rbi b/rbi/stripe/services/source_service.rbi new file mode 100644 index 000000000..207736885 --- /dev/null +++ b/rbi/stripe/services/source_service.rbi @@ -0,0 +1,647 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SourceService < StripeService + attr_reader :transactions + class DetachParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RetrieveParams < Stripe::RequestParams + # The client secret of the source. Required if a publishable key is used to retrieve the source. + sig { returns(String) } + attr_accessor :client_secret + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(client_secret: String, expand: T::Array[String]).void } + def initialize(client_secret: nil, expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + sig { returns(String) } + attr_accessor :contact_email + sig { params(contact_email: String).void } + def initialize(contact_email: nil); end + end + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + sig { returns(::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Offline) } + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + sig { returns(::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Online) } + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + sig { returns(String) } + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + sig { returns(String) } + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, offline: ::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Offline, online: ::Stripe::SourceService::UpdateParams::Mandate::Acceptance::Online, status: String, type: String, user_agent: String).void + } + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ); end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + sig { returns(::Stripe::SourceService::UpdateParams::Mandate::Acceptance) } + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + sig { returns(String) } + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + sig { returns(String) } + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + sig { returns(String) } + attr_accessor :notification_method + sig { + params(acceptance: ::Stripe::SourceService::UpdateParams::Mandate::Acceptance, amount: T.nilable(Integer), currency: String, interval: String, notification_method: String).void + } + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ); end + end + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Owner's address. + sig { returns(::Stripe::SourceService::UpdateParams::Owner::Address) } + attr_accessor :address + # Owner's email address. + sig { returns(String) } + attr_accessor :email + # Owner's full name. + sig { returns(String) } + attr_accessor :name + # Owner's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::SourceService::UpdateParams::Owner::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # The ID of the SKU being ordered. + sig { returns(String) } + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + sig { returns(Integer) } + attr_accessor :quantity + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { + params(amount: Integer, currency: String, description: String, parent: String, quantity: Integer, type: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::SourceService::UpdateParams::SourceOrder::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::SourceService::UpdateParams::SourceOrder::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize( + address: nil, + carrier: nil, + name: nil, + phone: nil, + tracking_number: nil + ); end + end + # List of items constituting the order. + sig { returns(T::Array[::Stripe::SourceService::UpdateParams::SourceOrder::Item]) } + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + sig { returns(::Stripe::SourceService::UpdateParams::SourceOrder::Shipping) } + attr_accessor :shipping + sig { + params(items: T::Array[::Stripe::SourceService::UpdateParams::SourceOrder::Item], shipping: ::Stripe::SourceService::UpdateParams::SourceOrder::Shipping).void + } + def initialize(items: nil, shipping: nil); end + end + # Amount associated with the source. + sig { returns(Integer) } + attr_accessor :amount + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + sig { returns(::Stripe::SourceService::UpdateParams::Mandate) } + attr_accessor :mandate + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Information about the owner of the payment instrument that may be used or required by particular source types. + sig { returns(::Stripe::SourceService::UpdateParams::Owner) } + attr_accessor :owner + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + sig { returns(::Stripe::SourceService::UpdateParams::SourceOrder) } + attr_accessor :source_order + sig { + params(amount: Integer, expand: T::Array[String], mandate: ::Stripe::SourceService::UpdateParams::Mandate, metadata: T.nilable(T::Hash[String, String]), owner: ::Stripe::SourceService::UpdateParams::Owner, source_order: ::Stripe::SourceService::UpdateParams::SourceOrder).void + } + def initialize( + amount: nil, + expand: nil, + mandate: nil, + metadata: nil, + owner: nil, + source_order: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Mandate < Stripe::RequestParams + class Acceptance < Stripe::RequestParams + class Offline < Stripe::RequestParams + # An email to contact you with if a copy of the mandate is requested, required if `type` is `offline`. + sig { returns(String) } + attr_accessor :contact_email + sig { params(contact_email: String).void } + def initialize(contact_email: nil); end + end + class Online < Stripe::RequestParams + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # The Unix timestamp (in seconds) when the mandate was accepted or refused by the customer. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :ip + # The parameters required to store a mandate accepted offline. Should only be set if `mandate[type]` is `offline` + sig { returns(::Stripe::SourceService::CreateParams::Mandate::Acceptance::Offline) } + attr_accessor :offline + # The parameters required to store a mandate accepted online. Should only be set if `mandate[type]` is `online` + sig { returns(::Stripe::SourceService::CreateParams::Mandate::Acceptance::Online) } + attr_accessor :online + # The status of the mandate acceptance. Either `accepted` (the mandate was accepted) or `refused` (the mandate was refused). + sig { returns(String) } + attr_accessor :status + # The type of acceptance information included with the mandate. Either `online` or `offline` + sig { returns(String) } + attr_accessor :type + # The user agent of the browser from which the mandate was accepted or refused by the customer. + sig { returns(String) } + attr_accessor :user_agent + sig { + params(date: Integer, ip: String, offline: ::Stripe::SourceService::CreateParams::Mandate::Acceptance::Offline, online: ::Stripe::SourceService::CreateParams::Mandate::Acceptance::Online, status: String, type: String, user_agent: String).void + } + def initialize( + date: nil, + ip: nil, + offline: nil, + online: nil, + status: nil, + type: nil, + user_agent: nil + ); end + end + # The parameters required to notify Stripe of a mandate acceptance or refusal by the customer. + sig { returns(::Stripe::SourceService::CreateParams::Mandate::Acceptance) } + attr_accessor :acceptance + # The amount specified by the mandate. (Leave null for a mandate covering all amounts) + sig { returns(T.nilable(Integer)) } + attr_accessor :amount + # The currency specified by the mandate. (Must match `currency` of the source) + sig { returns(String) } + attr_accessor :currency + # The interval of debits permitted by the mandate. Either `one_time` (just permitting a single debit), `scheduled` (with debits on an agreed schedule or for clearly-defined events), or `variable`(for debits with any frequency) + sig { returns(String) } + attr_accessor :interval + # The method Stripe should use to notify the customer of upcoming debit instructions and/or mandate confirmation as required by the underlying debit network. Either `email` (an email is sent directly to the customer), `manual` (a `source.mandate_notification` event is sent to your webhooks endpoint and you should handle the notification) or `none` (the underlying debit network does not require any notification). + sig { returns(String) } + attr_accessor :notification_method + sig { + params(acceptance: ::Stripe::SourceService::CreateParams::Mandate::Acceptance, amount: T.nilable(Integer), currency: String, interval: String, notification_method: String).void + } + def initialize( + acceptance: nil, + amount: nil, + currency: nil, + interval: nil, + notification_method: nil + ); end + end + class Owner < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Owner's address. + sig { returns(::Stripe::SourceService::CreateParams::Owner::Address) } + attr_accessor :address + # Owner's email address. + sig { returns(String) } + attr_accessor :email + # Owner's full name. + sig { returns(String) } + attr_accessor :name + # Owner's phone number. + sig { returns(String) } + attr_accessor :phone + sig { + params(address: ::Stripe::SourceService::CreateParams::Owner::Address, email: String, name: String, phone: String).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Receiver < Stripe::RequestParams + # The method Stripe should use to request information needed to process a refund or mispayment. Either `email` (an email is sent directly to the customer) or `manual` (a `source.refund_attributes_required` event is sent to your webhooks endpoint). Refer to each payment method's documentation to learn which refund attributes may be required. + sig { returns(String) } + attr_accessor :refund_attributes_method + sig { params(refund_attributes_method: String).void } + def initialize(refund_attributes_method: nil); end + end + class Redirect < Stripe::RequestParams + # The URL you provide to redirect the customer back to you after they authenticated their payment. It can use your application URI scheme in the context of a mobile application. + sig { returns(String) } + attr_accessor :return_url + sig { params(return_url: String).void } + def initialize(return_url: nil); end + end + class SourceOrder < Stripe::RequestParams + class Item < Stripe::RequestParams + # Attribute for param field amount + sig { returns(Integer) } + attr_accessor :amount + # Attribute for param field currency + sig { returns(String) } + attr_accessor :currency + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # The ID of the SKU being ordered. + sig { returns(String) } + attr_accessor :parent + # The quantity of this order item. When type is `sku`, this is the number of instances of the SKU to be ordered. + sig { returns(Integer) } + attr_accessor :quantity + # Attribute for param field type + sig { returns(String) } + attr_accessor :type + sig { + params(amount: Integer, currency: String, description: String, parent: String, quantity: Integer, type: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + parent: nil, + quantity: nil, + type: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address. + sig { returns(::Stripe::SourceService::CreateParams::SourceOrder::Shipping::Address) } + attr_accessor :address + # The delivery service that shipped a physical product, such as Fedex, UPS, USPS, etc. + sig { returns(String) } + attr_accessor :carrier + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension). + sig { returns(String) } + attr_accessor :phone + # The tracking number for a physical product, obtained from the delivery service. If multiple tracking numbers were generated for this purchase, please separate them with commas. + sig { returns(String) } + attr_accessor :tracking_number + sig { + params(address: ::Stripe::SourceService::CreateParams::SourceOrder::Shipping::Address, carrier: String, name: String, phone: String, tracking_number: String).void + } + def initialize( + address: nil, + carrier: nil, + name: nil, + phone: nil, + tracking_number: nil + ); end + end + # List of items constituting the order. + sig { returns(T::Array[::Stripe::SourceService::CreateParams::SourceOrder::Item]) } + attr_accessor :items + # Shipping address for the order. Required if any of the SKUs are for products that have `shippable` set to true. + sig { returns(::Stripe::SourceService::CreateParams::SourceOrder::Shipping) } + attr_accessor :shipping + sig { + params(items: T::Array[::Stripe::SourceService::CreateParams::SourceOrder::Item], shipping: ::Stripe::SourceService::CreateParams::SourceOrder::Shipping).void + } + def initialize(items: nil, shipping: nil); end + end + # Amount associated with the source. This is the amount for which the source will be chargeable once ready. Required for `single_use` sources. Not supported for `receiver` type sources, where charge amount may not be specified until funds land. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO code for the currency](https://stripe.com/docs/currencies) associated with the source. This is the currency for which the source will be chargeable once ready. + sig { returns(String) } + attr_accessor :currency + # The `Customer` to whom the original source is attached to. Must be set when the original source is not a `Source` (e.g., `Card`). + sig { returns(String) } + attr_accessor :customer + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The authentication `flow` of the source to create. `flow` is one of `redirect`, `receiver`, `code_verification`, `none`. It is generally inferred unless a type supports multiple flows. + sig { returns(String) } + attr_accessor :flow + # Information about a mandate possibility attached to a source object (generally for bank debits) as well as its acceptance status. + sig { returns(::Stripe::SourceService::CreateParams::Mandate) } + attr_accessor :mandate + # Attribute for param field metadata + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The source to share. + sig { returns(String) } + attr_accessor :original_source + # Information about the owner of the payment instrument that may be used or required by particular source types. + sig { returns(::Stripe::SourceService::CreateParams::Owner) } + attr_accessor :owner + # Optional parameters for the receiver flow. Can be set only if the source is a receiver (`flow` is `receiver`). + sig { returns(::Stripe::SourceService::CreateParams::Receiver) } + attr_accessor :receiver + # Parameters required for the redirect flow. Required if the source is authenticated by a redirect (`flow` is `redirect`). + sig { returns(::Stripe::SourceService::CreateParams::Redirect) } + attr_accessor :redirect + # Information about the items and shipping associated with the source. Required for transactional credit (for example Klarna) sources before you can charge it. + sig { returns(::Stripe::SourceService::CreateParams::SourceOrder) } + attr_accessor :source_order + # An arbitrary string to be displayed on your customer's statement. As an example, if your website is `RunClub` and the item you're charging for is a race ticket, you may want to specify a `statement_descriptor` of `RunClub 5K race ticket.` While many payment types will display this information, some may not display it at all. + sig { returns(String) } + attr_accessor :statement_descriptor + # An optional token used to create the source. When passed, token properties will override source parameters. + sig { returns(String) } + attr_accessor :token + # The `type` of the source to create. Required unless `customer` and `original_source` are specified (see the [Cloning card Sources](https://stripe.com/docs/sources/connect#cloning-card-sources) guide) + sig { returns(String) } + attr_accessor :type + # Attribute for param field usage + sig { returns(String) } + attr_accessor :usage + sig { + params(amount: Integer, currency: String, customer: String, expand: T::Array[String], flow: String, mandate: ::Stripe::SourceService::CreateParams::Mandate, metadata: T::Hash[String, String], original_source: String, owner: ::Stripe::SourceService::CreateParams::Owner, receiver: ::Stripe::SourceService::CreateParams::Receiver, redirect: ::Stripe::SourceService::CreateParams::Redirect, source_order: ::Stripe::SourceService::CreateParams::SourceOrder, statement_descriptor: String, token: String, type: String, usage: String).void + } + def initialize( + amount: nil, + currency: nil, + customer: nil, + expand: nil, + flow: nil, + mandate: nil, + metadata: nil, + original_source: nil, + owner: nil, + receiver: nil, + redirect: nil, + source_order: nil, + statement_descriptor: nil, + token: nil, + type: nil, + usage: nil + ); end + end + class VerifyParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The values needed to verify the source. + sig { returns(T::Array[String]) } + attr_accessor :values + sig { params(expand: T::Array[String], values: T::Array[String]).void } + def initialize(expand: nil, values: nil); end + end + # Creates a new source object. + sig { + params(params: T.any(::Stripe::SourceService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def create(params = {}, opts = {}); end + + # Delete a specified source for a given customer. + sig { + params(customer: String, id: String, params: T.any(::Stripe::SourceService::DetachParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(T.any(Stripe::Account, Stripe::BankAccount, Stripe::Card, Stripe::Source)) + } + def detach(customer, id, params = {}, opts = {}); end + + # Retrieves an existing source object. Supply the unique source ID from a source creation request and Stripe will return the corresponding up-to-date source object information. + sig { + params(source: String, params: T.any(::Stripe::SourceService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def retrieve(source, params = {}, opts = {}); end + + # Updates the specified source by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + # + # This request accepts the metadata and owner as arguments. It is also possible to update type specific information for selected payment methods. Please refer to our [payment method guides](https://stripe.com/docs/sources) for more detail. + sig { + params(source: String, params: T.any(::Stripe::SourceService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def update(source, params = {}, opts = {}); end + + # Verify a given source. + sig { + params(source: String, params: T.any(::Stripe::SourceService::VerifyParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Source) + } + def verify(source, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/source_transaction_service.rbi b/rbi/stripe/services/source_transaction_service.rbi new file mode 100644 index 000000000..9de8e06a8 --- /dev/null +++ b/rbi/stripe/services/source_transaction_service.rbi @@ -0,0 +1,31 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SourceTransactionService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # List source transactions for a given source. + sig { + params(source: String, params: T.any(::Stripe::SourceTransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(source, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/subscription_item_service.rbi b/rbi/stripe/services/subscription_item_service.rbi new file mode 100644 index 000000000..5dd068f36 --- /dev/null +++ b/rbi/stripe/services/subscription_item_service.rbi @@ -0,0 +1,422 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SubscriptionItemService < StripeService + attr_reader :usage_records + attr_reader :usage_record_summaries + class DeleteParams < Stripe::RequestParams + # Delete all usage for the given subscription item. Allowed only when the current plan's `usage_type` is `metered`. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + sig { + params(clear_usage: T::Boolean, proration_behavior: String, proration_date: Integer).void + } + def initialize(clear_usage: nil, proration_behavior: nil, proration_date: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionItemService::UpdateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionItemService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionItemService::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionItemService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::SubscriptionItemService::UpdateParams::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemService::UpdateParams::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::SubscriptionItemService::UpdateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionItemService::UpdateParams::Discount])) + } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + sig { returns(String) } + attr_accessor :payment_behavior + # The identifier of the new plan for this subscription item. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::SubscriptionItemService::UpdateParams::PriceData) } + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionItemService::UpdateParams::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionItemService::UpdateParams::Discount]), expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, payment_behavior: String, plan: String, price: String, price_data: ::Stripe::SubscriptionItemService::UpdateParams::PriceData, proration_behavior: String, proration_date: Integer, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + off_session: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + tax_rates: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The ID of the subscription whose items will be retrieved. + sig { returns(String) } + attr_accessor :subscription + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, subscription: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + subscription: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionItemService::CreateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionItemService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionItemService::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionItemService::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::SubscriptionItemService::CreateParams::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionItemService::CreateParams::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::SubscriptionItemService::CreateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionItemService::CreateParams::Discount])) + } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + sig { returns(String) } + attr_accessor :payment_behavior + # The identifier of the plan to add to the subscription. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { returns(::Stripe::SubscriptionItemService::CreateParams::PriceData) } + attr_accessor :price_data + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply the same proration that was previewed with the [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + # The quantity you'd like to apply to the subscription item you're creating. + sig { returns(Integer) } + attr_accessor :quantity + # The identifier of the subscription to modify. + sig { returns(String) } + attr_accessor :subscription + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionItemService::CreateParams::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionItemService::CreateParams::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionItemService::CreateParams::Discount]), expand: T::Array[String], metadata: T::Hash[String, String], payment_behavior: String, plan: String, price: String, price_data: ::Stripe::SubscriptionItemService::CreateParams::PriceData, proration_behavior: String, proration_date: Integer, quantity: Integer, subscription: String, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionItemService::CreateParams::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + expand: nil, + metadata: nil, + payment_behavior: nil, + plan: nil, + price: nil, + price_data: nil, + proration_behavior: nil, + proration_date: nil, + quantity: nil, + subscription: nil, + tax_rates: nil, + trial: nil + ); end + end + # Adds a new item to an existing subscription. No existing items will be changed or replaced. + sig { + params(params: T.any(::Stripe::SubscriptionItemService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def create(params = {}, opts = {}); end + + # Deletes an item from the subscription. Removing a subscription item from a subscription will not cancel the subscription. + sig { + params(item: String, params: T.any(::Stripe::SubscriptionItemService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def delete(item, params = {}, opts = {}); end + + # Returns a list of your subscription items for a given subscription. + sig { + params(params: T.any(::Stripe::SubscriptionItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the subscription item with the given ID. + sig { + params(item: String, params: T.any(::Stripe::SubscriptionItemService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def retrieve(item, params = {}, opts = {}); end + + # Updates the plan or quantity of an item on a current subscription. + sig { + params(item: String, params: T.any(::Stripe::SubscriptionItemService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionItem) + } + def update(item, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/subscription_item_usage_record_service.rbi b/rbi/stripe/services/subscription_item_usage_record_service.rbi new file mode 100644 index 000000000..b21c84d9d --- /dev/null +++ b/rbi/stripe/services/subscription_item_usage_record_service.rbi @@ -0,0 +1,37 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SubscriptionItemUsageRecordService < StripeService + class CreateParams < Stripe::RequestParams + # Valid values are `increment` (default) or `set`. When using `increment` the specified `quantity` will be added to the usage at the specified timestamp. The `set` action will overwrite the usage quantity at that timestamp. If the subscription has [billing thresholds](https://stripe.com/docs/api/subscriptions/object#subscription_object-billing_thresholds), `increment` is the only allowed value. + sig { returns(String) } + attr_accessor :action + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The usage quantity for the specified timestamp. + sig { returns(Integer) } + attr_accessor :quantity + # The timestamp for the usage event. This timestamp must be within the current billing period of the subscription of the provided `subscription_item`, and must not be in the future. When passing `"now"`, Stripe records usage for the current time. Default is `"now"` if a value is not provided. + sig { returns(T.any(String, Integer)) } + attr_accessor :timestamp + sig { + params(action: String, expand: T::Array[String], quantity: Integer, timestamp: T.any(String, Integer)).void + } + def initialize(action: nil, expand: nil, quantity: nil, timestamp: nil); end + end + # Creates a usage record for a specified subscription item and date, and fills it with a quantity. + # + # Usage records provide quantity information that Stripe uses to track how much a customer is using your service. With usage information and the pricing model set up by the [metered billing](https://stripe.com/docs/billing/subscriptions/metered-billing) plan, Stripe helps you send accurate invoices to your customers. + # + # The default calculation for usage is to add up all the quantity values of the usage records within a billing period. You can change this default behavior with the billing plan's aggregate_usage [parameter](https://stripe.com/docs/api/plans/create#create_plan-aggregate_usage). When there is more than one usage record with the same timestamp, Stripe adds the quantity values together. In most cases, this is the desired resolution, however, you can change this behavior with the action parameter. + # + # The default pricing model for metered billing is [per-unit pricing. For finer granularity, you can configure metered billing to have a
tiered pricing](https://stripe.com/docs/api/plans/object#plan_object-billing_scheme) model. + sig { + params(subscription_item: String, params: T.any(::Stripe::SubscriptionItemUsageRecordService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::UsageRecord) + } + def create(subscription_item, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi b/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi new file mode 100644 index 000000000..b8a286ca5 --- /dev/null +++ b/rbi/stripe/services/subscription_item_usage_record_summary_service.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SubscriptionItemUsageRecordSummaryService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # For the specified subscription item, returns a list of summary objects. Each object in the list provides usage information that's been summarized from multiple usage records and over a subscription billing period (e.g., 15 usage records in the month of September). + # + # The list is sorted in reverse-chronological order (newest first). The first list item represents the most current usage period that hasn't ended yet. Since new usage records can still be added, the returned summary information for the subscription item's ID should be seen as unstable until the subscription billing period ends. + sig { + params(subscription_item: String, params: T.any(::Stripe::SubscriptionItemUsageRecordSummaryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(subscription_item, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/subscription_schedule_service.rbi b/rbi/stripe/services/subscription_schedule_service.rbi new file mode 100644 index 000000000..ca976dee9 --- /dev/null +++ b/rbi/stripe/services/subscription_schedule_service.rbi @@ -0,0 +1,2208 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SubscriptionScheduleService < StripeService + class ListParams < Stripe::RequestParams + class CanceledAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CompletedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class ReleasedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return subscription schedules that were created canceled the given date interval. + sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer)) } + attr_accessor :canceled_at + # Only return subscription schedules that completed during the given date interval. + sig { + returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer)) + } + attr_accessor :completed_at + # Only return subscription schedules that were created during the given date interval. + sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return subscription schedules for the given customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return subscription schedules that were released during the given date interval. + sig { returns(T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer)) } + attr_accessor :released_at + # Only return subscription schedules that have not started yet. + sig { returns(T::Boolean) } + attr_accessor :scheduled + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(canceled_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::CanceledAt, Integer), completed_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::CompletedAt, Integer), created: T.any(::Stripe::SubscriptionScheduleService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, released_at: T.any(::Stripe::SubscriptionScheduleService::ListParams::ReleasedAt, Integer), scheduled: T::Boolean, starting_after: String).void + } + def initialize( + canceled_at: nil, + completed_at: nil, + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + released_at: nil, + scheduled: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings) + } + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData)) + } + attr_accessor :transfer_data + sig { + params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings::TransferData)).void + } + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(Integer) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings) } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item]) } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::PauseCollection) } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData) } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(Integer) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::CreateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Discount]), end_date: Integer, invoice_settings: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::PauseCollection, proration_behavior: String, transfer_data: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: Integer, trial_settings: ::Stripe::SubscriptionScheduleService::CreateParams::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # The identifier of the customer to create the subscription schedule for. + sig { returns(String) } + attr_accessor :customer + # Object representing the subscription schedule's default settings. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings) } + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Migrate an existing subscription to be managed by a subscription schedule. If this parameter is set, a subscription schedule will be created using the subscription's item(s), set to auto-renew using the subscription's interval. When using this parameter, other parameters (such as phase values) cannot be set. To create a subscription schedule with other modifications, we recommend making two separate API calls. + sig { returns(String) } + attr_accessor :from_subscription + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. + sig { returns(T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase]) } + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::SubscriptionScheduleService::CreateParams::Prebilling) } + attr_accessor :prebilling + # When the subscription schedule starts. We recommend using `now` so that it starts the subscription immediately. You can also use a Unix timestamp to backdate the subscription so that it starts on a past date, or set a future date for the subscription to start on. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + sig { + params(billing_behavior: String, customer: String, default_settings: ::Stripe::SubscriptionScheduleService::CreateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], from_subscription: String, metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionScheduleService::CreateParams::Phase], prebilling: ::Stripe::SubscriptionScheduleService::CreateParams::Prebilling, start_date: T.any(Integer, String)).void + } + def initialize( + billing_behavior: nil, + customer: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + from_subscription: nil, + metadata: nil, + phases: nil, + prebilling: nil, + start_date: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class DefaultSettings < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription schedule. Will be set on invoices generated by the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `collection_method=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Default settings for automatic tax computation. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax) + } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # All invoices will be billed using the specified settings. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings) + } + attr_accessor :invoice_settings + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData)) + } + attr_accessor :transfer_data + sig { + params(application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::BillingThresholds), collection_method: String, default_payment_method: String, description: T.nilable(String), invoice_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::InvoiceSettings, on_behalf_of: T.nilable(String), transfer_data: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings::TransferData)).void + } + def initialize( + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + default_payment_method: nil, + description: nil, + invoice_settings: nil, + on_behalf_of: nil, + transfer_data: nil + ); end + end + class Phase < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData) + } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability) + } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with this phase of the subscription schedule. Will be set on invoices generated by this phase of the subscription schedule. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # Number of days within which a customer must pay invoices generated by this subscription schedule. This value will be `null` for subscription schedules where `billing=charge_automatically`. + sig { returns(Integer) } + attr_accessor :days_until_due + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer) + } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), days_until_due: Integer, issuer: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, days_until_due: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring) + } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a configuration item. Metadata on a configuration item will update the underlying subscription item's `metadata` when the phase is entered, adding new keys and replacing existing keys. Individual keys in the subscription item's `metadata` can be unset by posting an empty value to them in the configuration item's `metadata`. To unset all keys in the subscription item's `metadata`, update the subscription item directly or unset every key individually from the configuration item's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The plan ID to subscribe to. You may specify the same ID in `plan` and `price`. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData) + } + attr_accessor :price_data + # Quantity for the given price. Can be set only if the price's `usage_type` is `licensed` and not `metered`. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this phase. You may pass up to 20 items. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem]) + } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(Float) } + attr_accessor :application_fee_percent + # Automatic tax settings for this phase. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax) } + attr_accessor :automatic_tax + # Can be set to `phase_start` to set the anchor to the start of the phase or `automatic` to automatically change it if needed. Cannot be set to `phase_start` if this phase specifies a trial. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay the underlying subscription at the end of each billing cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically` on creation. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this phase of the subscription schedule. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the default payment method for the subscription schedule. It must belong to the customer associated with the subscription schedule. If not set, invoices will use the default payment method in the customer's invoice settings. + sig { returns(String) } + attr_accessor :default_payment_method + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will set the Subscription's [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates), which means they will be the Invoice's [`default_tax_rates`](https://stripe.com/docs/api/invoices/create#create_invoice-default_tax_rates) for any Invoices issued by the Subscription during this Phase. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # Subscription description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the schedule phase. If not specified, inherits the discount from the subscription's customer. Pass an empty string to avoid inheriting any discounts. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount])) + } + attr_accessor :discounts + # The date at which this phase of the subscription schedule ends. If set, `iterations` must not be set. + sig { returns(T.any(Integer, String)) } + attr_accessor :end_date + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings) } + attr_accessor :invoice_settings + # List of configuration items, each with an attached price, to apply during this phase of the subscription schedule. + sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item]) } + attr_accessor :items + # Integer representing the multiplier applied to the price interval. For example, `iterations=2` applied to a price with `interval=month` and `interval_count=3` results in a phase of duration `2 * 3 months = 6 months`. If set, `end_date` must not be set. + sig { returns(Integer) } + attr_accessor :iterations + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to a phase. Metadata on a schedule's phase will update the underlying subscription's `metadata` when the phase is entered, adding new keys and replacing existing keys in the subscription's `metadata`. Individual keys in the subscription's `metadata` can be unset by posting an empty value to them in the phase's `metadata`. To unset all keys in the subscription's `metadata`, update the subscription directly or unset every key individually from the phase's `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The account on behalf of which to charge, for each of the associated subscription's invoices. + sig { returns(String) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::PauseCollection) } + attr_accessor :pause_collection + # Whether the subscription schedule will create [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when transitioning to this phase. The default value is `create_prorations`. This setting controls prorations when a phase is started asynchronously and it is persisted as a field on the phase. It's different from the request-level [proration_behavior](https://stripe.com/docs/api/subscription_schedules/update#update_subscription_schedule-proration_behavior) parameter which controls what happens if the update request affects the billing configuration of the current phase. + sig { returns(String) } + attr_accessor :proration_behavior + # The date at which this phase of the subscription schedule starts or `now`. Must be set on the first phase. + sig { returns(T.any(Integer, String)) } + attr_accessor :start_date + # The data with which to automatically create a Transfer for each of the associated subscription's invoices. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData) } + attr_accessor :transfer_data + # If set to true the entire phase is counted as a trial and the customer will not be charged for any fees. + sig { returns(T::Boolean) } + attr_accessor :trial + # Specify trial behavior when crossing phase boundaries + sig { returns(String) } + attr_accessor :trial_continuation + # Sets the phase to trialing from the start date to this date. Must be before the phase end date, can not be combined with `trial` + sig { returns(T.any(Integer, String)) } + attr_accessor :trial_end + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AddInvoiceItem], application_fee_percent: Float, automatic_tax: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionScheduleService::UpdateParams::Phase::BillingThresholds), collection_method: String, coupon: String, currency: String, default_payment_method: String, default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Discount]), end_date: T.any(Integer, String), invoice_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::InvoiceSettings, items: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase::Item], iterations: Integer, metadata: T::Hash[String, String], on_behalf_of: String, pause_collection: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::PauseCollection, proration_behavior: String, start_date: T.any(Integer, String), transfer_data: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TransferData, trial: T::Boolean, trial_continuation: String, trial_end: T.any(Integer, String), trial_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::Phase::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + collection_method: nil, + coupon: nil, + currency: nil, + default_payment_method: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + end_date: nil, + invoice_settings: nil, + items: nil, + iterations: nil, + metadata: nil, + on_behalf_of: nil, + pause_collection: nil, + proration_behavior: nil, + start_date: nil, + transfer_data: nil, + trial: nil, + trial_continuation: nil, + trial_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + # Configures when the subscription schedule generates prorations for phase transitions. Possible values are `prorate_on_next_phase` or `prorate_up_front` with the default being `prorate_on_next_phase`. `prorate_on_next_phase` will apply phase changes and generate prorations at transition time. `prorate_up_front` will bill for all phases within the current billing cycle up front. + sig { returns(String) } + attr_accessor :billing_behavior + # Object representing the subscription schedule's default settings. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings) } + attr_accessor :default_settings + # Behavior of the subscription schedule and underlying subscription when it ends. Possible values are `release` or `cancel` with the default being `release`. `release` will end the subscription schedule and keep the underlying subscription running. `cancel` will end the subscription schedule and cancel the underlying subscription. + sig { returns(String) } + attr_accessor :end_behavior + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # List representing phases of the subscription schedule. Each phase can be customized to have different durations, plans, and coupons. If there are multiple phases, the `end_date` of one phase will always equal the `start_date` of the next phase. Note that past phases can be omitted. + sig { returns(T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase]) } + attr_accessor :phases + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::SubscriptionScheduleService::UpdateParams::Prebilling) } + attr_accessor :prebilling + # If the update changes the current phase, indicates whether the changes should be prorated. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + sig { + params(billing_behavior: String, default_settings: ::Stripe::SubscriptionScheduleService::UpdateParams::DefaultSettings, end_behavior: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), phases: T::Array[::Stripe::SubscriptionScheduleService::UpdateParams::Phase], prebilling: ::Stripe::SubscriptionScheduleService::UpdateParams::Prebilling, proration_behavior: String).void + } + def initialize( + billing_behavior: nil, + default_settings: nil, + end_behavior: nil, + expand: nil, + metadata: nil, + phases: nil, + prebilling: nil, + proration_behavior: nil + ); end + end + class AmendParams < Stripe::RequestParams + class Amendment < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::DiscountEnd) + } + attr_accessor :discount_end + # Time span for the amendment starting from the `amendment_start`. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the amendment to end. Must be after the `amendment_start`. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_end`. + sig { returns(String) } + attr_accessor :type + sig { + params(discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::DiscountEnd, duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(discount_end: nil, duration: nil, timestamp: nil, type: nil); end + end + class AmendmentStart < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the previous amendment in the `amendments` array after which this amendment should begin. Indexes start from 0 and must be less than the index of the current amendment in the array. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class DiscountEnd < Stripe::RequestParams + # The ID of a specific discount. + sig { returns(String) } + attr_accessor :discount + sig { params(discount: String).void } + def initialize(discount: nil); end + end + # Details of another amendment in the same array, immediately after which this amendment should begin. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::AmendmentEnd) + } + attr_accessor :amendment_end + # Use the `end` time of a given discount. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::DiscountEnd) + } + attr_accessor :discount_end + # A precise Unix timestamp for the amendment to start. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of three ways to pass the `amendment_start`. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::AmendmentEnd, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart::DiscountEnd, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, discount_end: nil, timestamp: nil, type: nil); end + end + class DiscountAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # The coupon code to redeem. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount for a coupon that was already redeemed. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add::DiscountEnd) + } + attr_accessor :discount_end + # The index, starting at 0, at which to position the new discount. When not supplied, Stripe defaults to appending the discount to the end of the `discounts` array. + sig { returns(Integer) } + attr_accessor :index + # The promotion code to redeem. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add::DiscountEnd, index: Integer, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + index: nil, + promotion_code: nil + ); end + end + class Remove < Stripe::RequestParams + # The coupon code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :coupon + # The ID of a discount to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :discount + # The ID of a promotion code to remove from the `discounts` array. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + class Set < Stripe::RequestParams + # The coupon code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :coupon + # An ID of an existing discount to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :discount + # An ID of an existing promotion code to replace the `discounts` array with. + sig { returns(String) } + attr_accessor :promotion_code + sig { params(coupon: String, discount: String, promotion_code: String).void } + def initialize(coupon: nil, discount: nil, promotion_code: nil); end + end + # Details of the discount to add. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add) + } + attr_accessor :add + # Details of the discount to remove. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Remove) + } + attr_accessor :remove + # Details of the discount to replace the existing discounts with. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Set) + } + attr_accessor :set + # Determines the type of discount action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Add, remove: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Remove, set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class ItemAction < Stripe::RequestParams + class Add < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # The discounts applied to the item. Subscription item discounts are applied before subscription discounts. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount]) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates that apply to this subscription item. When set, the `default_tax_rates` on the subscription do not apply to this `subscription_item`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # Options that configure the trial on the subscription item. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class Remove < Stripe::RequestParams + # ID of a price to remove. + sig { returns(String) } + attr_accessor :price + sig { params(price: String).void } + def initialize(price: nil); end + end + class Set < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount::DiscountEnd, promotion_code: String).void + } + def initialize( + coupon: nil, + discount: nil, + discount_end: nil, + promotion_code: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # If an item with the `price` already exists, passing this will override the `discounts` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `discounts`. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount]) + } + attr_accessor :discounts + # If an item with the `price` already exists, passing this will override the `metadata` on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # If an item with the `price` already exists, passing this will override the quantity on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `quantity`. + sig { returns(Integer) } + attr_accessor :quantity + # If an item with the `price` already exists, passing this will override the `tax_rates` array on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `tax_rates`. + sig { returns(T::Array[String]) } + attr_accessor :tax_rates + # If an item with the `price` already exists, passing this will override the `trial` configuration on the subscription item that matches that price. Otherwise, the `items` array is cleared and a single new item is added with the supplied `trial`. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Trial) + } + attr_accessor :trial + sig { + params(discounts: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Discount], metadata: T::Hash[String, String], price: String, quantity: Integer, tax_rates: T::Array[String], trial: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set::Trial).void + } + def initialize( + discounts: nil, + metadata: nil, + price: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + # Details of the subscription item to add. If an item with the same `price` exists, it will be replaced by this new item. Otherwise, it adds the new item. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add) + } + attr_accessor :add + # Details of the subscription item to remove. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Remove) + } + attr_accessor :remove + # Details of the subscription item to replace the existing items with. If an item with the `set[price]` already exists, the `items` array is not cleared. Instead, all of the other `set` properties that are passed in this request will replace the existing values for the configuration item. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set) + } + attr_accessor :set + # Determines the type of item action. + sig { returns(String) } + attr_accessor :type + sig { + params(add: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Add, remove: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Remove, set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction::Set, type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class MetadataAction < Stripe::RequestParams + # Key-value pairs to add to schedule phase metadata. These values will merge with existing schedule phase metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :add + # Keys to remove from schedule phase metadata. + sig { returns(T::Array[String]) } + attr_accessor :remove + # Key-value pairs to set as schedule phase metadata. Existing schedule phase metadata will be overwritten. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :set + # Select one of three ways to update phase-level `metadata` on subscription schedules. + sig { returns(String) } + attr_accessor :type + sig { + params(add: T::Hash[String, String], remove: T::Array[String], set: T.nilable(T::Hash[String, String]), type: String).void + } + def initialize(add: nil, remove: nil, set: nil, type: nil); end + end + class SetPauseCollection < Stripe::RequestParams + class Set < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + sig { params(behavior: String).void } + def initialize(behavior: nil); end + end + # Details of the pause_collection behavior to apply to the amendment. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection::Set) + } + attr_accessor :set + # Determines the type of the pause_collection amendment. + sig { returns(String) } + attr_accessor :type + sig { + params(set: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection::Set, type: String).void + } + def initialize(set: nil, type: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Configure how an opt-in following a paid trial is billed when using `billing_behavior: prorate_up_front`. + sig { returns(String) } + attr_accessor :prorate_up_front + sig { params(prorate_up_front: String).void } + def initialize(prorate_up_front: nil); end + end + # Defines how the subscription should behave when a trial ends. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings::EndBehavior) + } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # Details to identify the end of the time range modified by the proposed change. If not supplied, the amendment is considered a point-in-time operation that only affects the exact timestamp at `amendment_start`, and a restricted set of attributes is supported on the amendment. + sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd) } + attr_accessor :amendment_end + # Details to identify the earliest timestamp where the proposed change should take effect. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart) + } + attr_accessor :amendment_start + # For point-in-time amendments (having no `amendment_end`), this attribute lets you set or remove whether the subscription's billing cycle anchor is reset at the `amendment_start` timestamp.For time-span based amendments (having both `amendment_start` and `amendment_end`), the only value valid is `automatic`, which removes any previously configured billing cycle anchor resets scheduled to occur during the window of time spanned by the amendment. + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Changes to the coupons being redeemed or discounts being applied during the amendment time span. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction]) + } + attr_accessor :discount_actions + # Changes to the subscription items during the amendment time span. + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction]) + } + attr_accessor :item_actions + # Instructions for how to modify phase metadata + sig { + returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::MetadataAction]) + } + attr_accessor :metadata_actions + # Changes to how Stripe handles prorations during the amendment time span. Affects if and how prorations are created when a future phase starts. In cases where the amendment changes the currently active phase, it is used to determine whether or how to prorate now, at the time of the request. Also supported as a point-in-time operation when `amendment_end` is `null`. + sig { returns(String) } + attr_accessor :proration_behavior + # Defines how to pause collection for the underlying subscription throughout the duration of the amendment. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection) + } + attr_accessor :set_pause_collection + # Ends the subscription schedule early as dictated by either the accompanying amendment's start or end. + sig { returns(String) } + attr_accessor :set_schedule_end + # Settings related to subscription trials. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings) + } + attr_accessor :trial_settings + sig { + params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentEnd, amendment_start: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::AmendmentStart, billing_cycle_anchor: String, discount_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::DiscountAction], item_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::ItemAction], metadata_actions: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment::MetadataAction], proration_behavior: String, set_pause_collection: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::SetPauseCollection, set_schedule_end: String, trial_settings: ::Stripe::SubscriptionScheduleService::AmendParams::Amendment::TrialSettings).void + } + def initialize( + amendment_end: nil, + amendment_start: nil, + billing_cycle_anchor: nil, + discount_actions: nil, + item_actions: nil, + metadata_actions: nil, + proration_behavior: nil, + set_pause_collection: nil, + set_schedule_end: nil, + trial_settings: nil + ); end + end + class Prebilling < Stripe::RequestParams + class BillFrom < Stripe::RequestParams + class AmendmentStart < Stripe::RequestParams + # The position of the amendment in the `amendments` array with which prebilling should begin. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + # Start the prebilled period when a specified amendment begins. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom::AmendmentStart) + } + attr_accessor :amendment_start + # Start the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_from` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_start: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom::AmendmentStart, timestamp: Integer, type: String).void + } + def initialize(amendment_start: nil, timestamp: nil, type: nil); end + end + class BillUntil < Stripe::RequestParams + class AmendmentEnd < Stripe::RequestParams + # The position of the amendment in the `amendments` array at which prebilling should end. Indexes start from 0 and must be less than the total number of supplied amendments. + sig { returns(Integer) } + attr_accessor :index + sig { params(index: Integer).void } + def initialize(index: nil); end + end + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # End the prebilled period when a specified amendment ends. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::AmendmentEnd) + } + attr_accessor :amendment_end + # Time span for prebilling, starting from `bill_from`. + sig { + returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::Duration) + } + attr_accessor :duration + # End the prebilled period at a precise integer timestamp, starting from the Unix epoch. + sig { returns(Integer) } + attr_accessor :timestamp + # Select one of several ways to pass the `bill_until` value. + sig { returns(String) } + attr_accessor :type + sig { + params(amendment_end: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::AmendmentEnd, duration: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil::Duration, timestamp: Integer, type: String).void + } + def initialize(amendment_end: nil, duration: nil, timestamp: nil, type: nil); end + end + # The beginning of the prebilled time period. The default value is `now`. + sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom) } + attr_accessor :bill_from + # The end of the prebilled time period. + sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil) } + attr_accessor :bill_until + # When the prebilling invoice should be created. The default value is `now`. + sig { returns(String) } + attr_accessor :invoice_at + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { + params(bill_from: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillFrom, bill_until: ::Stripe::SubscriptionScheduleService::AmendParams::Prebilling::BillUntil, invoice_at: String, update_behavior: String).void + } + def initialize(bill_from: nil, bill_until: nil, invoice_at: nil, update_behavior: nil); end + end + class ScheduleSettings < Stripe::RequestParams + # Behavior of the subscription schedule and underlying subscription when it ends. + sig { returns(String) } + attr_accessor :end_behavior + sig { params(end_behavior: String).void } + def initialize(end_behavior: nil); end + end + # Changes to apply to the phases of the subscription schedule, in the order provided. + sig { returns(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment]) } + attr_accessor :amendments + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Provide any time periods to bill in advance. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Prebilling])) + } + attr_accessor :prebilling + # In cases where the amendment changes the currently active phase, + # specifies if and how to prorate at the time of the request. + sig { returns(String) } + attr_accessor :proration_behavior + # Changes to apply to the subscription schedule. + sig { returns(::Stripe::SubscriptionScheduleService::AmendParams::ScheduleSettings) } + attr_accessor :schedule_settings + sig { + params(amendments: T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Amendment], expand: T::Array[String], prebilling: T.nilable(T::Array[::Stripe::SubscriptionScheduleService::AmendParams::Prebilling]), proration_behavior: String, schedule_settings: ::Stripe::SubscriptionScheduleService::AmendParams::ScheduleSettings).void + } + def initialize( + amendments: nil, + expand: nil, + prebilling: nil, + proration_behavior: nil, + schedule_settings: nil + ); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If the subscription schedule is `active`, indicates if a final invoice will be generated that contains any un-invoiced metered usage and new/pending proration invoice items. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # If the subscription schedule is `active`, indicates if the cancellation should be prorated. Defaults to `true`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { params(expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void } + def initialize(expand: nil, invoice_now: nil, prorate: nil); end + end + class ReleaseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Keep any cancellation on the subscription that the schedule has set + sig { returns(T::Boolean) } + attr_accessor :preserve_cancel_date + sig { params(expand: T::Array[String], preserve_cancel_date: T::Boolean).void } + def initialize(expand: nil, preserve_cancel_date: nil); end + end + # Amends an existing subscription schedule. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::AmendParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def amend(schedule, params = {}, opts = {}); end + + # Cancels a subscription schedule and its associated subscription immediately (if the subscription schedule has an active subscription). A subscription schedule can only be canceled if its status is not_started or active. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def cancel(schedule, params = {}, opts = {}); end + + # Creates a new subscription schedule object. Each customer can have up to 500 active or scheduled subscriptions. + sig { + params(params: T.any(::Stripe::SubscriptionScheduleService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def create(params = {}, opts = {}); end + + # Retrieves the list of your subscription schedules. + sig { + params(params: T.any(::Stripe::SubscriptionScheduleService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Releases the subscription schedule immediately, which will stop scheduling of its phases, but leave any existing subscription in place. A schedule can only be released if its status is not_started or active. If the subscription schedule is currently associated with a subscription, releasing it will remove its subscription property and set the subscription's ID to the released_subscription property. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::ReleaseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def release(schedule, params = {}, opts = {}); end + + # Retrieves the details of an existing subscription schedule. You only need to supply the unique subscription schedule identifier that was returned upon subscription schedule creation. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def retrieve(schedule, params = {}, opts = {}); end + + # Updates an existing subscription schedule. + sig { + params(schedule: String, params: T.any(::Stripe::SubscriptionScheduleService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SubscriptionSchedule) + } + def update(schedule, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/subscription_service.rbi b/rbi/stripe/services/subscription_service.rbi new file mode 100644 index 000000000..84f7b007d --- /dev/null +++ b/rbi/stripe/services/subscription_service.rbi @@ -0,0 +1,1870 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class SubscriptionService < StripeService + class CancelParams < Stripe::RequestParams + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :feedback + sig { params(comment: T.nilable(String), feedback: T.nilable(String)).void } + def initialize(comment: nil, feedback: nil); end + end + # Details about why this subscription was cancelled + sig { returns(::Stripe::SubscriptionService::CancelParams::CancellationDetails) } + attr_accessor :cancellation_details + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Will generate a final invoice that invoices for any un-invoiced metered usage and new/pending proration invoice items. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :invoice_now + # Will generate a proration invoice item that credits remaining unused time until the subscription period end. Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :prorate + sig { + params(cancellation_details: ::Stripe::SubscriptionService::CancelParams::CancellationDetails, expand: T::Array[String], invoice_now: T::Boolean, prorate: T::Boolean).void + } + def initialize(cancellation_details: nil, expand: nil, invoice_now: nil, prorate: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionService::UpdateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class CancellationDetails < Stripe::RequestParams + # Additional comments about why the user canceled the subscription, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :comment + # The customer submitted reason for why they canceled, if the subscription was canceled explicitly by the user. + sig { returns(T.nilable(String)) } + attr_accessor :feedback + sig { params(comment: T.nilable(String), feedback: T.nilable(String)).void } + def initialize(comment: nil, feedback: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionService::UpdateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::SubscriptionService::UpdateParams::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionService::UpdateParams::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::UpdateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # Delete all usage for a given subscription item. You must pass this when deleting a usage records subscription item. `clear_usage` has no effect if the plan has a billing meter attached. + sig { returns(T::Boolean) } + attr_accessor :clear_usage + # A flag that, if set to `true`, will delete the specified item. + sig { returns(T::Boolean) } + attr_accessor :deleted + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount])) + } + attr_accessor :discounts + # Subscription item to update. + sig { returns(String) } + attr_accessor :id + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. One of `price` or `price_data` is required. When changing a subscription item's price, `quantity` is set to 1 unless a `quantity` parameter is provided. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::SubscriptionService::UpdateParams::Item::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionService::UpdateParams::Item::BillingThresholds), clear_usage: T::Boolean, deleted: T::Boolean, discounts: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Item::Discount]), id: String, metadata: T.nilable(T::Hash[String, String]), plan: String, price: String, price_data: ::Stripe::SubscriptionService::UpdateParams::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + billing_thresholds: nil, + clear_usage: nil, + deleted: nil, + discounts: nil, + id: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class PauseCollection < Stripe::RequestParams + # The payment collection behavior for this subscription while paused. One of `keep_as_draft`, `mark_uncollectible`, or `void`. + sig { returns(String) } + attr_accessor :behavior + # The time after which the subscription will resume collecting payments. + sig { returns(Integer) } + attr_accessor :resumes_at + sig { params(behavior: String, resumes_at: Integer).void } + def initialize(behavior: nil, resumes_at: nil); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + sig { params(amount: Integer, amount_type: String, description: String).void } + def initialize(amount: nil, amount_type: nil, description: nil); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(mandate_options: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void + } + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + sig { + returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + sig { returns(String) } + attr_accessor :save_default_payment_method + sig { + params(payment_method_options: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void + } + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ); end + end + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { returns(::Stripe::SubscriptionService::UpdateParams::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionService::UpdateParams::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + sig { returns(T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem]) } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + sig { returns(::Stripe::SubscriptionService::UpdateParams::AutomaticTax) } + attr_accessor :automatic_tax + # Either `now` or `unchanged`. Setting the value to `now` resets the subscription's billing cycle anchor to the current time (in UTC). For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(T.nilable(Integer)) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # Details about why this subscription was cancelled + sig { returns(::Stripe::SubscriptionService::UpdateParams::CancellationDetails) } + attr_accessor :cancellation_details + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + sig { returns(Integer) } + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(T.nilable(String)) } + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. Pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::SubscriptionService::UpdateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + sig { returns(T::Array[::Stripe::SubscriptionService::UpdateParams::Item]) } + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # If specified, payment collection for this subscription will be paused. Note that the subscription status will be unchanged and will not be updated to `paused`. Learn more about [pausing collection](https://stripe.com/docs/billing/subscriptions/pause-payment). + sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PauseCollection)) } + attr_accessor :pause_collection + # Use `allow_incomplete` to transition the subscription to `status=past_due` if a payment is required but cannot be paid. This allows you to manage scenarios where additional user actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to transition the subscription to `status=past_due` when payment is required and await explicit confirmation of the invoice's payment intent. This allows simpler management of scenarios where additional user actions are needed to pay a subscription’s invoice. Such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. + # + # Use `pending_if_incomplete` to update the subscription using [pending updates](https://stripe.com/docs/billing/subscriptions/pending-updates). When you use `pending_if_incomplete` you can only pass the parameters [supported by pending updates](https://stripe.com/docs/billing/pending-updates-reference#supported-attributes). + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's invoice cannot be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further user action is needed, this parameter does not update the subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + sig { returns(String) } + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + sig { returns(::Stripe::SubscriptionService::UpdateParams::PaymentSettings) } + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + sig { + returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval)) + } + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::SubscriptionService::UpdateParams::Prebilling) } + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was updated at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#upcoming_invoice) endpoint. It can also be used to implement custom proration logic, such as prorating by day instead of by second, by providing the time that you wish to use for proration calculations. + sig { returns(Integer) } + attr_accessor :proration_date + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. This will be unset if you POST an empty value. + sig { returns(T.nilable(::Stripe::SubscriptionService::UpdateParams::TransferData)) } + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :trial_from_plan + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionService::UpdateParams::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::SubscriptionService::UpdateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::SubscriptionService::UpdateParams::AutomaticTax, billing_cycle_anchor: String, billing_thresholds: T.nilable(::Stripe::SubscriptionService::UpdateParams::BillingThresholds), cancel_at: T.nilable(Integer), cancel_at_period_end: T::Boolean, cancellation_details: ::Stripe::SubscriptionService::UpdateParams::CancellationDetails, collection_method: String, coupon: String, days_until_due: Integer, default_payment_method: String, default_source: T.nilable(String), default_tax_rates: T.nilable(T::Array[String]), description: T.nilable(String), discounts: T.nilable(T::Array[::Stripe::SubscriptionService::UpdateParams::Discount]), expand: T::Array[String], invoice_settings: ::Stripe::SubscriptionService::UpdateParams::InvoiceSettings, items: T::Array[::Stripe::SubscriptionService::UpdateParams::Item], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, on_behalf_of: T.nilable(String), pause_collection: T.nilable(::Stripe::SubscriptionService::UpdateParams::PauseCollection), payment_behavior: String, payment_settings: ::Stripe::SubscriptionService::UpdateParams::PaymentSettings, pending_invoice_item_interval: T.nilable(::Stripe::SubscriptionService::UpdateParams::PendingInvoiceItemInterval), prebilling: ::Stripe::SubscriptionService::UpdateParams::Prebilling, promotion_code: String, proration_behavior: String, proration_date: Integer, transfer_data: T.nilable(::Stripe::SubscriptionService::UpdateParams::TransferData), trial_end: T.any(String, Integer), trial_from_plan: T::Boolean, trial_settings: ::Stripe::SubscriptionService::UpdateParams::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + billing_cycle_anchor: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + cancellation_details: nil, + collection_method: nil, + coupon: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + pause_collection: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + proration_date: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_settings: nil + ); end + end + class DeleteDiscountParams < Stripe::RequestParams + + end + class ListParams < Stripe::RequestParams + class AutomaticTax < Stripe::RequestParams + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CurrentPeriodEnd < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class CurrentPeriodStart < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Filter subscriptions by their automatic tax settings. + sig { returns(::Stripe::SubscriptionService::ListParams::AutomaticTax) } + attr_accessor :automatic_tax + # The collection method of the subscriptions to retrieve. Either `charge_automatically` or `send_invoice`. + sig { returns(String) } + attr_accessor :collection_method + # Only return subscriptions that were created during the given date interval. + sig { returns(T.any(::Stripe::SubscriptionService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return subscriptions whose current_period_end falls within the given date interval. + sig { returns(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer)) } + attr_accessor :current_period_end + # Only return subscriptions whose current_period_start falls within the given date interval. + sig { returns(T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer)) } + attr_accessor :current_period_start + # The ID of the customer whose subscriptions will be retrieved. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The ID of the plan whose subscriptions will be retrieved. + sig { returns(String) } + attr_accessor :plan + # Filter for subscriptions that contain this recurring price ID. + sig { returns(String) } + attr_accessor :price + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the subscriptions to retrieve. Passing in a value of `canceled` will return all canceled subscriptions, including those belonging to deleted customers. Pass `ended` to find subscriptions that are canceled and subscriptions that are expired due to [incomplete payment](https://stripe.com/docs/billing/subscriptions/overview#subscription-statuses). Passing in a value of `all` will return subscriptions of all statuses. If no value is supplied, all subscriptions that have not been canceled are returned. + sig { returns(String) } + attr_accessor :status + # Filter for subscriptions that are associated with the specified test clock. The response will not include subscriptions with test clocks if this and the customer parameter is not set. + sig { returns(String) } + attr_accessor :test_clock + sig { + params(automatic_tax: ::Stripe::SubscriptionService::ListParams::AutomaticTax, collection_method: String, created: T.any(::Stripe::SubscriptionService::ListParams::Created, Integer), current_period_end: T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodEnd, Integer), current_period_start: T.any(::Stripe::SubscriptionService::ListParams::CurrentPeriodStart, Integer), customer: String, ending_before: String, expand: T::Array[String], limit: Integer, plan: String, price: String, starting_after: String, status: String, test_clock: String).void + } + def initialize( + automatic_tax: nil, + collection_method: nil, + created: nil, + current_period_end: nil, + current_period_start: nil, + customer: nil, + ending_before: nil, + expand: nil, + limit: nil, + plan: nil, + price: nil, + starting_after: nil, + status: nil, + test_clock: nil + ); end + end + class CreateParams < Stripe::RequestParams + class AddInvoiceItem < Stripe::RequestParams + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { + returns(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd) + } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge or a negative integer representing the amount to credit to the customer. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + # The coupons to redeem into discounts for the item. + sig { + returns(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount]) + } + attr_accessor :discounts + # The ID of the price object. One of `price` or `price_data` is required. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. One of `price` or `price_data` is required. + sig { returns(::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData) } + attr_accessor :price_data + # Quantity for this item. Defaults to 1. + sig { returns(Integer) } + attr_accessor :quantity + # The tax rates which apply to the item. When set, the `default_tax_rates` do not apply to this item. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + sig { + params(discounts: T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::Discount], price: String, price_data: ::Stripe::SubscriptionService::CreateParams::AddInvoiceItem::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String])).void + } + def initialize( + discounts: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil + ); end + end + class AutomaticTax < Stripe::RequestParams + class Liability < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # Enabled automatic tax calculation which will automatically compute tax rates on all invoices generated by the subscription. + sig { returns(T::Boolean) } + attr_accessor :enabled + # The account that's liable for tax. If set, the business address and tax registrations required to perform the tax calculation are loaded from this account. The tax transaction is returned in the report of the connected account. + sig { returns(::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability) } + attr_accessor :liability + sig { + params(enabled: T::Boolean, liability: ::Stripe::SubscriptionService::CreateParams::AutomaticTax::Liability).void + } + def initialize(enabled: nil, liability: nil); end + end + class BillingCycleAnchorConfig < Stripe::RequestParams + # The day of the month the billing_cycle_anchor should be. Ranges from 1 to 31. + sig { returns(Integer) } + attr_accessor :day_of_month + # The hour of the day the billing_cycle_anchor should be. Ranges from 0 to 23. + sig { returns(Integer) } + attr_accessor :hour + # The minute of the hour the billing_cycle_anchor should be. Ranges from 0 to 59. + sig { returns(Integer) } + attr_accessor :minute + # The month to start full cycle billing periods. Ranges from 1 to 12. + sig { returns(Integer) } + attr_accessor :month + # The second of the minute the billing_cycle_anchor should be. Ranges from 0 to 59. + sig { returns(Integer) } + attr_accessor :second + sig { + params(day_of_month: Integer, hour: Integer, minute: Integer, month: Integer, second: Integer).void + } + def initialize(day_of_month: nil, hour: nil, minute: nil, month: nil, second: nil); end + end + class BillingThresholds < Stripe::RequestParams + # Monetary threshold that triggers the subscription to advance to a new billing period + sig { returns(Integer) } + attr_accessor :amount_gte + # Indicates if the `billing_cycle_anchor` should be reset when a threshold is reached. If true, `billing_cycle_anchor` will be updated to the date/time the threshold was last reached; otherwise, the value will remain unchanged. + sig { returns(T::Boolean) } + attr_accessor :reset_billing_cycle_anchor + sig { params(amount_gte: Integer, reset_billing_cycle_anchor: T::Boolean).void } + def initialize(amount_gte: nil, reset_billing_cycle_anchor: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionService::CreateParams::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class InvoiceSettings < Stripe::RequestParams + class Issuer < Stripe::RequestParams + # The connected account being referenced when `type` is `account`. + sig { returns(String) } + attr_accessor :account + # Type of the account referenced in the request. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, type: String).void } + def initialize(account: nil, type: nil); end + end + # The account tax IDs associated with the subscription. Will be set on invoices generated by the subscription. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :account_tax_ids + # The connected account that issues the invoice. The invoice is presented with the branding and support information of the specified account. + sig { returns(::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer) } + attr_accessor :issuer + sig { + params(account_tax_ids: T.nilable(T::Array[String]), issuer: ::Stripe::SubscriptionService::CreateParams::InvoiceSettings::Issuer).void + } + def initialize(account_tax_ids: nil, issuer: nil); end + end + class Item < Stripe::RequestParams + class BillingThresholds < Stripe::RequestParams + # Number of units that meets the billing threshold to advance the subscription to a new billing period (e.g., it takes 10 $5 units to meet a $50 [monetary threshold](https://stripe.com/docs/api/subscriptions/update#update_subscription-billing_thresholds-amount_gte)) + sig { returns(Integer) } + attr_accessor :usage_gte + sig { params(usage_gte: Integer).void } + def initialize(usage_gte: nil); end + end + class Discount < Stripe::RequestParams + class DiscountEnd < Stripe::RequestParams + class Duration < Stripe::RequestParams + # Specifies a type of interval unit. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals, as an whole number greater than 0. Stripe multiplies this by the interval type to get the overall duration. + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Time span for the redeemed discount. + sig { + returns(::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd::Duration) + } + attr_accessor :duration + # A precise Unix timestamp for the discount to end. Must be in the future. + sig { returns(Integer) } + attr_accessor :timestamp + # The type of calculation made to determine when the discount ends. + sig { returns(String) } + attr_accessor :type + sig { + params(duration: ::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd::Duration, timestamp: Integer, type: String).void + } + def initialize(duration: nil, timestamp: nil, type: nil); end + end + # ID of the coupon to create a new discount for. + sig { returns(String) } + attr_accessor :coupon + # ID of an existing discount on the object (or one of its ancestors) to reuse. + sig { returns(String) } + attr_accessor :discount + # Details to determine how long the discount should be applied for. + sig { returns(::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd) } + attr_accessor :discount_end + # ID of the promotion code to create a new discount for. + sig { returns(String) } + attr_accessor :promotion_code + sig { + params(coupon: String, discount: String, discount_end: ::Stripe::SubscriptionService::CreateParams::Item::Discount::DiscountEnd, promotion_code: String).void + } + def initialize(coupon: nil, discount: nil, discount_end: nil, promotion_code: nil); end + end + class PriceData < Stripe::RequestParams + class Recurring < Stripe::RequestParams + # Specifies billing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between subscription billings. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of three years interval allowed (3 years, 36 months, or 156 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of the product that this price will belong to. + sig { returns(String) } + attr_accessor :product + # The recurring components of a price such as `interval` and `interval_count`. + sig { returns(::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring) } + attr_accessor :recurring + # Only required if a [default tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#setting-a-default-tax-behavior-(recommended)) was not provided in the Stripe Tax settings. Specifies whether the price is considered inclusive of taxes or exclusive of taxes. One of `inclusive`, `exclusive`, or `unspecified`. Once specified as either `inclusive` or `exclusive`, it cannot be changed. + sig { returns(String) } + attr_accessor :tax_behavior + # A positive integer in cents (or local equivalent) (or 0 for a free price) representing how much to charge. + sig { returns(Integer) } + attr_accessor :unit_amount + # Same as `unit_amount`, but accepts a decimal value in cents (or local equivalent) with at most 12 decimal places. Only one of `unit_amount` and `unit_amount_decimal` can be set. + sig { returns(String) } + attr_accessor :unit_amount_decimal + sig { + params(currency: String, product: String, recurring: ::Stripe::SubscriptionService::CreateParams::Item::PriceData::Recurring, tax_behavior: String, unit_amount: Integer, unit_amount_decimal: String).void + } + def initialize( + currency: nil, + product: nil, + recurring: nil, + tax_behavior: nil, + unit_amount: nil, + unit_amount_decimal: nil + ); end + end + class Trial < Stripe::RequestParams + # List of price IDs which, if present on the subscription following a paid trial, constitute opting-in to the paid trial. Currently only supports at most 1 price ID. + sig { returns(T::Array[String]) } + attr_accessor :converts_to + # Determines the type of trial for this item. + sig { returns(String) } + attr_accessor :type + sig { params(converts_to: T::Array[String], type: String).void } + def initialize(converts_to: nil, type: nil); end + end + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. When updating, pass an empty string to remove previously-defined thresholds. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::Item::BillingThresholds)) + } + attr_accessor :billing_thresholds + # The coupons to redeem into discounts for the subscription item. + sig { + returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount])) + } + attr_accessor :discounts + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Plan ID for this item, as a string. + sig { returns(String) } + attr_accessor :plan + # The ID of the price object. + sig { returns(String) } + attr_accessor :price + # Data used to generate a new [Price](https://stripe.com/docs/api/prices) object inline. + sig { returns(::Stripe::SubscriptionService::CreateParams::Item::PriceData) } + attr_accessor :price_data + # Quantity for this item. + sig { returns(Integer) } + attr_accessor :quantity + # A list of [Tax Rate](https://stripe.com/docs/api/tax_rates) ids. These Tax Rates will override the [`default_tax_rates`](https://stripe.com/docs/api/subscriptions/create#create_subscription-default_tax_rates) on the Subscription. When updating, pass an empty string to remove previously-defined tax rates. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :tax_rates + # Define options to configure the trial on the subscription item. + sig { returns(::Stripe::SubscriptionService::CreateParams::Item::Trial) } + attr_accessor :trial + sig { + params(billing_thresholds: T.nilable(::Stripe::SubscriptionService::CreateParams::Item::BillingThresholds), discounts: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Item::Discount]), metadata: T::Hash[String, String], plan: String, price: String, price_data: ::Stripe::SubscriptionService::CreateParams::Item::PriceData, quantity: Integer, tax_rates: T.nilable(T::Array[String]), trial: ::Stripe::SubscriptionService::CreateParams::Item::Trial).void + } + def initialize( + billing_thresholds: nil, + discounts: nil, + metadata: nil, + plan: nil, + price: nil, + price_data: nil, + quantity: nil, + tax_rates: nil, + trial: nil + ); end + end + class PaymentSettings < Stripe::RequestParams + class PaymentMethodOptions < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Transaction type of the mandate. + sig { returns(String) } + attr_accessor :transaction_type + sig { params(transaction_type: String).void } + def initialize(transaction_type: nil); end + end + # Additional fields for Mandate creation + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions) + } + attr_accessor :mandate_options + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(mandate_options: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit::MandateOptions, verification_method: String).void + } + def initialize(mandate_options: nil, verification_method: nil); end + end + class Bancontact < Stripe::RequestParams + # Preferred language of the Bancontact authorization page that the customer is redirected to. + sig { returns(String) } + attr_accessor :preferred_language + sig { params(preferred_language: String).void } + def initialize(preferred_language: nil); end + end + class Card < Stripe::RequestParams + class MandateOptions < Stripe::RequestParams + # Amount to be charged for future payments. + sig { returns(Integer) } + attr_accessor :amount + # One of `fixed` or `maximum`. If `fixed`, the `amount` param refers to the exact amount to be charged in future payments. If `maximum`, the amount charged can be up to the value passed for the `amount` param. + sig { returns(String) } + attr_accessor :amount_type + # A description of the mandate or subscription that is meant to be displayed to the customer. + sig { returns(String) } + attr_accessor :description + sig { params(amount: Integer, amount_type: String, description: String).void } + def initialize(amount: nil, amount_type: nil, description: nil); end + end + # Configuration options for setting up an eMandate for cards issued in India. + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions) + } + attr_accessor :mandate_options + # Selected network to process this Subscription on. Depends on the available networks of the card attached to the Subscription. Can be only set confirm-time. + sig { returns(String) } + attr_accessor :network + # We strongly recommend that you rely on our SCA Engine to automatically prompt your customers for authentication based on risk level and [other requirements](https://stripe.com/docs/strong-customer-authentication). However, if you wish to request 3D Secure based on logic from your own fraud engine, provide this option. Read our guide on [manually requesting 3D Secure](https://stripe.com/docs/payments/3d-secure/authentication-flow#manual-three-ds) for more information on how this configuration interacts with Radar and our SCA Engine. + sig { returns(String) } + attr_accessor :request_three_d_secure + sig { + params(mandate_options: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card::MandateOptions, network: String, request_three_d_secure: String).void + } + def initialize(mandate_options: nil, network: nil, request_three_d_secure: nil); end + end + class CustomerBalance < Stripe::RequestParams + class BankTransfer < Stripe::RequestParams + class EuBankTransfer < Stripe::RequestParams + # The desired country code of the bank account information. Permitted values include: `BE`, `DE`, `ES`, `FR`, `IE`, or `NL`. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + # Configuration for eu_bank_transfer funding type. + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer) + } + attr_accessor :eu_bank_transfer + # The bank transfer type that can be used for funding. Permitted values include: `eu_bank_transfer`, `gb_bank_transfer`, `jp_bank_transfer`, `mx_bank_transfer`, or `us_bank_transfer`. + sig { returns(String) } + attr_accessor :type + sig { + params(eu_bank_transfer: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer::EuBankTransfer, type: String).void + } + def initialize(eu_bank_transfer: nil, type: nil); end + end + # Configuration for the bank transfer funding type, if the `funding_type` is set to `bank_transfer`. + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer) + } + attr_accessor :bank_transfer + # The funding method type to be used when there are not enough funds in the customer balance. Permitted values include: `bank_transfer`. + sig { returns(String) } + attr_accessor :funding_type + sig { + params(bank_transfer: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance::BankTransfer, funding_type: String).void + } + def initialize(bank_transfer: nil, funding_type: nil); end + end + class IdBankTransfer < Stripe::RequestParams + + end + class Konbini < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + class FinancialConnections < Stripe::RequestParams + class Filters < Stripe::RequestParams + # The account subcategories to use to filter for selectable accounts. Valid subcategories are `checking` and `savings`. + sig { returns(T::Array[String]) } + attr_accessor :account_subcategories + # ID of the institution to use to filter for selectable accounts. + sig { returns(String) } + attr_accessor :institution + sig { params(account_subcategories: T::Array[String], institution: String).void } + def initialize(account_subcategories: nil, institution: nil); end + end + # Provide filters for the linked accounts that the customer can select for the payment method. + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters) + } + attr_accessor :filters + # The list of permissions to request. If this parameter is passed, the `payment_method` permission must be included. Valid permissions include: `balances`, `ownership`, `payment_method`, and `transactions`. + sig { returns(T::Array[String]) } + attr_accessor :permissions + # List of data features that you would like to retrieve upon account creation. + sig { returns(T::Array[String]) } + attr_accessor :prefetch + sig { + params(filters: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections::Filters, permissions: T::Array[String], prefetch: T::Array[String]).void + } + def initialize(filters: nil, permissions: nil, prefetch: nil); end + end + # Additional fields for Financial Connections Session creation + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections) + } + attr_accessor :financial_connections + # Verification method for the intent + sig { returns(String) } + attr_accessor :verification_method + sig { + params(financial_connections: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount::FinancialConnections, verification_method: String).void + } + def initialize(financial_connections: nil, verification_method: nil); end + end + # This sub-hash contains details about the Canadian pre-authorized debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit)) + } + attr_accessor :acss_debit + # This sub-hash contains details about the Bancontact payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact)) + } + attr_accessor :bancontact + # This sub-hash contains details about the Card payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card)) + } + attr_accessor :card + # This sub-hash contains details about the Bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance)) + } + attr_accessor :customer_balance + # This sub-hash contains details about the Indonesia bank transfer payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer)) + } + attr_accessor :id_bank_transfer + # This sub-hash contains details about the Konbini payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini)) + } + attr_accessor :konbini + # This sub-hash contains details about the SEPA Direct Debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit)) + } + attr_accessor :sepa_debit + # This sub-hash contains details about the ACH direct debit payment method options to pass to the invoice’s PaymentIntent. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(acss_debit: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::AcssDebit), bancontact: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Bancontact), card: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Card), customer_balance: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::CustomerBalance), id_bank_transfer: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::IdBankTransfer), konbini: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::Konbini), sepa_debit: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::SepaDebit), us_bank_account: T.nilable(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions::UsBankAccount)).void + } + def initialize( + acss_debit: nil, + bancontact: nil, + card: nil, + customer_balance: nil, + id_bank_transfer: nil, + konbini: nil, + sepa_debit: nil, + us_bank_account: nil + ); end + end + # Payment-method-specific configuration to provide to invoices created by the subscription. + sig { + returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions) + } + attr_accessor :payment_method_options + # The list of payment method types (e.g. card) to provide to the invoice’s PaymentIntent. If not set, Stripe attempts to automatically determine the types to use by looking at the invoice’s default payment method, the subscription’s default payment method, the customer’s default payment method, and your [invoice template settings](https://dashboard.stripe.com/settings/billing/invoice). Should not be specified with payment_method_configuration + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :payment_method_types + # Configure whether Stripe updates `subscription.default_payment_method` when payment succeeds. Defaults to `off` if unspecified. + sig { returns(String) } + attr_accessor :save_default_payment_method + sig { + params(payment_method_options: ::Stripe::SubscriptionService::CreateParams::PaymentSettings::PaymentMethodOptions, payment_method_types: T.nilable(T::Array[String]), save_default_payment_method: String).void + } + def initialize( + payment_method_options: nil, + payment_method_types: nil, + save_default_payment_method: nil + ); end + end + class PendingInvoiceItemInterval < Stripe::RequestParams + # Specifies invoicing frequency. Either `day`, `week`, `month` or `year`. + sig { returns(String) } + attr_accessor :interval + # The number of intervals between invoices. For example, `interval=month` and `interval_count=3` bills every 3 months. Maximum of one year interval allowed (1 year, 12 months, or 52 weeks). + sig { returns(Integer) } + attr_accessor :interval_count + sig { params(interval: String, interval_count: Integer).void } + def initialize(interval: nil, interval_count: nil); end + end + class Prebilling < Stripe::RequestParams + # This is used to determine the number of billing cycles to prebill. + sig { returns(Integer) } + attr_accessor :iterations + # Whether to cancel or preserve `prebilling` if the subscription is updated during the prebilled period. The default value is `reset`. + sig { returns(String) } + attr_accessor :update_behavior + sig { params(iterations: Integer, update_behavior: String).void } + def initialize(iterations: nil, update_behavior: nil); end + end + class TransferData < Stripe::RequestParams + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the destination account. By default, the entire amount is transferred to the destination. + sig { returns(Float) } + attr_accessor :amount_percent + # ID of an existing, connected Stripe account. + sig { returns(String) } + attr_accessor :destination + sig { params(amount_percent: Float, destination: String).void } + def initialize(amount_percent: nil, destination: nil); end + end + class TrialSettings < Stripe::RequestParams + class EndBehavior < Stripe::RequestParams + # Indicates how the subscription should change when the trial ends if the user did not provide a payment method. + sig { returns(String) } + attr_accessor :missing_payment_method + sig { params(missing_payment_method: String).void } + def initialize(missing_payment_method: nil); end + end + # Defines how the subscription should behave when the user's free trial ends. + sig { returns(::Stripe::SubscriptionService::CreateParams::TrialSettings::EndBehavior) } + attr_accessor :end_behavior + sig { + params(end_behavior: ::Stripe::SubscriptionService::CreateParams::TrialSettings::EndBehavior).void + } + def initialize(end_behavior: nil); end + end + # A list of prices and quantities that will generate invoice items appended to the next invoice for this subscription. You may pass up to 20 items. + sig { returns(T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem]) } + attr_accessor :add_invoice_items + # A non-negative decimal between 0 and 100, with at most two decimal places. This represents the percentage of the subscription invoice total that will be transferred to the application owner's Stripe account. The request must be made by a platform account on a connected account in order to set an application fee percentage. For more information, see the application fees [documentation](https://stripe.com/docs/connect/subscriptions#collecting-fees-on-subscriptions). + sig { returns(T.nilable(Float)) } + attr_accessor :application_fee_percent + # Automatic tax settings for this subscription. We recommend you only include this parameter when the existing value is being changed. + sig { returns(::Stripe::SubscriptionService::CreateParams::AutomaticTax) } + attr_accessor :automatic_tax + # For new subscriptions, a past timestamp to backdate the subscription's start date to. If set, the first invoice will contain a proration for the timespan between the start date and the current time. Can be combined with trials and the billing cycle anchor. + sig { returns(Integer) } + attr_accessor :backdate_start_date + # A future timestamp in UTC format to anchor the subscription's [billing cycle](https://stripe.com/docs/subscriptions/billing-cycle). The anchor is the reference point that aligns future billing cycle dates. It sets the day of week for `week` intervals, the day of month for `month` and `year` intervals, and the month of year for `year` intervals. + sig { returns(Integer) } + attr_accessor :billing_cycle_anchor + # Mutually exclusive with billing_cycle_anchor and only valid with monthly and yearly price intervals. When provided, the billing_cycle_anchor is set to the next occurence of the day_of_month at the hour, minute, and second UTC. + sig { returns(::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig) } + attr_accessor :billing_cycle_anchor_config + # Define thresholds at which an invoice will be sent, and the subscription advanced to a new billing period. Pass an empty string to remove previously-defined thresholds. + sig { returns(T.nilable(::Stripe::SubscriptionService::CreateParams::BillingThresholds)) } + attr_accessor :billing_thresholds + # A timestamp at which the subscription should cancel. If set to a date before the current period ends, this will cause a proration if prorations have been enabled using `proration_behavior`. If set during a future period, this will always cause a proration for that period. + sig { returns(Integer) } + attr_accessor :cancel_at + # Indicate whether this subscription should cancel at the end of the current period (`current_period_end`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :cancel_at_period_end + # Either `charge_automatically`, or `send_invoice`. When charging automatically, Stripe will attempt to pay this subscription at the end of the cycle using the default source attached to the customer. When sending an invoice, Stripe will email your customer an invoice with payment instructions and mark the subscription as `active`. Defaults to `charge_automatically`. + sig { returns(String) } + attr_accessor :collection_method + # The ID of the coupon to apply to this subscription. A coupon applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :coupon + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The identifier of the customer to subscribe. + sig { returns(String) } + attr_accessor :customer + # Number of days a customer has to pay invoices generated by this subscription. Valid only for subscriptions where `collection_method` is set to `send_invoice`. + sig { returns(Integer) } + attr_accessor :days_until_due + # ID of the default payment method for the subscription. It must belong to the customer associated with the subscription. This takes precedence over `default_source`. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(String) } + attr_accessor :default_payment_method + # ID of the default payment source for the subscription. It must belong to the customer associated with the subscription and be in a chargeable state. If `default_payment_method` is also set, `default_payment_method` will take precedence. If neither are set, invoices will use the customer's [invoice_settings.default_payment_method](https://stripe.com/docs/api/customers/object#customer_object-invoice_settings-default_payment_method) or [default_source](https://stripe.com/docs/api/customers/object#customer_object-default_source). + sig { returns(String) } + attr_accessor :default_source + # The tax rates that will apply to any subscription item that does not have `tax_rates` set. Invoices created will have their `default_tax_rates` populated from the subscription. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :default_tax_rates + # The subscription's description, meant to be displayable to the customer. Use this field to optionally store an explanation of the subscription for rendering in Stripe surfaces and certain local payment methods UIs. + sig { returns(String) } + attr_accessor :description + # The coupons to redeem into discounts for the subscription. If not specified or empty, inherits the discount from the subscription's customer. + sig { returns(T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Discount])) } + attr_accessor :discounts + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # All invoices will be billed using the specified settings. + sig { returns(::Stripe::SubscriptionService::CreateParams::InvoiceSettings) } + attr_accessor :invoice_settings + # A list of up to 20 subscription items, each with an attached price. + sig { returns(T::Array[::Stripe::SubscriptionService::CreateParams::Item]) } + attr_accessor :items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Indicates if a customer is on or off-session while an invoice payment is attempted. Defaults to `false` (on-session). + sig { returns(T::Boolean) } + attr_accessor :off_session + # The account on behalf of which to charge, for each of the subscription's invoices. + sig { returns(T.nilable(String)) } + attr_accessor :on_behalf_of + # Only applies to subscriptions with `collection_method=charge_automatically`. + # + # Use `allow_incomplete` to create Subscriptions with `status=incomplete` if the first invoice can't be paid. Creating Subscriptions with this status allows you to manage scenarios where additional customer actions are needed to pay a subscription's invoice. For example, SCA regulation may require 3DS authentication to complete payment. See the [SCA Migration Guide](https://stripe.com/docs/billing/migration/strong-customer-authentication) for Billing to learn more. This is the default behavior. + # + # Use `default_incomplete` to create Subscriptions with `status=incomplete` when the first invoice requires payment, otherwise start as active. Subscriptions transition to `status=active` when successfully confirming the PaymentIntent on the first invoice. This allows simpler management of scenarios where additional customer actions are needed to pay a subscription’s invoice, such as failed payments, [SCA regulation](https://stripe.com/docs/billing/migration/strong-customer-authentication), or collecting a mandate for a bank debit payment method. If the PaymentIntent is not confirmed within 23 hours Subscriptions transition to `status=incomplete_expired`, which is a terminal state. + # + # Use `error_if_incomplete` if you want Stripe to return an HTTP 402 status code if a subscription's first invoice can't be paid. For example, if a payment method requires 3DS authentication due to SCA regulation and further customer action is needed, this parameter doesn't create a Subscription and returns an error instead. This was the default behavior for API versions prior to 2019-03-14. See the [changelog](https://stripe.com/docs/upgrades#2019-03-14) to learn more. + # + # `pending_if_incomplete` is only used with updates and cannot be passed when creating a Subscription. + # + # Subscriptions with `collection_method=send_invoice` are automatically activated regardless of the first Invoice status. + sig { returns(String) } + attr_accessor :payment_behavior + # Payment settings to pass to invoices created by the subscription. + sig { returns(::Stripe::SubscriptionService::CreateParams::PaymentSettings) } + attr_accessor :payment_settings + # Specifies an interval for how often to bill for any pending invoice items. It is analogous to calling [Create an invoice](https://stripe.com/docs/api#create_invoice) for the given subscription at the specified interval. + sig { + returns(T.nilable(::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval)) + } + attr_accessor :pending_invoice_item_interval + # If specified, the invoicing for the given billing cycle iterations will be processed now. + sig { returns(::Stripe::SubscriptionService::CreateParams::Prebilling) } + attr_accessor :prebilling + # The promotion code to apply to this subscription. A promotion code applied to a subscription will only affect invoices created for that particular subscription. This field has been deprecated and will be removed in a future API version. Use `discounts` instead. + sig { returns(String) } + attr_accessor :promotion_code + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) resulting from the `billing_cycle_anchor`. If no value is passed, the default is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If specified, the funds from the subscription's invoices will be transferred to the destination and the ID of the resulting transfers will be found on the resulting charges. + sig { returns(::Stripe::SubscriptionService::CreateParams::TransferData) } + attr_accessor :transfer_data + # Unix timestamp representing the end of the trial period the customer will get before being charged for the first time. If set, trial_end will override the default trial period of the plan the customer is being subscribed to. The special value `now` can be provided to end the customer's trial immediately. Can be at most two years from `billing_cycle_anchor`. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T.any(String, Integer)) } + attr_accessor :trial_end + # Indicates if a plan's `trial_period_days` should be applied to the subscription. Setting `trial_end` per subscription is preferred, and this defaults to `false`. Setting this flag to `true` together with `trial_end` is not allowed. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(T::Boolean) } + attr_accessor :trial_from_plan + # Integer representing the number of trial period days before the customer is charged for the first time. This will always overwrite any trials that might apply via a subscribed plan. See [Using trial periods on subscriptions](https://stripe.com/docs/billing/subscriptions/trials) to learn more. + sig { returns(Integer) } + attr_accessor :trial_period_days + # Settings related to subscription trials. + sig { returns(::Stripe::SubscriptionService::CreateParams::TrialSettings) } + attr_accessor :trial_settings + sig { + params(add_invoice_items: T::Array[::Stripe::SubscriptionService::CreateParams::AddInvoiceItem], application_fee_percent: T.nilable(Float), automatic_tax: ::Stripe::SubscriptionService::CreateParams::AutomaticTax, backdate_start_date: Integer, billing_cycle_anchor: Integer, billing_cycle_anchor_config: ::Stripe::SubscriptionService::CreateParams::BillingCycleAnchorConfig, billing_thresholds: T.nilable(::Stripe::SubscriptionService::CreateParams::BillingThresholds), cancel_at: Integer, cancel_at_period_end: T::Boolean, collection_method: String, coupon: String, currency: String, customer: String, days_until_due: Integer, default_payment_method: String, default_source: String, default_tax_rates: T.nilable(T::Array[String]), description: String, discounts: T.nilable(T::Array[::Stripe::SubscriptionService::CreateParams::Discount]), expand: T::Array[String], invoice_settings: ::Stripe::SubscriptionService::CreateParams::InvoiceSettings, items: T::Array[::Stripe::SubscriptionService::CreateParams::Item], metadata: T.nilable(T::Hash[String, String]), off_session: T::Boolean, on_behalf_of: T.nilable(String), payment_behavior: String, payment_settings: ::Stripe::SubscriptionService::CreateParams::PaymentSettings, pending_invoice_item_interval: T.nilable(::Stripe::SubscriptionService::CreateParams::PendingInvoiceItemInterval), prebilling: ::Stripe::SubscriptionService::CreateParams::Prebilling, promotion_code: String, proration_behavior: String, transfer_data: ::Stripe::SubscriptionService::CreateParams::TransferData, trial_end: T.any(String, Integer), trial_from_plan: T::Boolean, trial_period_days: Integer, trial_settings: ::Stripe::SubscriptionService::CreateParams::TrialSettings).void + } + def initialize( + add_invoice_items: nil, + application_fee_percent: nil, + automatic_tax: nil, + backdate_start_date: nil, + billing_cycle_anchor: nil, + billing_cycle_anchor_config: nil, + billing_thresholds: nil, + cancel_at: nil, + cancel_at_period_end: nil, + collection_method: nil, + coupon: nil, + currency: nil, + customer: nil, + days_until_due: nil, + default_payment_method: nil, + default_source: nil, + default_tax_rates: nil, + description: nil, + discounts: nil, + expand: nil, + invoice_settings: nil, + items: nil, + metadata: nil, + off_session: nil, + on_behalf_of: nil, + payment_behavior: nil, + payment_settings: nil, + pending_invoice_item_interval: nil, + prebilling: nil, + promotion_code: nil, + proration_behavior: nil, + transfer_data: nil, + trial_end: nil, + trial_from_plan: nil, + trial_period_days: nil, + trial_settings: nil + ); end + end + class SearchParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for pagination across multiple pages of results. Don't include this parameter on the first call. Use the next_page value returned in a previous response to request subsequent results. + sig { returns(String) } + attr_accessor :page + # The search query string. See [search query language](https://stripe.com/docs/search#search-query-language) and the list of supported [query fields for subscriptions](https://stripe.com/docs/search#query-fields-for-subscriptions). + sig { returns(String) } + attr_accessor :query + sig { params(expand: T::Array[String], limit: Integer, page: String, query: String).void } + def initialize(expand: nil, limit: nil, page: nil, query: nil); end + end + class ResumeParams < Stripe::RequestParams + # The billing cycle anchor that applies when the subscription is resumed. Either `now` or `unchanged`. The default is `now`. For more information, see the billing cycle [documentation](https://stripe.com/docs/billing/subscriptions/billing-cycle). + sig { returns(String) } + attr_accessor :billing_cycle_anchor + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Determines how to handle [prorations](https://stripe.com/docs/billing/subscriptions/prorations) when the billing cycle changes (e.g., when switching plans, resetting `billing_cycle_anchor=now`, or starting a trial), or if an item's `quantity` changes. The default value is `create_prorations`. + sig { returns(String) } + attr_accessor :proration_behavior + # If set, the proration will be calculated as though the subscription was resumed at the given time. This can be used to apply exactly the same proration that was previewed with [upcoming invoice](https://stripe.com/docs/api#retrieve_customer_invoice) endpoint. + sig { returns(Integer) } + attr_accessor :proration_date + sig { + params(billing_cycle_anchor: String, expand: T::Array[String], proration_behavior: String, proration_date: Integer).void + } + def initialize( + billing_cycle_anchor: nil, + expand: nil, + proration_behavior: nil, + proration_date: nil + ); end + end + # Cancels a customer's subscription immediately. The customer won't be charged again for the subscription. After it's canceled, you can no longer update the subscription or its [metadata](https://stripe.com/metadata). + # + # Any pending invoice items that you've created are still charged at the end of the period, unless manually [deleted](https://stripe.com/docs/api#delete_invoiceitem). If you've set the subscription to cancel at the end of the period, any pending prorations are also left in place and collected at the end of the period. But if the subscription is set to cancel immediately, pending prorations are removed. + # + # By default, upon subscription cancellation, Stripe stops automatic collection of all finalized invoices for the customer. This is intended to prevent unexpected payment attempts after the customer has canceled a subscription. However, you can resume automatic collection of the invoices manually after subscription cancellation to have us proceed. Or, you could check for unpaid invoices before allowing the customer to cancel the subscription at all. + sig { + params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def cancel(subscription_exposed_id, params = {}, opts = {}); end + + # Creates a new subscription on an existing customer. Each customer can have up to 500 active or scheduled subscriptions. + # + # When you create a subscription with collection_method=charge_automatically, the first invoice is finalized as part of the request. + # The payment_behavior parameter determines the exact behavior of the initial payment. + # + # To start subscriptions where the first invoice always begins in a draft status, use [subscription schedules](https://stripe.com/docs/billing/subscriptions/subscription-schedules#managing) instead. + # Schedules provide the flexibility to model more complex billing configurations that change over time. + sig { + params(params: T.any(::Stripe::SubscriptionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def create(params = {}, opts = {}); end + + # Removes the currently applied discount on a subscription. + sig { + params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::DeleteDiscountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Discount) + } + def delete_discount(subscription_exposed_id, params = {}, opts = {}); end + + # By default, returns a list of subscriptions that have not been canceled. In order to list canceled subscriptions, specify status=canceled. + sig { + params(params: T.any(::Stripe::SubscriptionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Initiates resumption of a paused subscription, optionally resetting the billing cycle anchor and creating prorations. If a resumption invoice is generated, it must be paid or marked uncollectible before the subscription will be unpaused. If payment succeeds the subscription will become active, and if payment fails the subscription will be past_due. The resumption invoice will void automatically if not paid by the expiration date. + sig { + params(subscription: String, params: T.any(::Stripe::SubscriptionService::ResumeParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def resume(subscription, params = {}, opts = {}); end + + # Retrieves the subscription with the given ID. + sig { + params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def retrieve(subscription_exposed_id, params = {}, opts = {}); end + + # Search for subscriptions you've previously created using Stripe's [Search Query Language](https://stripe.com/docs/search#search-query-language). + # Don't use search in read-after-write flows where strict consistency is necessary. Under normal operating + # conditions, data is searchable in less than a minute. Occasionally, propagation of new or updated data can be up + # to an hour behind during outages. Search functionality is not available to merchants in India. + sig { + params(params: T.any(::Stripe::SubscriptionService::SearchParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::SearchResultObject) + } + def search(params = {}, opts = {}); end + + # Updates an existing subscription to match the specified parameters. + # When changing prices or quantities, we optionally prorate the price we charge next month to make up for any price changes. + # To preview how the proration is calculated, use the [create preview](https://stripe.com/docs/api/invoices/create_preview) endpoint. + # + # By default, we prorate subscription changes. For example, if a customer signs up on May 1 for a 100 price, they'll be billed 100 immediately. If on May 15 they switch to a 200 price, then on June 1 they'll be billed 250 (200 for a renewal of her subscription, plus a 50 prorating adjustment for half of the previous month's 100 difference). Similarly, a downgrade generates a credit that is applied to the next invoice. We also prorate when you make quantity changes. + # + # Switching prices does not normally change the billing date or generate an immediate charge unless: + # + # + # The billing interval is changed (for example, from monthly to yearly). + # The subscription moves from free to paid. + # A trial starts or ends. + # + # + # In these cases, we apply a credit for the unused time on the previous price, immediately charge the customer using the new price, and reset the billing date. Learn about how [Stripe immediately attempts payment for subscription changes](https://stripe.com/docs/billing/subscriptions/upgrade-downgrade#immediate-payment). + # + # If you want to charge for an upgrade immediately, pass proration_behavior as always_invoice to create prorations, automatically invoice the customer for those proration adjustments, and attempt to collect payment. If you pass create_prorations, the prorations are created but not automatically invoiced. If you want to bill the customer for the prorations before the subscription's renewal date, you need to manually [invoice the customer](https://stripe.com/docs/api/invoices/create). + # + # If you don't want to prorate, set the proration_behavior option to none. With this option, the customer is billed 100 on May 1 and 200 on June 1. Similarly, if you set proration_behavior to none when switching between different billing intervals (for example, from monthly to yearly), we don't generate any credits for the old subscription's unused time. We still reset the billing date and bill immediately for the new subscription. + # + # Updating the quantity on a subscription many times in an hour may result in [rate limiting. If you need to bill for a frequently changing quantity, consider integrating usage-based billing](https://stripe.com/docs/rate-limits) instead. + sig { + params(subscription_exposed_id: String, params: T.any(::Stripe::SubscriptionService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Subscription) + } + def update(subscription_exposed_id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/association_service.rbi b/rbi/stripe/services/tax/association_service.rbi new file mode 100644 index 000000000..766c8c9c7 --- /dev/null +++ b/rbi/stripe/services/tax/association_service.rbi @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class AssociationService < StripeService + class FindParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Valid [PaymentIntent](https://stripe.com/docs/api/payment_intents/object) id + sig { returns(String) } + attr_accessor :payment_intent + sig { params(expand: T::Array[String], payment_intent: String).void } + def initialize(expand: nil, payment_intent: nil); end + end + # Finds a tax association object by PaymentIntent id. + sig { + params(params: T.any(::Stripe::Tax::AssociationService::FindParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Association) + } + def find(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/calculation_line_item_service.rbi b/rbi/stripe/services/tax/calculation_line_item_service.rbi new file mode 100644 index 000000000..b104c2cd3 --- /dev/null +++ b/rbi/stripe/services/tax/calculation_line_item_service.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class CalculationLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Retrieves the line items of a tax calculation as a collection, if the calculation hasn't expired. + sig { + params(calculation: String, params: T.any(::Stripe::Tax::CalculationLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(calculation, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/calculation_service.rbi b/rbi/stripe/services/tax/calculation_service.rbi new file mode 100644 index 000000000..3eb4b7060 --- /dev/null +++ b/rbi/stripe/services/tax/calculation_service.rbi @@ -0,0 +1,228 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class CalculationService < StripeService + attr_reader :line_items + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class CustomerDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State, county, province, or region. We recommend sending [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code value when possible. + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: String, line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class TaxId < Stripe::RequestParams + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { params(type: String, value: String).void } + def initialize(type: nil, value: nil); end + end + # The customer's postal address (for example, home or business location). + sig { returns(::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::Address) } + attr_accessor :address + # The type of customer address provided. + sig { returns(String) } + attr_accessor :address_source + # The customer's IP address (IPv4 or IPv6). + sig { returns(String) } + attr_accessor :ip_address + # The customer's tax IDs. Stripe Tax might consider a transaction with applicable tax IDs to be B2B, which might affect the tax calculation result. Stripe Tax doesn't validate tax IDs for correctness. + sig { + returns(T::Array[::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::TaxId]) + } + attr_accessor :tax_ids + # Overrides the tax calculation result to allow you to not collect tax from your customer. Use this if you've manually checked your customer's tax exemptions. Prefer providing the customer's `tax_ids` where possible, which automatically determines whether `reverse_charge` applies. + sig { returns(String) } + attr_accessor :taxability_override + sig { + params(address: ::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::Address, address_source: String, ip_address: String, tax_ids: T::Array[::Stripe::Tax::CalculationService::CreateParams::CustomerDetails::TaxId], taxability_override: String).void + } + def initialize( + address: nil, + address_source: nil, + ip_address: nil, + tax_ids: nil, + taxability_override: nil + ); end + end + class LineItem < Stripe::RequestParams + # A positive integer representing the line item's total price in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + # If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + sig { returns(Integer) } + attr_accessor :amount + # If provided, the product's `tax_code` will be used as the line item's `tax_code`. + sig { returns(String) } + attr_accessor :product + # The number of units of the item being purchased. Used to calculate the per-unit price from the total `amount` for the line. For example, if `amount=100` and `quantity=4`, the calculated unit price is 25. + sig { returns(Integer) } + attr_accessor :quantity + # A custom identifier for this line item, which must be unique across the line items in the calculation. The reference helps identify each line item in exported [tax reports](https://stripe.com/docs/tax/reports). + sig { returns(String) } + attr_accessor :reference + # Specifies whether the `amount` includes taxes. Defaults to `exclusive`. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID to use for this line item. If not provided, we will use the tax code from the provided `product` param. If neither `tax_code` nor `product` is provided, we will use the default tax code from your Tax Settings. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(amount: Integer, product: String, quantity: Integer, reference: String, tax_behavior: String, tax_code: String).void + } + def initialize( + amount: nil, + product: nil, + quantity: nil, + reference: nil, + tax_behavior: nil, + tax_code: nil + ); end + end + class ShipFromDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(T.nilable(String)) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(T.nilable(String)) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(T.nilable(String)) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(T.nilable(String)) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(T.nilable(String)) } + attr_accessor :state + sig { + params(city: T.nilable(String), country: String, line1: T.nilable(String), line2: T.nilable(String), postal_code: T.nilable(String), state: T.nilable(String)).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The address from which the goods are being shipped from. + sig { returns(::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails::Address).void + } + def initialize(address: nil); end + end + class ShippingCost < Stripe::RequestParams + # A positive integer in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) representing the shipping charge. If `tax_behavior=inclusive`, then this amount includes taxes. Otherwise, taxes are calculated on top of this amount. + sig { returns(Integer) } + attr_accessor :amount + # If provided, the [shipping rate](https://stripe.com/docs/api/shipping_rates/object)'s `amount`, `tax_code` and `tax_behavior` are used. If you provide a shipping rate, then you cannot pass the `amount`, `tax_code`, or `tax_behavior` parameters. + sig { returns(String) } + attr_accessor :shipping_rate + # Specifies whether the `amount` includes taxes. If `tax_behavior=inclusive`, then the amount includes taxes. Defaults to `exclusive`. + sig { returns(String) } + attr_accessor :tax_behavior + # The [tax code](https://stripe.com/docs/tax/tax-categories) used to calculate tax on shipping. If not provided, the default shipping tax code from your [Tax Settings](https://dashboard.stripe.com/settings/tax) is used. + sig { returns(String) } + attr_accessor :tax_code + sig { + params(amount: Integer, shipping_rate: String, tax_behavior: String, tax_code: String).void + } + def initialize(amount: nil, shipping_rate: nil, tax_behavior: nil, tax_code: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # The ID of an existing customer to use for this calculation. If provided, the customer's address and tax IDs are copied to `customer_details`. + sig { returns(String) } + attr_accessor :customer + # Details about the customer, including address and tax IDs. + sig { returns(::Stripe::Tax::CalculationService::CreateParams::CustomerDetails) } + attr_accessor :customer_details + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A list of items the customer is purchasing. + sig { returns(T::Array[::Stripe::Tax::CalculationService::CreateParams::LineItem]) } + attr_accessor :line_items + # Details about the address from which the goods are being shipped. + sig { returns(::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails) } + attr_accessor :ship_from_details + # Shipping cost details to be used for the calculation. + sig { returns(::Stripe::Tax::CalculationService::CreateParams::ShippingCost) } + attr_accessor :shipping_cost + # Timestamp of date at which the tax rules and rates in effect applies for the calculation. Measured in seconds since the Unix epoch. Can be up to 48 hours in the past, and up to 48 hours in the future. + sig { returns(Integer) } + attr_accessor :tax_date + sig { + params(currency: String, customer: String, customer_details: ::Stripe::Tax::CalculationService::CreateParams::CustomerDetails, expand: T::Array[String], line_items: T::Array[::Stripe::Tax::CalculationService::CreateParams::LineItem], ship_from_details: ::Stripe::Tax::CalculationService::CreateParams::ShipFromDetails, shipping_cost: ::Stripe::Tax::CalculationService::CreateParams::ShippingCost, tax_date: Integer).void + } + def initialize( + currency: nil, + customer: nil, + customer_details: nil, + expand: nil, + line_items: nil, + ship_from_details: nil, + shipping_cost: nil, + tax_date: nil + ); end + end + # Calculates tax based on the input and returns a Tax Calculation object. + sig { + params(params: T.any(::Stripe::Tax::CalculationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Calculation) + } + def create(params = {}, opts = {}); end + + # Retrieves a Tax Calculation object, if the calculation hasn't expired. + sig { + params(calculation: String, params: T.any(::Stripe::Tax::CalculationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Calculation) + } + def retrieve(calculation, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/form_service.rbi b/rbi/stripe/services/tax/form_service.rbi new file mode 100644 index 000000000..79719cc3c --- /dev/null +++ b/rbi/stripe/services/tax/form_service.rbi @@ -0,0 +1,85 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class FormService < StripeService + class ListParams < Stripe::RequestParams + class Payee < Stripe::RequestParams + # The ID of the Stripe account whose forms will be retrieved. + sig { returns(String) } + attr_accessor :account + # The external reference to the payee whose forms will be retrieved. + sig { returns(String) } + attr_accessor :external_reference + # Specifies the payee type. Either `account` or `external_reference`. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, external_reference: String, type: String).void } + def initialize(account: nil, external_reference: nil, type: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The payee whose volume is represented on the tax form. + sig { returns(::Stripe::Tax::FormService::ListParams::Payee) } + attr_accessor :payee + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # An optional filter on the list, based on the object `type` field. Without the filter, the list includes all current and future tax form types. If your integration expects only one type of tax form in the response, make sure to provide a type value in the request. + sig { returns(String) } + attr_accessor :type + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, payee: ::Stripe::Tax::FormService::ListParams::Payee, starting_after: String, type: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + payee: nil, + starting_after: nil, + type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PdfParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of tax forms which were previously created. The tax forms are returned in sorted order, with the oldest tax forms appearing first. + sig { + params(params: T.any(::Stripe::Tax::FormService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Download the PDF for a tax form. + sig { + params(id: String, params: T.any(::Stripe::Tax::FormService::PdfParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped, read_body_chunk_block: T.untyped).returns(T.untyped) + } + def pdf(id, params = {}, opts = {}, &read_body_chunk_block); end + + # Retrieves the details of a tax form that has previously been created. Supply the unique tax form ID that was returned from your previous request, and Stripe will return the corresponding tax form information. + sig { + params(id: String, params: T.any(::Stripe::Tax::FormService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Form) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/registration_service.rbi b/rbi/stripe/services/tax/registration_service.rbi new file mode 100644 index 000000000..4ee51d45d --- /dev/null +++ b/rbi/stripe/services/tax/registration_service.rbi @@ -0,0 +1,1286 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class RegistrationService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # The status of the Tax Registration. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class CountryOptions < Stripe::RequestParams + class Ae < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class At < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Au < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Be < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Bg < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Bh < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class By < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ca < Stripe::RequestParams + class ProvinceStandard < Stripe::RequestParams + # Two-letter CA province code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + sig { returns(String) } + attr_accessor :province + sig { params(province: String).void } + def initialize(province: nil); end + end + # Options for the provincial tax registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca::ProvinceStandard) + } + attr_accessor :province_standard + # Type of registration to be created in Canada. + sig { returns(String) } + attr_accessor :type + sig { + params(province_standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca::ProvinceStandard, type: String).void + } + def initialize(province_standard: nil, type: nil); end + end + class Ch < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Cl < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Co < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Cr < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Cy < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Cz < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class De < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Dk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Ec < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ee < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Eg < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Es < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Fi < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Fr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Gb < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ge < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Gr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Hr < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Hu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Id < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ie < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Is < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class It < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Jp < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ke < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Kr < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Kz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Lt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Lu < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Lv < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Ma < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Md < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Mt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Mx < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class My < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ng < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Nl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class No < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Nz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Om < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Pl < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Pt < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Ro < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Rs < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Ru < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Sa < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Se < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Sg < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Si < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Sk < Stripe::RequestParams + class Standard < Stripe::RequestParams + # Place of supply scheme used in an EU standard registration. + sig { returns(String) } + attr_accessor :place_of_supply_scheme + sig { params(place_of_supply_scheme: String).void } + def initialize(place_of_supply_scheme: nil); end + end + # Options for the standard registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk::Standard) + } + attr_accessor :standard + # Type of registration to be created in an EU country. + sig { returns(String) } + attr_accessor :type + sig { + params(standard: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk::Standard, type: String).void + } + def initialize(standard: nil, type: nil); end + end + class Th < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Tr < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Tz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Us < Stripe::RequestParams + class LocalAmusementTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago), `06613` (Bloomington), `21696` (East Dundee), `24582` (Evanston), and `68081` (Schiller Park). + sig { returns(String) } + attr_accessor :jurisdiction + sig { params(jurisdiction: String).void } + def initialize(jurisdiction: nil); end + end + class LocalLeaseTax < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `14000` (Chicago). + sig { returns(String) } + attr_accessor :jurisdiction + sig { params(jurisdiction: String).void } + def initialize(jurisdiction: nil); end + end + class StateSalesTax < Stripe::RequestParams + class Election < Stripe::RequestParams + # A [FIPS code](https://www.census.gov/library/reference/code-lists/ansi.html) representing the local jurisdiction. Supported FIPS codes are: `003` (Allegheny County) and `60000` (Philadelphia City). + sig { returns(String) } + attr_accessor :jurisdiction + # The type of the election for the state sales tax registration. + sig { returns(String) } + attr_accessor :type + sig { params(jurisdiction: String, type: String).void } + def initialize(jurisdiction: nil, type: nil); end + end + # Elections for the state sales tax registration. + sig { + returns(T::Array[::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax::Election]) + } + attr_accessor :elections + sig { + params(elections: T::Array[::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax::Election]).void + } + def initialize(elections: nil); end + end + # Options for the local amusement tax registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalAmusementTax) + } + attr_accessor :local_amusement_tax + # Options for the local lease tax registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalLeaseTax) + } + attr_accessor :local_lease_tax + # Two-letter US state code ([ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2)). + sig { returns(String) } + attr_accessor :state + # Options for the state sales tax registration. + sig { + returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax) + } + attr_accessor :state_sales_tax + # Type of registration to be created in the US. + sig { returns(String) } + attr_accessor :type + sig { + params(local_amusement_tax: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalAmusementTax, local_lease_tax: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::LocalLeaseTax, state: String, state_sales_tax: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us::StateSalesTax, type: String).void + } + def initialize( + local_amusement_tax: nil, + local_lease_tax: nil, + state: nil, + state_sales_tax: nil, + type: nil + ); end + end + class Uz < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Vn < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + class Za < Stripe::RequestParams + # Type of registration to be created in `country`. + sig { returns(String) } + attr_accessor :type + sig { params(type: String).void } + def initialize(type: nil); end + end + # Options for the registration in AE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ae) } + attr_accessor :ae + # Options for the registration in AT. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At) } + attr_accessor :at + # Options for the registration in AU. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Au) } + attr_accessor :au + # Options for the registration in BE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be) } + attr_accessor :be + # Options for the registration in BG. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg) } + attr_accessor :bg + # Options for the registration in BH. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bh) } + attr_accessor :bh + # Options for the registration in BY. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::By) } + attr_accessor :by + # Options for the registration in CA. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca) } + attr_accessor :ca + # Options for the registration in CH. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ch) } + attr_accessor :ch + # Options for the registration in CL. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cl) } + attr_accessor :cl + # Options for the registration in CO. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Co) } + attr_accessor :co + # Options for the registration in CR. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cr) } + attr_accessor :cr + # Options for the registration in CY. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy) } + attr_accessor :cy + # Options for the registration in CZ. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz) } + attr_accessor :cz + # Options for the registration in DE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De) } + attr_accessor :de + # Options for the registration in DK. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk) } + attr_accessor :dk + # Options for the registration in EC. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ec) } + attr_accessor :ec + # Options for the registration in EE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee) } + attr_accessor :ee + # Options for the registration in EG. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Eg) } + attr_accessor :eg + # Options for the registration in ES. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es) } + attr_accessor :es + # Options for the registration in FI. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi) } + attr_accessor :fi + # Options for the registration in FR. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr) } + attr_accessor :fr + # Options for the registration in GB. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gb) } + attr_accessor :gb + # Options for the registration in GE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ge) } + attr_accessor :ge + # Options for the registration in GR. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr) } + attr_accessor :gr + # Options for the registration in HR. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr) } + attr_accessor :hr + # Options for the registration in HU. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu) } + attr_accessor :hu + # Options for the registration in ID. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Id) } + attr_accessor :id + # Options for the registration in IE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie) } + attr_accessor :ie + # Options for the registration in IS. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Is) } + attr_accessor :is + # Options for the registration in IT. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It) } + attr_accessor :it + # Options for the registration in JP. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Jp) } + attr_accessor :jp + # Options for the registration in KE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ke) } + attr_accessor :ke + # Options for the registration in KR. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kr) } + attr_accessor :kr + # Options for the registration in KZ. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kz) } + attr_accessor :kz + # Options for the registration in LT. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt) } + attr_accessor :lt + # Options for the registration in LU. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu) } + attr_accessor :lu + # Options for the registration in LV. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv) } + attr_accessor :lv + # Options for the registration in MA. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ma) } + attr_accessor :ma + # Options for the registration in MD. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Md) } + attr_accessor :md + # Options for the registration in MT. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt) } + attr_accessor :mt + # Options for the registration in MX. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mx) } + attr_accessor :mx + # Options for the registration in MY. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::My) } + attr_accessor :my + # Options for the registration in NG. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ng) } + attr_accessor :ng + # Options for the registration in NL. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl) } + attr_accessor :nl + # Options for the registration in NO. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::No) } + attr_accessor :no + # Options for the registration in NZ. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nz) } + attr_accessor :nz + # Options for the registration in OM. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Om) } + attr_accessor :om + # Options for the registration in PL. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl) } + attr_accessor :pl + # Options for the registration in PT. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt) } + attr_accessor :pt + # Options for the registration in RO. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro) } + attr_accessor :ro + # Options for the registration in RS. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Rs) } + attr_accessor :rs + # Options for the registration in RU. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ru) } + attr_accessor :ru + # Options for the registration in SA. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sa) } + attr_accessor :sa + # Options for the registration in SE. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se) } + attr_accessor :se + # Options for the registration in SG. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sg) } + attr_accessor :sg + # Options for the registration in SI. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si) } + attr_accessor :si + # Options for the registration in SK. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk) } + attr_accessor :sk + # Options for the registration in TH. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Th) } + attr_accessor :th + # Options for the registration in TR. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tr) } + attr_accessor :tr + # Options for the registration in TZ. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz) } + attr_accessor :tz + # Options for the registration in US. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us) } + attr_accessor :us + # Options for the registration in UZ. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uz) } + attr_accessor :uz + # Options for the registration in VN. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Vn) } + attr_accessor :vn + # Options for the registration in ZA. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Za) } + attr_accessor :za + sig { + params(ae: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ae, at: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::At, au: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Au, be: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Be, bg: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bg, bh: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Bh, by: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::By, ca: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ca, ch: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ch, cl: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cl, co: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Co, cr: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cr, cy: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cy, cz: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Cz, de: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::De, dk: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Dk, ec: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ec, ee: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ee, eg: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Eg, es: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Es, fi: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fi, fr: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Fr, gb: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gb, ge: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ge, gr: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Gr, hr: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hr, hu: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Hu, id: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Id, ie: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ie, is: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Is, it: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::It, jp: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Jp, ke: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ke, kr: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kr, kz: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Kz, lt: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lt, lu: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lu, lv: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Lv, ma: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ma, md: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Md, mt: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mt, mx: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Mx, my: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::My, ng: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ng, nl: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nl, no: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::No, nz: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Nz, om: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Om, pl: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pl, pt: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Pt, ro: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ro, rs: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Rs, ru: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Ru, sa: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sa, se: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Se, sg: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sg, si: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Si, sk: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Sk, th: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Th, tr: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tr, tz: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Tz, us: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Us, uz: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Uz, vn: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Vn, za: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions::Za).void + } + def initialize( + ae: nil, + at: nil, + au: nil, + be: nil, + bg: nil, + bh: nil, + by: nil, + ca: nil, + ch: nil, + cl: nil, + co: nil, + cr: nil, + cy: nil, + cz: nil, + de: nil, + dk: nil, + ec: nil, + ee: nil, + eg: nil, + es: nil, + fi: nil, + fr: nil, + gb: nil, + ge: nil, + gr: nil, + hr: nil, + hu: nil, + id: nil, + ie: nil, + is: nil, + it: nil, + jp: nil, + ke: nil, + kr: nil, + kz: nil, + lt: nil, + lu: nil, + lv: nil, + ma: nil, + md: nil, + mt: nil, + mx: nil, + my: nil, + ng: nil, + nl: nil, + no: nil, + nz: nil, + om: nil, + pl: nil, + pt: nil, + ro: nil, + rs: nil, + ru: nil, + sa: nil, + se: nil, + sg: nil, + si: nil, + sk: nil, + th: nil, + tr: nil, + tz: nil, + us: nil, + uz: nil, + vn: nil, + za: nil + ); end + end + # Time at which the Tax Registration becomes active. It can be either `now` to indicate the current time, or a future timestamp measured in seconds since the Unix epoch. + sig { returns(T.any(String, Integer)) } + attr_accessor :active_from + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Specific options for a registration in the specified `country`. + sig { returns(::Stripe::Tax::RegistrationService::CreateParams::CountryOptions) } + attr_accessor :country_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If set, the Tax Registration stops being active at this time. If not set, the Tax Registration will be active indefinitely. Timestamp measured in seconds since the Unix epoch. + sig { returns(Integer) } + attr_accessor :expires_at + sig { + params(active_from: T.any(String, Integer), country: String, country_options: ::Stripe::Tax::RegistrationService::CreateParams::CountryOptions, expand: T::Array[String], expires_at: Integer).void + } + def initialize( + active_from: nil, + country: nil, + country_options: nil, + expand: nil, + expires_at: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Time at which the registration becomes active. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + sig { returns(T.any(String, Integer)) } + attr_accessor :active_from + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # If set, the registration stops being active at this time. If not set, the registration will be active indefinitely. It can be either `now` to indicate the current time, or a timestamp measured in seconds since the Unix epoch. + sig { returns(T.nilable(T.any(String, Integer))) } + attr_accessor :expires_at + sig { + params(active_from: T.any(String, Integer), expand: T::Array[String], expires_at: T.nilable(T.any(String, Integer))).void + } + def initialize(active_from: nil, expand: nil, expires_at: nil); end + end + # Creates a new Tax Registration object. + sig { + params(params: T.any(::Stripe::Tax::RegistrationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration) + } + def create(params = {}, opts = {}); end + + # Returns a list of Tax Registration objects. + sig { + params(params: T.any(::Stripe::Tax::RegistrationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Returns a Tax Registration object. + sig { + params(id: String, params: T.any(::Stripe::Tax::RegistrationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration) + } + def retrieve(id, params = {}, opts = {}); end + + # Updates an existing Tax Registration object. + # + # A registration cannot be deleted after it has been created. If you wish to end a registration you may do so by setting expires_at. + sig { + params(id: String, params: T.any(::Stripe::Tax::RegistrationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Registration) + } + def update(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/settings_service.rbi b/rbi/stripe/services/tax/settings_service.rbi new file mode 100644 index 000000000..4d58ab7ab --- /dev/null +++ b/rbi/stripe/services/tax/settings_service.rbi @@ -0,0 +1,93 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class SettingsService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Defaults < Stripe::RequestParams + # Specifies the default [tax behavior](https://stripe.com/docs/tax/products-prices-tax-categories-tax-behavior#tax-behavior) to be used when the item's price has unspecified tax behavior. One of inclusive, exclusive, or inferred_by_currency. Once specified, it cannot be changed back to null. + sig { returns(String) } + attr_accessor :tax_behavior + # A [tax code](https://stripe.com/docs/tax/tax-categories) ID. + sig { returns(String) } + attr_accessor :tax_code + sig { params(tax_behavior: String, tax_code: String).void } + def initialize(tax_behavior: nil, tax_code: nil); end + end + class HeadOffice < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State/province as an [ISO 3166-2](https://en.wikipedia.org/wiki/ISO_3166-2) subdivision code, without country prefix. Example: "NY" or "TX". + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The location of the business for tax purposes. + sig { returns(::Stripe::Tax::SettingsService::UpdateParams::HeadOffice::Address) } + attr_accessor :address + sig { + params(address: ::Stripe::Tax::SettingsService::UpdateParams::HeadOffice::Address).void + } + def initialize(address: nil); end + end + # Default configuration to be used on Stripe Tax calculations. + sig { returns(::Stripe::Tax::SettingsService::UpdateParams::Defaults) } + attr_accessor :defaults + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The place where your business is located. + sig { returns(::Stripe::Tax::SettingsService::UpdateParams::HeadOffice) } + attr_accessor :head_office + sig { + params(defaults: ::Stripe::Tax::SettingsService::UpdateParams::Defaults, expand: T::Array[String], head_office: ::Stripe::Tax::SettingsService::UpdateParams::HeadOffice).void + } + def initialize(defaults: nil, expand: nil, head_office: nil); end + end + # Retrieves Tax Settings for a merchant. + sig { + params(params: T.any(::Stripe::Tax::SettingsService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Settings) + } + def retrieve(params = {}, opts = {}); end + + # Updates Tax Settings parameters used in tax calculations. All parameters are editable but none can be removed once set. + sig { + params(params: T.any(::Stripe::Tax::SettingsService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Settings) + } + def update(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/transaction_line_item_service.rbi b/rbi/stripe/services/tax/transaction_line_item_service.rbi new file mode 100644 index 000000000..38e20b5fb --- /dev/null +++ b/rbi/stripe/services/tax/transaction_line_item_service.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class TransactionLineItemService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + # Retrieves the line items of a committed standalone transaction as a collection. + sig { + params(transaction: String, params: T.any(::Stripe::Tax::TransactionLineItemService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(transaction, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax/transaction_service.rbi b/rbi/stripe/services/tax/transaction_service.rbi new file mode 100644 index 000000000..b718f9abb --- /dev/null +++ b/rbi/stripe/services/tax/transaction_service.rbi @@ -0,0 +1,142 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Tax + class TransactionService < StripeService + attr_reader :line_items + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateFromCalculationParams < Stripe::RequestParams + # Tax Calculation ID to be used as input when creating the transaction. + sig { returns(String) } + attr_accessor :calculation + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The Unix timestamp representing when the tax liability is assumed or reduced, which determines the liability posting period and handling in tax liability reports. The timestamp must fall within the `tax_date` and the current time, unless the `tax_date` is scheduled in advance. Defaults to the current time. + sig { returns(Integer) } + attr_accessor :posted_at + # A custom order or sale identifier, such as 'myOrder_123'. Must be unique across all transactions, including reversals. + sig { returns(String) } + attr_accessor :reference + sig { + params(calculation: String, expand: T::Array[String], metadata: T::Hash[String, String], posted_at: Integer, reference: String).void + } + def initialize( + calculation: nil, + expand: nil, + metadata: nil, + posted_at: nil, + reference: nil + ); end + end + class CreateReversalParams < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount_tax + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The `id` of the line item to reverse in the original transaction. + sig { returns(String) } + attr_accessor :original_line_item + # The quantity reversed. Appears in [tax exports](https://stripe.com/docs/tax/reports), but does not affect the amount of tax reversed. + sig { returns(Integer) } + attr_accessor :quantity + # A custom identifier for this line item in the reversal transaction, such as 'L1-refund'. + sig { returns(String) } + attr_accessor :reference + sig { + params(amount: Integer, amount_tax: Integer, metadata: T::Hash[String, String], original_line_item: String, quantity: Integer, reference: String).void + } + def initialize( + amount: nil, + amount_tax: nil, + metadata: nil, + original_line_item: nil, + quantity: nil, + reference: nil + ); end + end + class ShippingCost < Stripe::RequestParams + # The amount to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount + # The amount of tax to reverse, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. + sig { returns(Integer) } + attr_accessor :amount_tax + sig { params(amount: Integer, amount_tax: Integer).void } + def initialize(amount: nil, amount_tax: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A flat amount to reverse across the entire transaction, in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) in negative. This value represents the total amount to refund from the transaction, including taxes. + sig { returns(Integer) } + attr_accessor :flat_amount + # The line item amounts to reverse. + sig { returns(T::Array[::Stripe::Tax::TransactionService::CreateReversalParams::LineItem]) } + attr_accessor :line_items + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If `partial`, the provided line item or shipping cost amounts are reversed. If `full`, the original transaction is fully reversed. + sig { returns(String) } + attr_accessor :mode + # The ID of the Transaction to partially or fully reverse. + sig { returns(String) } + attr_accessor :original_transaction + # A custom identifier for this reversal, such as `myOrder_123-refund_1`, which must be unique across all transactions. The reference helps identify this reversal transaction in exported [tax reports](https://stripe.com/docs/tax/reports). + sig { returns(String) } + attr_accessor :reference + # The shipping cost to reverse. + sig { returns(::Stripe::Tax::TransactionService::CreateReversalParams::ShippingCost) } + attr_accessor :shipping_cost + sig { + params(expand: T::Array[String], flat_amount: Integer, line_items: T::Array[::Stripe::Tax::TransactionService::CreateReversalParams::LineItem], metadata: T::Hash[String, String], mode: String, original_transaction: String, reference: String, shipping_cost: ::Stripe::Tax::TransactionService::CreateReversalParams::ShippingCost).void + } + def initialize( + expand: nil, + flat_amount: nil, + line_items: nil, + metadata: nil, + mode: nil, + original_transaction: nil, + reference: nil, + shipping_cost: nil + ); end + end + # Creates a Tax Transaction from a calculation, if that calculation hasn't expired. Calculations expire after 90 days. + sig { + params(params: T.any(::Stripe::Tax::TransactionService::CreateFromCalculationParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction) + } + def create_from_calculation(params = {}, opts = {}); end + + # Partially or fully reverses a previously created Transaction. + sig { + params(params: T.any(::Stripe::Tax::TransactionService::CreateReversalParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction) + } + def create_reversal(params = {}, opts = {}); end + + # Retrieves a Tax Transaction object. + sig { + params(transaction: String, params: T.any(::Stripe::Tax::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Tax::Transaction) + } + def retrieve(transaction, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax_code_service.rbi b/rbi/stripe/services/tax_code_service.rbi new file mode 100644 index 000000000..57ad97902 --- /dev/null +++ b/rbi/stripe/services/tax_code_service.rbi @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TaxCodeService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # A list of [all tax codes available](https://stripe.com/docs/tax/tax-categories) to add to Products in order to allow specific tax calculations. + sig { + params(params: T.any(::Stripe::TaxCodeService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing tax code. Supply the unique tax code ID and Stripe will return the corresponding tax code information. + sig { + params(id: String, params: T.any(::Stripe::TaxCodeService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxCode) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax_id_service.rbi b/rbi/stripe/services/tax_id_service.rbi new file mode 100644 index 000000000..0ae5a7cac --- /dev/null +++ b/rbi/stripe/services/tax_id_service.rbi @@ -0,0 +1,112 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TaxIdService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + sig { returns(String) } + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + sig { returns(String) } + attr_accessor :customer + # Type of owner referenced. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, customer: String, type: String).void } + def initialize(account: nil, customer: nil, type: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + sig { returns(::Stripe::TaxIdService::ListParams::Owner) } + attr_accessor :owner + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, owner: ::Stripe::TaxIdService::ListParams::Owner, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + limit: nil, + owner: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Owner < Stripe::RequestParams + # Account the tax ID belongs to. Required when `type=account` + sig { returns(String) } + attr_accessor :account + # Customer the tax ID belongs to. Required when `type=customer` + sig { returns(String) } + attr_accessor :customer + # Type of owner referenced. + sig { returns(String) } + attr_accessor :type + sig { params(account: String, customer: String, type: String).void } + def initialize(account: nil, customer: nil, type: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The account or customer the tax ID belongs to. Defaults to `owner[type]=self`. + sig { returns(::Stripe::TaxIdService::CreateParams::Owner) } + attr_accessor :owner + # Type of the tax ID, one of `ad_nrt`, `ae_trn`, `am_tin`, `ao_tin`, `ar_cuit`, `au_abn`, `au_arn`, `ba_tin`, `bb_tin`, `bg_uic`, `bh_vat`, `bo_tin`, `br_cnpj`, `br_cpf`, `bs_tin`, `by_tin`, `ca_bn`, `ca_gst_hst`, `ca_pst_bc`, `ca_pst_mb`, `ca_pst_sk`, `ca_qst`, `cd_nif`, `ch_uid`, `ch_vat`, `cl_tin`, `cn_tin`, `co_nit`, `cr_tin`, `de_stn`, `do_rcn`, `ec_ruc`, `eg_tin`, `es_cif`, `eu_oss_vat`, `eu_vat`, `gb_vat`, `ge_vat`, `gn_nif`, `hk_br`, `hr_oib`, `hu_tin`, `id_npwp`, `il_vat`, `in_gst`, `is_vat`, `jp_cn`, `jp_rn`, `jp_trn`, `ke_pin`, `kh_tin`, `kr_brn`, `kz_bin`, `li_uid`, `li_vat`, `ma_vat`, `md_vat`, `me_pib`, `mk_vat`, `mr_nif`, `mx_rfc`, `my_frp`, `my_itn`, `my_sst`, `ng_tin`, `no_vat`, `no_voec`, `np_pan`, `nz_gst`, `om_vat`, `pe_ruc`, `ph_tin`, `ro_tin`, `rs_pib`, `ru_inn`, `ru_kpp`, `sa_vat`, `sg_gst`, `sg_uen`, `si_tin`, `sn_ninea`, `sr_fin`, `sv_nit`, `th_vat`, `tj_tin`, `tr_tin`, `tw_vat`, `tz_vat`, `ua_vat`, `ug_tin`, `us_ein`, `uy_ruc`, `uz_tin`, `uz_vat`, `ve_rif`, `vn_tin`, `za_vat`, `zm_tin`, or `zw_tin` + sig { returns(String) } + attr_accessor :type + # Value of the tax ID. + sig { returns(String) } + attr_accessor :value + sig { + params(expand: T::Array[String], owner: ::Stripe::TaxIdService::CreateParams::Owner, type: String, value: String).void + } + def initialize(expand: nil, owner: nil, type: nil, value: nil); end + end + # Creates a new account or customer tax_id object. + sig { + params(params: T.any(::Stripe::TaxIdService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def create(params = {}, opts = {}); end + + # Deletes an existing account or customer tax_id object. + sig { + params(id: String, params: T.any(::Stripe::TaxIdService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def delete(id, params = {}, opts = {}); end + + # Returns a list of tax IDs. + sig { + params(params: T.any(::Stripe::TaxIdService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves an account or customer tax_id object. + sig { + params(id: String, params: T.any(::Stripe::TaxIdService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxId) + } + def retrieve(id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax_rate_service.rbi b/rbi/stripe/services/tax_rate_service.rbi new file mode 100644 index 000000000..f0f4c5bb8 --- /dev/null +++ b/rbi/stripe/services/tax_rate_service.rbi @@ -0,0 +1,183 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TaxRateService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Optional flag to filter by tax rates that are either active or inactive (archived). + sig { returns(T::Boolean) } + attr_accessor :active + # Optional range for filtering created date. + sig { returns(T.any(::Stripe::TaxRateService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Optional flag to filter by tax rates that are inclusive (or those that are not inclusive). + sig { returns(T::Boolean) } + attr_accessor :inclusive + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(active: T::Boolean, created: T.any(::Stripe::TaxRateService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], inclusive: T::Boolean, limit: Integer, starting_after: String).void + } + def initialize( + active: nil, + created: nil, + ending_before: nil, + expand: nil, + inclusive: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + sig { returns(T::Boolean) } + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # This specifies if the tax rate is inclusive or exclusive. + sig { returns(T::Boolean) } + attr_accessor :inclusive + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # This represents the tax rate percent out of 100. + sig { returns(Float) } + attr_accessor :percentage + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(active: T::Boolean, country: String, description: String, display_name: String, expand: T::Array[String], inclusive: T::Boolean, jurisdiction: String, metadata: T::Hash[String, String], percentage: Float, state: String, tax_type: String).void + } + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + inclusive: nil, + jurisdiction: nil, + metadata: nil, + percentage: nil, + state: nil, + tax_type: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Flag determining whether the tax rate is active or inactive (archived). Inactive tax rates cannot be used with new applications or Checkout Sessions, but will still work for subscriptions and invoices that already have it set. + sig { returns(T::Boolean) } + attr_accessor :active + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # An arbitrary string attached to the tax rate for your internal use only. It will not be visible to your customers. + sig { returns(String) } + attr_accessor :description + # The display name of the tax rate, which will be shown to users. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The jurisdiction for the tax rate. You can use this label field for tax reporting purposes. It also appears on your customer’s invoice. + sig { returns(String) } + attr_accessor :jurisdiction + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # [ISO 3166-2 subdivision code](https://en.wikipedia.org/wiki/ISO_3166-2:US), without country prefix. For example, "NY" for New York, United States. + sig { returns(String) } + attr_accessor :state + # The high-level tax type, such as `vat` or `sales_tax`. + sig { returns(String) } + attr_accessor :tax_type + sig { + params(active: T::Boolean, country: String, description: String, display_name: String, expand: T::Array[String], jurisdiction: String, metadata: T.nilable(T::Hash[String, String]), state: String, tax_type: String).void + } + def initialize( + active: nil, + country: nil, + description: nil, + display_name: nil, + expand: nil, + jurisdiction: nil, + metadata: nil, + state: nil, + tax_type: nil + ); end + end + # Creates a new tax rate. + sig { + params(params: T.any(::Stripe::TaxRateService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate) + } + def create(params = {}, opts = {}); end + + # Returns a list of your tax rates. Tax rates are returned sorted by creation date, with the most recently created tax rates appearing first. + sig { + params(params: T.any(::Stripe::TaxRateService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a tax rate with the given ID + sig { + params(tax_rate: String, params: T.any(::Stripe::TaxRateService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate) + } + def retrieve(tax_rate, params = {}, opts = {}); end + + # Updates an existing tax rate. + sig { + params(tax_rate: String, params: T.any(::Stripe::TaxRateService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TaxRate) + } + def update(tax_rate, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/tax_service.rbi b/rbi/stripe/services/tax_service.rbi new file mode 100644 index 000000000..c4122f5c9 --- /dev/null +++ b/rbi/stripe/services/tax_service.rbi @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TaxService < StripeService + attr_reader :associations + attr_reader :calculations + attr_reader :forms + attr_reader :registrations + attr_reader :settings + attr_reader :transactions + end +end \ No newline at end of file diff --git a/rbi/stripe/services/terminal/configuration_service.rbi b/rbi/stripe/services/terminal/configuration_service.rbi new file mode 100644 index 000000000..c3b85dc2b --- /dev/null +++ b/rbi/stripe/services/terminal/configuration_service.rbi @@ -0,0 +1,822 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Terminal + class ConfigurationService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + sig { returns(Integer) } + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + sig { returns(Integer) } + attr_accessor :start_hour + sig { params(end_hour: Integer, start_hour: Integer).void } + def initialize(end_hour: nil, start_hour: nil); end + end + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + # Tipping configuration for AUD + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Aud) } + attr_accessor :aud + # Tipping configuration for CAD + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Cad) } + attr_accessor :cad + # Tipping configuration for CHF + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Chf) } + attr_accessor :chf + # Tipping configuration for CZK + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Czk) } + attr_accessor :czk + # Tipping configuration for DKK + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Dkk) } + attr_accessor :dkk + # Tipping configuration for EUR + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Eur) } + attr_accessor :eur + # Tipping configuration for GBP + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Gbp) } + attr_accessor :gbp + # Tipping configuration for HKD + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Hkd) } + attr_accessor :hkd + # Tipping configuration for MYR + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Myr) } + attr_accessor :myr + # Tipping configuration for NOK + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nok) } + attr_accessor :nok + # Tipping configuration for NZD + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nzd) } + attr_accessor :nzd + # Tipping configuration for PLN + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Pln) } + attr_accessor :pln + # Tipping configuration for SEK + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sek) } + attr_accessor :sek + # Tipping configuration for SGD + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sgd) } + attr_accessor :sgd + # Tipping configuration for USD + sig { returns(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Usd) } + attr_accessor :usd + sig { + params(aud: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Aud, cad: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Cad, chf: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Chf, czk: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Czk, dkk: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Dkk, eur: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Eur, gbp: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Gbp, hkd: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Hkd, myr: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Myr, nok: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nok, nzd: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Nzd, pln: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Pln, sek: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sek, sgd: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Sgd, usd: ::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping::Usd).void + } + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ); end + end + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + sig { + returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::BbposWiseposE)) + } + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Name of the configuration + sig { returns(String) } + attr_accessor :name + # Configurations for collecting transactions offline. + sig { returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Offline)) } + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + sig { + returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::RebootWindow)) + } + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + sig { + returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::StripeS700)) + } + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + sig { returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping)) } + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + sig { + returns(T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::VerifoneP400)) + } + attr_accessor :verifone_p400 + sig { + params(bbpos_wisepos_e: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::BbposWiseposE), expand: T::Array[String], name: String, offline: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Offline), reboot_window: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::RebootWindow), stripe_s700: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::StripeS700), tipping: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::Tipping), verifone_p400: T.nilable(::Stripe::Terminal::ConfigurationService::UpdateParams::VerifoneP400)).void + } + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # if present, only return the account default or non-default configurations. + sig { returns(T::Boolean) } + attr_accessor :is_account_default + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], is_account_default: T::Boolean, limit: Integer, starting_after: String).void + } + def initialize( + ending_before: nil, + expand: nil, + is_account_default: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class BbposWiseposE < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Offline < Stripe::RequestParams + # Determines whether to allow transactions to be collected while reader is offline. Defaults to false. + sig { returns(T::Boolean) } + attr_accessor :enabled + sig { params(enabled: T::Boolean).void } + def initialize(enabled: nil); end + end + class RebootWindow < Stripe::RequestParams + # Integer between 0 to 23 that represents the end hour of the reboot time window. The value must be different than the start_hour. + sig { returns(Integer) } + attr_accessor :end_hour + # Integer between 0 to 23 that represents the start hour of the reboot time window. + sig { returns(Integer) } + attr_accessor :start_hour + sig { params(end_hour: Integer, start_hour: Integer).void } + def initialize(end_hour: nil, start_hour: nil); end + end + class StripeS700 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + class Tipping < Stripe::RequestParams + class Aud < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Cad < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Chf < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Czk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Dkk < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Eur < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Gbp < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Hkd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Myr < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nok < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Nzd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Pln < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sek < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Sgd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + class Usd < Stripe::RequestParams + # Fixed amounts displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :fixed_amounts + # Percentages displayed when collecting a tip + sig { returns(T::Array[Integer]) } + attr_accessor :percentages + # Below this amount, fixed amounts will be displayed; above it, percentages will be displayed + sig { returns(Integer) } + attr_accessor :smart_tip_threshold + sig { + params(fixed_amounts: T::Array[Integer], percentages: T::Array[Integer], smart_tip_threshold: Integer).void + } + def initialize(fixed_amounts: nil, percentages: nil, smart_tip_threshold: nil); end + end + # Tipping configuration for AUD + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Aud) } + attr_accessor :aud + # Tipping configuration for CAD + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Cad) } + attr_accessor :cad + # Tipping configuration for CHF + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Chf) } + attr_accessor :chf + # Tipping configuration for CZK + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Czk) } + attr_accessor :czk + # Tipping configuration for DKK + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Dkk) } + attr_accessor :dkk + # Tipping configuration for EUR + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Eur) } + attr_accessor :eur + # Tipping configuration for GBP + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Gbp) } + attr_accessor :gbp + # Tipping configuration for HKD + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Hkd) } + attr_accessor :hkd + # Tipping configuration for MYR + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Myr) } + attr_accessor :myr + # Tipping configuration for NOK + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nok) } + attr_accessor :nok + # Tipping configuration for NZD + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nzd) } + attr_accessor :nzd + # Tipping configuration for PLN + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Pln) } + attr_accessor :pln + # Tipping configuration for SEK + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sek) } + attr_accessor :sek + # Tipping configuration for SGD + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sgd) } + attr_accessor :sgd + # Tipping configuration for USD + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Usd) } + attr_accessor :usd + sig { + params(aud: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Aud, cad: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Cad, chf: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Chf, czk: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Czk, dkk: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Dkk, eur: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Eur, gbp: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Gbp, hkd: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Hkd, myr: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Myr, nok: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nok, nzd: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Nzd, pln: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Pln, sek: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sek, sgd: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Sgd, usd: ::Stripe::Terminal::ConfigurationService::CreateParams::Tipping::Usd).void + } + def initialize( + aud: nil, + cad: nil, + chf: nil, + czk: nil, + dkk: nil, + eur: nil, + gbp: nil, + hkd: nil, + myr: nil, + nok: nil, + nzd: nil, + pln: nil, + sek: nil, + sgd: nil, + usd: nil + ); end + end + class VerifoneP400 < Stripe::RequestParams + # A File ID representing an image you would like displayed on the reader. + sig { returns(T.nilable(String)) } + attr_accessor :splashscreen + sig { params(splashscreen: T.nilable(String)).void } + def initialize(splashscreen: nil); end + end + # An object containing device type specific settings for BBPOS WisePOS E readers + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::BbposWiseposE) } + attr_accessor :bbpos_wisepos_e + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Name of the configuration + sig { returns(String) } + attr_accessor :name + # Configurations for collecting transactions offline. + sig { returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Offline)) } + attr_accessor :offline + # Reboot time settings for readers that support customized reboot time configuration. + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::RebootWindow) } + attr_accessor :reboot_window + # An object containing device type specific settings for Stripe S700 readers + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::StripeS700) } + attr_accessor :stripe_s700 + # Tipping configurations for readers supporting on-reader tips + sig { returns(T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping)) } + attr_accessor :tipping + # An object containing device type specific settings for Verifone P400 readers + sig { returns(::Stripe::Terminal::ConfigurationService::CreateParams::VerifoneP400) } + attr_accessor :verifone_p400 + sig { + params(bbpos_wisepos_e: ::Stripe::Terminal::ConfigurationService::CreateParams::BbposWiseposE, expand: T::Array[String], name: String, offline: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Offline), reboot_window: ::Stripe::Terminal::ConfigurationService::CreateParams::RebootWindow, stripe_s700: ::Stripe::Terminal::ConfigurationService::CreateParams::StripeS700, tipping: T.nilable(::Stripe::Terminal::ConfigurationService::CreateParams::Tipping), verifone_p400: ::Stripe::Terminal::ConfigurationService::CreateParams::VerifoneP400).void + } + def initialize( + bbpos_wisepos_e: nil, + expand: nil, + name: nil, + offline: nil, + reboot_window: nil, + stripe_s700: nil, + tipping: nil, + verifone_p400: nil + ); end + end + # Creates a new Configuration object. + sig { + params(params: T.any(::Stripe::Terminal::ConfigurationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def create(params = {}, opts = {}); end + + # Deletes a Configuration object. + sig { + params(configuration: String, params: T.any(::Stripe::Terminal::ConfigurationService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def delete(configuration, params = {}, opts = {}); end + + # Returns a list of Configuration objects. + sig { + params(params: T.any(::Stripe::Terminal::ConfigurationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Configuration object. + sig { + params(configuration: String, params: T.any(::Stripe::Terminal::ConfigurationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def retrieve(configuration, params = {}, opts = {}); end + + # Updates a new Configuration object. + sig { + params(configuration: String, params: T.any(::Stripe::Terminal::ConfigurationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Configuration) + } + def update(configuration, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/terminal/connection_token_service.rbi b/rbi/stripe/services/terminal/connection_token_service.rbi new file mode 100644 index 000000000..36149cc09 --- /dev/null +++ b/rbi/stripe/services/terminal/connection_token_service.rbi @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Terminal + class ConnectionTokenService < StripeService + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The id of the location that this connection token is scoped to. If specified the connection token will only be usable with readers assigned to that location, otherwise the connection token will be usable with all readers. Note that location scoping only applies to internet-connected readers. For more details, see [the docs on scoping connection tokens](https://docs.stripe.com/terminal/fleet/locations-and-zones?dashboard-or-api=api#connection-tokens). + sig { returns(String) } + attr_accessor :location + sig { params(expand: T::Array[String], location: String).void } + def initialize(expand: nil, location: nil); end + end + # To connect to a reader the Stripe Terminal SDK needs to retrieve a short-lived connection token from Stripe, proxied through your server. On your backend, add an endpoint that creates and returns a connection token. + sig { + params(params: T.any(::Stripe::Terminal::ConnectionTokenService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::ConnectionToken) + } + def create(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/terminal/location_service.rbi b/rbi/stripe/services/terminal/location_service.rbi new file mode 100644 index 000000000..32d786350 --- /dev/null +++ b/rbi/stripe/services/terminal/location_service.rbi @@ -0,0 +1,184 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Terminal + class LocationService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The full address of the location. You can't change the location's `country`. If you need to modify the `country` field, create a new `Location` object and re-register any existing readers to that location. + sig { returns(::Stripe::Terminal::LocationService::UpdateParams::Address) } + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + sig { returns(T.nilable(String)) } + attr_accessor :configuration_overrides + # A name for the location. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(address: ::Stripe::Terminal::LocationService::UpdateParams::Address, configuration_overrides: T.nilable(String), display_name: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # The full address of the location. + sig { returns(::Stripe::Terminal::LocationService::CreateParams::Address) } + attr_accessor :address + # The ID of a configuration that will be used to customize all readers in this location. + sig { returns(String) } + attr_accessor :configuration_overrides + # A name for the location. Maximum length is 1000 characters. + sig { returns(String) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(address: ::Stripe::Terminal::LocationService::CreateParams::Address, configuration_overrides: String, display_name: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize( + address: nil, + configuration_overrides: nil, + display_name: nil, + expand: nil, + metadata: nil + ); end + end + # Creates a new Location object. + # For further details, including which address fields are required in each country, see the [Manage locations](https://stripe.com/docs/terminal/fleet/locations) guide. + sig { + params(params: T.any(::Stripe::Terminal::LocationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def create(params = {}, opts = {}); end + + # Deletes a Location object. + sig { + params(location: String, params: T.any(::Stripe::Terminal::LocationService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def delete(location, params = {}, opts = {}); end + + # Returns a list of Location objects. + sig { + params(params: T.any(::Stripe::Terminal::LocationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a Location object. + sig { + params(location: String, params: T.any(::Stripe::Terminal::LocationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def retrieve(location, params = {}, opts = {}); end + + # Updates a Location object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(location: String, params: T.any(::Stripe::Terminal::LocationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Location) + } + def update(location, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/terminal/reader_collected_data_service.rbi b/rbi/stripe/services/terminal/reader_collected_data_service.rbi new file mode 100644 index 000000000..47acded8c --- /dev/null +++ b/rbi/stripe/services/terminal/reader_collected_data_service.rbi @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Terminal + class ReaderCollectedDataService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieve data collected using Reader hardware. + sig { + params(reader_collected_data: String, params: T.any(::Stripe::Terminal::ReaderCollectedDataService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::ReaderCollectedData) + } + def retrieve(reader_collected_data, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/terminal/reader_service.rbi b/rbi/stripe/services/terminal/reader_service.rbi new file mode 100644 index 000000000..dd52eca6a --- /dev/null +++ b/rbi/stripe/services/terminal/reader_service.rbi @@ -0,0 +1,513 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Terminal + class ReaderService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The new label of the reader. + sig { returns(T.nilable(String)) } + attr_accessor :label + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], label: T.nilable(String), metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(expand: nil, label: nil, metadata: nil); end + end + class ListParams < Stripe::RequestParams + # Filters readers by device type + sig { returns(String) } + attr_accessor :device_type + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A location ID to filter the response list to only readers at the specific location + sig { returns(String) } + attr_accessor :location + # Filters readers by serial number + sig { returns(String) } + attr_accessor :serial_number + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # A status filter to filter readers to only offline or online readers + sig { returns(String) } + attr_accessor :status + sig { + params(device_type: String, ending_before: String, expand: T::Array[String], limit: Integer, location: String, serial_number: String, starting_after: String, status: String).void + } + def initialize( + device_type: nil, + ending_before: nil, + expand: nil, + limit: nil, + location: nil, + serial_number: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Custom label given to the reader for easier identification. If no label is specified, the registration code will be used. + sig { returns(String) } + attr_accessor :label + # The location to assign the reader to. + sig { returns(String) } + attr_accessor :location + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # A code generated by the reader used for registering to an account. + sig { returns(String) } + attr_accessor :registration_code + sig { + params(expand: T::Array[String], label: String, location: String, metadata: T.nilable(T::Hash[String, String]), registration_code: String).void + } + def initialize( + expand: nil, + label: nil, + location: nil, + metadata: nil, + registration_code: nil + ); end + end + class CancelActionParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CollectInputsParams < Stripe::RequestParams + class Input < Stripe::RequestParams + class CustomText < Stripe::RequestParams + # The description which will be displayed when collecting this input + sig { returns(String) } + attr_accessor :description + # The skip button text + sig { returns(String) } + attr_accessor :skip_button + # The submit button text + sig { returns(String) } + attr_accessor :submit_button + # The title which will be displayed when collecting this input + sig { returns(String) } + attr_accessor :title + sig { + params(description: String, skip_button: String, submit_button: String, title: String).void + } + def initialize(description: nil, skip_button: nil, submit_button: nil, title: nil); end + end + class Selection < Stripe::RequestParams + class Choice < Stripe::RequestParams + # The style of the button which will be shown for this choice + sig { returns(String) } + attr_accessor :style + # The text which will be shown on the button for this choice + sig { returns(String) } + attr_accessor :value + sig { params(style: String, value: String).void } + def initialize(style: nil, value: nil); end + end + # List of choices for the `selection` input + sig { + returns(T::Array[::Stripe::Terminal::ReaderService::CollectInputsParams::Input::Selection::Choice]) + } + attr_accessor :choices + sig { + params(choices: T::Array[::Stripe::Terminal::ReaderService::CollectInputsParams::Input::Selection::Choice]).void + } + def initialize(choices: nil); end + end + class Toggle < Stripe::RequestParams + # The default value of the toggle + sig { returns(String) } + attr_accessor :default_value + # The description which will be displayed for the toggle + sig { returns(String) } + attr_accessor :description + # The title which will be displayed for the toggle + sig { returns(String) } + attr_accessor :title + sig { params(default_value: String, description: String, title: String).void } + def initialize(default_value: nil, description: nil, title: nil); end + end + # Customize the text which will be displayed while collecting this input + sig { returns(::Stripe::Terminal::ReaderService::CollectInputsParams::Input::CustomText) } + attr_accessor :custom_text + # Indicate that this input is required, disabling the skip button + sig { returns(T::Boolean) } + attr_accessor :required + # Options for the `selection` input + sig { returns(::Stripe::Terminal::ReaderService::CollectInputsParams::Input::Selection) } + attr_accessor :selection + # List of toggles to be displayed and customization for the toggles + sig { + returns(T::Array[::Stripe::Terminal::ReaderService::CollectInputsParams::Input::Toggle]) + } + attr_accessor :toggles + # The type of input to collect + sig { returns(String) } + attr_accessor :type + sig { + params(custom_text: ::Stripe::Terminal::ReaderService::CollectInputsParams::Input::CustomText, required: T::Boolean, selection: ::Stripe::Terminal::ReaderService::CollectInputsParams::Input::Selection, toggles: T::Array[::Stripe::Terminal::ReaderService::CollectInputsParams::Input::Toggle], type: String).void + } + def initialize( + custom_text: nil, + required: nil, + selection: nil, + toggles: nil, + type: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # List of inputs to be collected using the Reader + sig { returns(T::Array[::Stripe::Terminal::ReaderService::CollectInputsParams::Input]) } + attr_accessor :inputs + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + sig { + params(expand: T::Array[String], inputs: T::Array[::Stripe::Terminal::ReaderService::CollectInputsParams::Input], metadata: T::Hash[String, String]).void + } + def initialize(expand: nil, inputs: nil, metadata: nil); end + end + class CollectPaymentMethodParams < Stripe::RequestParams + class CollectConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :amount_eligible + sig { params(amount_eligible: Integer).void } + def initialize(amount_eligible: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(String) } + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T::Boolean) } + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + sig { + returns(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig::Tipping) + } + attr_accessor :tipping + sig { + params(allow_redisplay: String, enable_customer_cancellation: T::Boolean, skip_tipping: T::Boolean, tipping: ::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig::Tipping).void + } + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ); end + end + # Configuration overrides + sig { + returns(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig) + } + attr_accessor :collect_config + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # PaymentIntent ID + sig { returns(String) } + attr_accessor :payment_intent + sig { + params(collect_config: ::Stripe::Terminal::ReaderService::CollectPaymentMethodParams::CollectConfig, expand: T::Array[String], payment_intent: String).void + } + def initialize(collect_config: nil, expand: nil, payment_intent: nil); end + end + class ConfirmPaymentIntentParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # PaymentIntent ID + sig { returns(String) } + attr_accessor :payment_intent + sig { params(expand: T::Array[String], payment_intent: String).void } + def initialize(expand: nil, payment_intent: nil); end + end + class ProcessPaymentIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + class Tipping < Stripe::RequestParams + # Amount used to calculate tip suggestions on tipping selection screen for this transaction. Must be a positive integer in the smallest currency unit (e.g., 100 cents to represent $1.00 or 100 to represent ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :amount_eligible + sig { params(amount_eligible: Integer).void } + def initialize(amount_eligible: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(String) } + attr_accessor :allow_redisplay + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + # Override showing a tipping selection screen on this transaction. + sig { returns(T::Boolean) } + attr_accessor :skip_tipping + # Tipping configuration for this transaction. + sig { + returns(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig::Tipping) + } + attr_accessor :tipping + sig { + params(allow_redisplay: String, enable_customer_cancellation: T::Boolean, skip_tipping: T::Boolean, tipping: ::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig::Tipping).void + } + def initialize( + allow_redisplay: nil, + enable_customer_cancellation: nil, + skip_tipping: nil, + tipping: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # PaymentIntent ID + sig { returns(String) } + attr_accessor :payment_intent + # Configuration overrides + sig { + returns(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig) + } + attr_accessor :process_config + sig { + params(expand: T::Array[String], payment_intent: String, process_config: ::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams::ProcessConfig).void + } + def initialize(expand: nil, payment_intent: nil, process_config: nil); end + end + class ProcessSetupIntentParams < Stripe::RequestParams + class ProcessConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + sig { params(enable_customer_cancellation: T::Boolean).void } + def initialize(enable_customer_cancellation: nil); end + end + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. + sig { returns(String) } + attr_accessor :allow_redisplay + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Configuration overrides + sig { returns(::Stripe::Terminal::ReaderService::ProcessSetupIntentParams::ProcessConfig) } + attr_accessor :process_config + # SetupIntent ID + sig { returns(String) } + attr_accessor :setup_intent + sig { + params(allow_redisplay: String, expand: T::Array[String], process_config: ::Stripe::Terminal::ReaderService::ProcessSetupIntentParams::ProcessConfig, setup_intent: String).void + } + def initialize( + allow_redisplay: nil, + expand: nil, + process_config: nil, + setup_intent: nil + ); end + end + class RefundPaymentParams < Stripe::RequestParams + class RefundPaymentConfig < Stripe::RequestParams + # Enables cancel button on transaction screens. + sig { returns(T::Boolean) } + attr_accessor :enable_customer_cancellation + sig { params(enable_customer_cancellation: T::Boolean).void } + def initialize(enable_customer_cancellation: nil); end + end + # A positive integer in __cents__ representing how much of this charge to refund. + sig { returns(Integer) } + attr_accessor :amount + # ID of the Charge to refund. + sig { returns(String) } + attr_accessor :charge + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # ID of the PaymentIntent to refund. + sig { returns(String) } + attr_accessor :payment_intent + # Boolean indicating whether the application fee should be refunded when refunding this charge. If a full charge refund is given, the full application fee will be refunded. Otherwise, the application fee will be refunded in an amount proportional to the amount of the charge refunded. An application fee can be refunded only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :refund_application_fee + # Configuration overrides + sig { returns(::Stripe::Terminal::ReaderService::RefundPaymentParams::RefundPaymentConfig) } + attr_accessor :refund_payment_config + # Boolean indicating whether the transfer should be reversed when refunding this charge. The transfer will be reversed proportionally to the amount being refunded (either the entire or partial amount). A transfer can be reversed only by the application that created the charge. + sig { returns(T::Boolean) } + attr_accessor :reverse_transfer + sig { + params(amount: Integer, charge: String, expand: T::Array[String], metadata: T::Hash[String, String], payment_intent: String, refund_application_fee: T::Boolean, refund_payment_config: ::Stripe::Terminal::ReaderService::RefundPaymentParams::RefundPaymentConfig, reverse_transfer: T::Boolean).void + } + def initialize( + amount: nil, + charge: nil, + expand: nil, + metadata: nil, + payment_intent: nil, + refund_application_fee: nil, + refund_payment_config: nil, + reverse_transfer: nil + ); end + end + class SetReaderDisplayParams < Stripe::RequestParams + class Cart < Stripe::RequestParams + class LineItem < Stripe::RequestParams + # The price of the item in cents. + sig { returns(Integer) } + attr_accessor :amount + # The description or name of the item. + sig { returns(String) } + attr_accessor :description + # The quantity of the line item being purchased. + sig { returns(Integer) } + attr_accessor :quantity + sig { params(amount: Integer, description: String, quantity: Integer).void } + def initialize(amount: nil, description: nil, quantity: nil); end + end + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Array of line items that were purchased. + sig { + returns(T::Array[::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart::LineItem]) + } + attr_accessor :line_items + # The amount of tax in cents. + sig { returns(Integer) } + attr_accessor :tax + # Total balance of cart due in cents. + sig { returns(Integer) } + attr_accessor :total + sig { + params(currency: String, line_items: T::Array[::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart::LineItem], tax: Integer, total: Integer).void + } + def initialize(currency: nil, line_items: nil, tax: nil, total: nil); end + end + # Cart + sig { returns(::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart) } + attr_accessor :cart + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Type + sig { returns(String) } + attr_accessor :type + sig { + params(cart: ::Stripe::Terminal::ReaderService::SetReaderDisplayParams::Cart, expand: T::Array[String], type: String).void + } + def initialize(cart: nil, expand: nil, type: nil); end + end + # Cancels the current reader action. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::CancelActionParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def cancel_action(reader, params = {}, opts = {}); end + + # Initiates an input collection flow on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::CollectInputsParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def collect_inputs(reader, params = {}, opts = {}); end + + # Initiates a payment flow on a Reader and updates the PaymentIntent with card details before manual confirmation. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::CollectPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def collect_payment_method(reader, params = {}, opts = {}); end + + # Finalizes a payment on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::ConfirmPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def confirm_payment_intent(reader, params = {}, opts = {}); end + + # Creates a new Reader object. + sig { + params(params: T.any(::Stripe::Terminal::ReaderService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def create(params = {}, opts = {}); end + + # Deletes a Reader object. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def delete(reader, params = {}, opts = {}); end + + # Returns a list of Reader objects. + sig { + params(params: T.any(::Stripe::Terminal::ReaderService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Initiates a payment flow on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::ProcessPaymentIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def process_payment_intent(reader, params = {}, opts = {}); end + + # Initiates a setup intent flow on a Reader. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::ProcessSetupIntentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def process_setup_intent(reader, params = {}, opts = {}); end + + # Initiates a refund on a Reader + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::RefundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def refund_payment(reader, params = {}, opts = {}); end + + # Retrieves a Reader object. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def retrieve(reader, params = {}, opts = {}); end + + # Sets reader display to show cart details. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::SetReaderDisplayParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def set_reader_display(reader, params = {}, opts = {}); end + + # Updates a Reader object by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + sig { + params(reader: String, params: T.any(::Stripe::Terminal::ReaderService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def update(reader, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/terminal_service.rbi b/rbi/stripe/services/terminal_service.rbi new file mode 100644 index 000000000..a9c47918a --- /dev/null +++ b/rbi/stripe/services/terminal_service.rbi @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TerminalService < StripeService + attr_reader :configurations + attr_reader :connection_tokens + attr_reader :locations + attr_reader :readers + attr_reader :reader_collected_data + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/confirmation_token_service.rbi b/rbi/stripe/services/test_helpers/confirmation_token_service.rbi new file mode 100644 index 000000000..c3f86ce81 --- /dev/null +++ b/rbi/stripe/services/test_helpers/confirmation_token_service.rbi @@ -0,0 +1,778 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class ConfirmationTokenService < StripeService + class CreateParams < Stripe::RequestParams + class PaymentMethodData < Stripe::RequestParams + class AcssDebit < Stripe::RequestParams + # Customer's bank account number. + sig { returns(String) } + attr_accessor :account_number + # Institution number of the customer's bank. + sig { returns(String) } + attr_accessor :institution_number + # Transit number of the customer's bank. + sig { returns(String) } + attr_accessor :transit_number + sig { + params(account_number: String, institution_number: String, transit_number: String).void + } + def initialize(account_number: nil, institution_number: nil, transit_number: nil); end + end + class Affirm < Stripe::RequestParams + + end + class AfterpayClearpay < Stripe::RequestParams + + end + class Alipay < Stripe::RequestParams + + end + class Alma < Stripe::RequestParams + + end + class AmazonPay < Stripe::RequestParams + + end + class AuBecsDebit < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + sig { params(account_number: String, bsb_number: String).void } + def initialize(account_number: nil, bsb_number: nil); end + end + class BacsDebit < Stripe::RequestParams + # Account number of the bank account that the funds will be debited from. + sig { returns(String) } + attr_accessor :account_number + # Sort code of the bank account. (e.g., `10-20-30`) + sig { returns(String) } + attr_accessor :sort_code + sig { params(account_number: String, sort_code: String).void } + def initialize(account_number: nil, sort_code: nil); end + end + class Bancontact < Stripe::RequestParams + + end + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class Blik < Stripe::RequestParams + + end + class Boleto < Stripe::RequestParams + # The tax ID of the customer (CPF for individual consumers or CNPJ for businesses consumers) + sig { returns(String) } + attr_accessor :tax_id + sig { params(tax_id: String).void } + def initialize(tax_id: nil); end + end + class Cashapp < Stripe::RequestParams + + end + class CustomerBalance < Stripe::RequestParams + + end + class Eps < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Fpx < Stripe::RequestParams + # Account holder type for FPX transaction + sig { returns(String) } + attr_accessor :account_holder_type + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(account_holder_type: String, bank: String).void } + def initialize(account_holder_type: nil, bank: nil); end + end + class Giropay < Stripe::RequestParams + + end + class Gopay < Stripe::RequestParams + + end + class Grabpay < Stripe::RequestParams + + end + class IdBankTransfer < Stripe::RequestParams + # Bank where the account is held. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Ideal < Stripe::RequestParams + # The customer's bank. Only use this parameter for existing customers. Don't use it for new customers. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class InteracPresent < Stripe::RequestParams + + end + class KakaoPay < Stripe::RequestParams + + end + class Klarna < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna::Dob).void + } + def initialize(dob: nil); end + end + class Konbini < Stripe::RequestParams + + end + class KrCard < Stripe::RequestParams + + end + class Link < Stripe::RequestParams + + end + class MbWay < Stripe::RequestParams + + end + class Mobilepay < Stripe::RequestParams + + end + class Multibanco < Stripe::RequestParams + + end + class NaverPay < Stripe::RequestParams + # Whether to use Naver Pay points or a card to fund this transaction. If not provided, this defaults to `card`. + sig { returns(String) } + attr_accessor :funding + sig { params(funding: String).void } + def initialize(funding: nil); end + end + class Oxxo < Stripe::RequestParams + + end + class P24 < Stripe::RequestParams + # The customer's bank. + sig { returns(String) } + attr_accessor :bank + sig { params(bank: String).void } + def initialize(bank: nil); end + end + class Payco < Stripe::RequestParams + + end + class Paynow < Stripe::RequestParams + + end + class Paypal < Stripe::RequestParams + + end + class Payto < Stripe::RequestParams + # The account number for the bank account. + sig { returns(String) } + attr_accessor :account_number + # Bank-State-Branch number of the bank account. + sig { returns(String) } + attr_accessor :bsb_number + # The PayID alias for the bank account. + sig { returns(String) } + attr_accessor :pay_id + sig { params(account_number: String, bsb_number: String, pay_id: String).void } + def initialize(account_number: nil, bsb_number: nil, pay_id: nil); end + end + class Pix < Stripe::RequestParams + + end + class Promptpay < Stripe::RequestParams + + end + class Qris < Stripe::RequestParams + + end + class RadarOptions < Stripe::RequestParams + # A [Radar Session](https://stripe.com/docs/radar/radar-session) is a snapshot of the browser metadata and device details that help Radar make more accurate predictions on your payments. + sig { returns(String) } + attr_accessor :session + sig { params(session: String).void } + def initialize(session: nil); end + end + class Rechnung < Stripe::RequestParams + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + # Customer's date of birth + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Rechnung::Dob) + } + attr_accessor :dob + sig { + params(dob: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Rechnung::Dob).void + } + def initialize(dob: nil); end + end + class RevolutPay < Stripe::RequestParams + + end + class SamsungPay < Stripe::RequestParams + + end + class SepaDebit < Stripe::RequestParams + # IBAN of the bank account. + sig { returns(String) } + attr_accessor :iban + sig { params(iban: String).void } + def initialize(iban: nil); end + end + class Shopeepay < Stripe::RequestParams + + end + class Sofort < Stripe::RequestParams + # Two-letter ISO code representing the country the bank account is located in. + sig { returns(String) } + attr_accessor :country + sig { params(country: String).void } + def initialize(country: nil); end + end + class Swish < Stripe::RequestParams + + end + class Twint < Stripe::RequestParams + + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + class WechatPay < Stripe::RequestParams + + end + class Zip < Stripe::RequestParams + + end + # If this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AcssDebit) + } + attr_accessor :acss_debit + # If this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Affirm) + } + attr_accessor :affirm + # If this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AfterpayClearpay) + } + attr_accessor :afterpay_clearpay + # If this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alipay) + } + attr_accessor :alipay + # This field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`. + sig { returns(String) } + attr_accessor :allow_redisplay + # If this is a Alma PaymentMethod, this hash contains details about the Alma payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alma) + } + attr_accessor :alma + # If this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AmazonPay) + } + attr_accessor :amazon_pay + # If this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AuBecsDebit) + } + attr_accessor :au_becs_debit + # If this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BacsDebit) + } + attr_accessor :bacs_debit + # If this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Bancontact) + } + attr_accessor :bancontact + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # If this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Blik) + } + attr_accessor :blik + # If this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Boleto) + } + attr_accessor :boleto + # If this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp) + } + attr_accessor :cashapp + # If this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance) + } + attr_accessor :customer_balance + # If this is an `eps` PaymentMethod, this hash contains details about the EPS payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Eps) + } + attr_accessor :eps + # If this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Fpx) + } + attr_accessor :fpx + # If this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Giropay) + } + attr_accessor :giropay + # If this is a Gopay PaymentMethod, this hash contains details about the Gopay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Gopay) + } + attr_accessor :gopay + # If this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Grabpay) + } + attr_accessor :grabpay + # If this is an `IdBankTransfer` PaymentMethod, this hash contains details about the IdBankTransfer payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::IdBankTransfer) + } + attr_accessor :id_bank_transfer + # If this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Ideal) + } + attr_accessor :ideal + # If this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::InteracPresent) + } + attr_accessor :interac_present + # If this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KakaoPay) + } + attr_accessor :kakao_pay + # If this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna) + } + attr_accessor :klarna + # If this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Konbini) + } + attr_accessor :konbini + # If this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KrCard) + } + attr_accessor :kr_card + # If this is an `Link` PaymentMethod, this hash contains details about the Link payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Link) + } + attr_accessor :link + # If this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::MbWay) + } + attr_accessor :mb_way + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # If this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Mobilepay) + } + attr_accessor :mobilepay + # If this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Multibanco) + } + attr_accessor :multibanco + # If this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NaverPay) + } + attr_accessor :naver_pay + # If this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Oxxo) + } + attr_accessor :oxxo + # If this is a `p24` PaymentMethod, this hash contains details about the P24 payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::P24) + } + attr_accessor :p24 + # If this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payco) + } + attr_accessor :payco + # If this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paynow) + } + attr_accessor :paynow + # If this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paypal) + } + attr_accessor :paypal + # If this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payto) + } + attr_accessor :payto + # If this is a `pix` PaymentMethod, this hash contains details about the Pix payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Pix) + } + attr_accessor :pix + # If this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Promptpay) + } + attr_accessor :promptpay + # If this is a `qris` PaymentMethod, this hash contains details about the QRIS payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Qris) + } + attr_accessor :qris + # Options to configure Radar. See [Radar Session](https://stripe.com/docs/radar/radar-session) for more information. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RadarOptions) + } + attr_accessor :radar_options + # If this is a `rechnung` PaymentMethod, this hash contains details about the Rechnung payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Rechnung) + } + attr_accessor :rechnung + # If this is a `Revolut Pay` PaymentMethod, this hash contains details about the Revolut Pay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RevolutPay) + } + attr_accessor :revolut_pay + # If this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SamsungPay) + } + attr_accessor :samsung_pay + # If this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SepaDebit) + } + attr_accessor :sepa_debit + # If this is a Shopeepay PaymentMethod, this hash contains details about the Shopeepay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Shopeepay) + } + attr_accessor :shopeepay + # If this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Sofort) + } + attr_accessor :sofort + # If this is a `swish` PaymentMethod, this hash contains details about the Swish payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Swish) + } + attr_accessor :swish + # If this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Twint) + } + attr_accessor :twint + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # If this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + # If this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::WechatPay) + } + attr_accessor :wechat_pay + # If this is a `zip` PaymentMethod, this hash contains details about the Zip payment method. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Zip) + } + attr_accessor :zip + sig { + params(acss_debit: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AcssDebit, affirm: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Affirm, afterpay_clearpay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AfterpayClearpay, alipay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alipay, allow_redisplay: String, alma: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Alma, amazon_pay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AmazonPay, au_becs_debit: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::AuBecsDebit, bacs_debit: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BacsDebit, bancontact: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Bancontact, billing_details: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::BillingDetails, blik: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Blik, boleto: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Boleto, cashapp: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Cashapp, customer_balance: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::CustomerBalance, eps: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Eps, fpx: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Fpx, giropay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Giropay, gopay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Gopay, grabpay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Grabpay, id_bank_transfer: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::IdBankTransfer, ideal: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Ideal, interac_present: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::InteracPresent, kakao_pay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KakaoPay, klarna: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Klarna, konbini: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Konbini, kr_card: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::KrCard, link: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Link, mb_way: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::MbWay, metadata: T::Hash[String, String], mobilepay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Mobilepay, multibanco: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Multibanco, naver_pay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::NaverPay, oxxo: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Oxxo, p24: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::P24, payco: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payco, paynow: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paynow, paypal: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Paypal, payto: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Payto, pix: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Pix, promptpay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Promptpay, qris: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Qris, radar_options: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RadarOptions, rechnung: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Rechnung, revolut_pay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::RevolutPay, samsung_pay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SamsungPay, sepa_debit: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::SepaDebit, shopeepay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Shopeepay, sofort: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Sofort, swish: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Swish, twint: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Twint, type: String, us_bank_account: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::UsBankAccount, wechat_pay: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::WechatPay, zip: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData::Zip).void + } + def initialize( + acss_debit: nil, + affirm: nil, + afterpay_clearpay: nil, + alipay: nil, + allow_redisplay: nil, + alma: nil, + amazon_pay: nil, + au_becs_debit: nil, + bacs_debit: nil, + bancontact: nil, + billing_details: nil, + blik: nil, + boleto: nil, + cashapp: nil, + customer_balance: nil, + eps: nil, + fpx: nil, + giropay: nil, + gopay: nil, + grabpay: nil, + id_bank_transfer: nil, + ideal: nil, + interac_present: nil, + kakao_pay: nil, + klarna: nil, + konbini: nil, + kr_card: nil, + link: nil, + mb_way: nil, + metadata: nil, + mobilepay: nil, + multibanco: nil, + naver_pay: nil, + oxxo: nil, + p24: nil, + payco: nil, + paynow: nil, + paypal: nil, + payto: nil, + pix: nil, + promptpay: nil, + qris: nil, + radar_options: nil, + rechnung: nil, + revolut_pay: nil, + samsung_pay: nil, + sepa_debit: nil, + shopeepay: nil, + sofort: nil, + swish: nil, + twint: nil, + type: nil, + us_bank_account: nil, + wechat_pay: nil, + zip: nil + ); end + end + class Shipping < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Shipping address + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping::Address) + } + attr_accessor :address + # Recipient name. + sig { returns(String) } + attr_accessor :name + # Recipient phone (including extension) + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping::Address, name: String, phone: T.nilable(String)).void + } + def initialize(address: nil, name: nil, phone: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # ID of an existing PaymentMethod. + sig { returns(String) } + attr_accessor :payment_method + # If provided, this hash will be used to create a PaymentMethod. + sig { + returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData) + } + attr_accessor :payment_method_data + # Return URL used to confirm the Intent. + sig { returns(String) } + attr_accessor :return_url + # Indicates that you intend to make future payments with this ConfirmationToken's payment method. + # + # The presence of this property will [attach the payment method](https://stripe.com/docs/payments/save-during-payment) to the PaymentIntent's Customer, if present, after the PaymentIntent is confirmed and any required actions from the user are complete. + sig { returns(String) } + attr_accessor :setup_future_usage + # Shipping information for this ConfirmationToken. + sig { returns(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping) } + attr_accessor :shipping + sig { + params(expand: T::Array[String], payment_method: String, payment_method_data: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::PaymentMethodData, return_url: String, setup_future_usage: String, shipping: ::Stripe::TestHelpers::ConfirmationTokenService::CreateParams::Shipping).void + } + def initialize( + expand: nil, + payment_method: nil, + payment_method_data: nil, + return_url: nil, + setup_future_usage: nil, + shipping: nil + ); end + end + # Creates a test mode Confirmation Token server side for your integration tests. + sig { + params(params: T.any(::Stripe::TestHelpers::ConfirmationTokenService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ConfirmationToken) + } + def create(params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/customer_service.rbi b/rbi/stripe/services/test_helpers/customer_service.rbi new file mode 100644 index 000000000..e824aef76 --- /dev/null +++ b/rbi/stripe/services/test_helpers/customer_service.rbi @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class CustomerService < StripeService + class FundCashBalanceParams < Stripe::RequestParams + # Amount to be used for this test cash balance transaction. A positive integer representing how much to fund in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal) (e.g., 100 cents to fund $1.00 or 100 to fund ¥100, a zero-decimal currency). + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A description of the test funding. This simulates free-text references supplied by customers when making bank transfers to their cash balance. You can use this to test how Stripe's [reconciliation algorithm](https://stripe.com/docs/payments/customer-balance/reconciliation) applies to different user inputs. + sig { returns(String) } + attr_accessor :reference + sig { + params(amount: Integer, currency: String, expand: T::Array[String], reference: String).void + } + def initialize(amount: nil, currency: nil, expand: nil, reference: nil); end + end + # Create an incoming testmode bank transfer + sig { + params(customer: String, params: T.any(::Stripe::TestHelpers::CustomerService::FundCashBalanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::CustomerCashBalanceTransaction) + } + def fund_cash_balance(customer, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi b/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi new file mode 100644 index 000000000..4658118ab --- /dev/null +++ b/rbi/stripe/services/test_helpers/issuing/authorization_service.rbi @@ -0,0 +1,836 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Issuing + class AuthorizationService < StripeService + class CreateParams < Stripe::RequestParams + class AmountDetails < Stripe::RequestParams + # The ATM withdrawal fee. + sig { returns(Integer) } + attr_accessor :atm_fee + # The amount of cash requested by the cardholder. + sig { returns(Integer) } + attr_accessor :cashback_amount + sig { params(atm_fee: Integer, cashback_amount: Integer).void } + def initialize(atm_fee: nil, cashback_amount: nil); end + end + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + sig { returns(String) } + attr_accessor :category + # City where the seller is located + sig { returns(String) } + attr_accessor :city + # Country where the seller is located + sig { returns(String) } + attr_accessor :country + # Name of the seller + sig { returns(String) } + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + sig { returns(String) } + attr_accessor :network_id + # Postal code where the seller is located + sig { returns(String) } + attr_accessor :postal_code + # State where the seller is located + sig { returns(String) } + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + sig { returns(String) } + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + sig { returns(String) } + attr_accessor :url + sig { + params(category: String, city: String, country: String, name: String, network_id: String, postal_code: String, state: String, terminal_id: String, url: String).void + } + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ); end + end + class NetworkData < Stripe::RequestParams + # Identifier assigned to the acquirer by the card network. + sig { returns(String) } + attr_accessor :acquiring_institution_id + sig { params(acquiring_institution_id: String).void } + def initialize(acquiring_institution_id: nil); end + end + class VerificationData < Stripe::RequestParams + class AuthenticationExemption < Stripe::RequestParams + # The entity that requested the exemption, either the acquiring merchant or the Issuing user. + sig { returns(String) } + attr_accessor :claimed_by + # The specific exemption claimed for this authorization. + sig { returns(String) } + attr_accessor :type + sig { params(claimed_by: String, type: String).void } + def initialize(claimed_by: nil, type: nil); end + end + class ThreeDSecure < Stripe::RequestParams + # The outcome of the 3D Secure authentication request. + sig { returns(String) } + attr_accessor :result + sig { params(result: String).void } + def initialize(result: nil); end + end + # Whether the cardholder provided an address first line and if it matched the cardholder’s `billing.address.line1`. + sig { returns(String) } + attr_accessor :address_line1_check + # Whether the cardholder provided a postal code and if it matched the cardholder’s `billing.address.postal_code`. + sig { returns(String) } + attr_accessor :address_postal_code_check + # The exemption applied to this authorization. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::AuthenticationExemption) + } + attr_accessor :authentication_exemption + # Whether the cardholder provided a CVC and if it matched Stripe’s record. + sig { returns(String) } + attr_accessor :cvc_check + # Whether the cardholder provided an expiry date and if it matched Stripe’s record. + sig { returns(String) } + attr_accessor :expiry_check + # 3D Secure details. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::ThreeDSecure) + } + attr_accessor :three_d_secure + sig { + params(address_line1_check: String, address_postal_code_check: String, authentication_exemption: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::AuthenticationExemption, cvc_check: String, expiry_check: String, three_d_secure: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData::ThreeDSecure).void + } + def initialize( + address_line1_check: nil, + address_postal_code_check: nil, + authentication_exemption: nil, + cvc_check: nil, + expiry_check: nil, + three_d_secure: nil + ); end + end + # The total amount to attempt to authorize. This amount is in the provided currency, or defaults to the card's currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Detailed breakdown of amount components. These amounts are denominated in `currency` and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::AmountDetails) + } + attr_accessor :amount_details + # How the card details were provided. Defaults to online. + sig { returns(String) } + attr_accessor :authorization_method + # Card associated with this authorization. + sig { returns(String) } + attr_accessor :card + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Fleet-specific information for authorizations using Fleet cards. + sig { returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet) } + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + sig { returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fuel) } + attr_accessor :fuel + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + sig { returns(T::Boolean) } + attr_accessor :is_amount_controllable + # The total amount to attempt to authorize. This amount is in the provided merchant currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :merchant_amount + # The currency of the authorization. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :merchant_currency + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::MerchantData) + } + attr_accessor :merchant_data + # Details about the authorization, such as identifiers, set by the card network. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::NetworkData) + } + attr_accessor :network_data + # Verifications that Stripe performed on information that the cardholder provided to the merchant. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData) + } + attr_accessor :verification_data + # The digital wallet used for this transaction. One of `apple_pay`, `google_pay`, or `samsung_pay`. Will populate as `null` when no digital wallet was utilized. + sig { returns(String) } + attr_accessor :wallet + sig { + params(amount: Integer, amount_details: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::AmountDetails, authorization_method: String, card: String, currency: String, expand: T::Array[String], fleet: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fleet, fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::Fuel, is_amount_controllable: T::Boolean, merchant_amount: Integer, merchant_currency: String, merchant_data: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::MerchantData, network_data: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::NetworkData, verification_data: ::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams::VerificationData, wallet: String).void + } + def initialize( + amount: nil, + amount_details: nil, + authorization_method: nil, + card: nil, + currency: nil, + expand: nil, + fleet: nil, + fuel: nil, + is_amount_controllable: nil, + merchant_amount: nil, + merchant_currency: nil, + merchant_data: nil, + network_data: nil, + verification_data: nil, + wallet: nil + ); end + end + class CaptureParams < Stripe::RequestParams + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + sig { returns(String) } + attr_accessor :arrival_airport_code + # The airline carrier code. + sig { returns(String) } + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + sig { returns(String) } + attr_accessor :departure_airport_code + # The flight number. + sig { returns(String) } + attr_accessor :flight_number + # The flight's service class. + sig { returns(String) } + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + sig { returns(T::Boolean) } + attr_accessor :stopover_allowed + sig { + params(arrival_airport_code: String, carrier: String, departure_airport_code: String, flight_number: String, service_class: String, stopover_allowed: T::Boolean).void + } + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ); end + end + # The time that the flight departed. + sig { returns(Integer) } + attr_accessor :departure_at + # The name of the passenger. + sig { returns(String) } + attr_accessor :passenger_name + # Whether the ticket is refundable. + sig { returns(T::Boolean) } + attr_accessor :refundable + # The legs of the trip. + sig { + returns(T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight::Segment]) + } + attr_accessor :segments + # The travel agency that issued the ticket. + sig { returns(String) } + attr_accessor :travel_agency + sig { + params(departure_at: Integer, passenger_name: String, refundable: T::Boolean, segments: T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight::Segment], travel_agency: String).void + } + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + sig { returns(Integer) } + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + sig { returns(Integer) } + attr_accessor :nights + sig { params(check_in_at: Integer, nights: Integer).void } + def initialize(check_in_at: nil, nights: nil); end + end + class Receipt < Stripe::RequestParams + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # Attribute for param field quantity + sig { returns(String) } + attr_accessor :quantity + # Attribute for param field total + sig { returns(Integer) } + attr_accessor :total + # Attribute for param field unit_cost + sig { returns(Integer) } + attr_accessor :unit_cost + sig { + params(description: String, quantity: String, total: Integer, unit_cost: Integer).void + } + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + end + # Fleet-specific information for transactions using Fleet cards. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet) + } + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight) + } + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fuel) + } + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Lodging) + } + attr_accessor :lodging + # The line items in the purchase. + sig { + returns(T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Receipt]) + } + attr_accessor :receipt + # A merchant-specific order number. + sig { returns(String) } + attr_accessor :reference + sig { + params(fleet: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fleet, flight: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Flight, fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Fuel, lodging: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Lodging, receipt: T::Array[::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails::Receipt], reference: String).void + } + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ); end + end + # The amount to capture from the authorization. If not provided, the full amount of the authorization will be captured. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :capture_amount + # Whether to close the authorization after capture. Defaults to true. Set to false to enable multi-capture flows. + sig { returns(T::Boolean) } + attr_accessor :close_authorization + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Additional purchase information that is optionally provided by the merchant. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails) + } + attr_accessor :purchase_details + sig { + params(capture_amount: Integer, close_authorization: T::Boolean, expand: T::Array[String], purchase_details: ::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams::PurchaseDetails).void + } + def initialize( + capture_amount: nil, + close_authorization: nil, + expand: nil, + purchase_details: nil + ); end + end + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FinalizeAmountParams < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The final authorization amount that will be captured by the merchant. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :final_amount + # Fleet-specific information for authorizations using Fleet cards. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet) + } + attr_accessor :fleet + # Information about fuel that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fuel) + } + attr_accessor :fuel + sig { + params(expand: T::Array[String], final_amount: Integer, fleet: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fleet, fuel: ::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams::Fuel).void + } + def initialize(expand: nil, final_amount: nil, fleet: nil, fuel: nil); end + end + class RespondParams < Stripe::RequestParams + # Whether to simulate the user confirming that the transaction was legitimate (true) or telling Stripe that it was fraudulent (false). + sig { returns(T::Boolean) } + attr_accessor :confirmed + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(confirmed: T::Boolean, expand: T::Array[String]).void } + def initialize(confirmed: nil, expand: nil); end + end + class IncrementParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The amount to increment the authorization by. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :increment_amount + # If set `true`, you may provide [amount](https://stripe.com/docs/api/issuing/authorizations/approve#approve_issuing_authorization-amount) to control how much to hold for the authorization. + sig { returns(T::Boolean) } + attr_accessor :is_amount_controllable + sig { + params(expand: T::Array[String], increment_amount: Integer, is_amount_controllable: T::Boolean).void + } + def initialize(expand: nil, increment_amount: nil, is_amount_controllable: nil); end + end + class ReverseParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The amount to reverse from the authorization. If not provided, the full amount of the authorization will be reversed. This amount is in the authorization currency and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :reverse_amount + sig { params(expand: T::Array[String], reverse_amount: Integer).void } + def initialize(expand: nil, reverse_amount: nil); end + end + # Capture a test-mode authorization. + sig { + params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::CaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def capture(authorization, params = {}, opts = {}); end + + # Create a test-mode authorization. + sig { + params(params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def create(params = {}, opts = {}); end + + # Expire a test-mode Authorization. + sig { + params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def expire(authorization, params = {}, opts = {}); end + + # Finalize the amount on an Authorization prior to capture, when the initial authorization was for an estimated amount. + sig { + params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::FinalizeAmountParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def finalize_amount(authorization, params = {}, opts = {}); end + + # Increment a test-mode Authorization. + sig { + params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::IncrementParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def increment(authorization, params = {}, opts = {}); end + + # Respond to a fraud challenge on a testmode Issuing authorization, simulating either a confirmation of fraud or a correction of legitimacy. + sig { + params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::RespondParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def respond(authorization, params = {}, opts = {}); end + + # Reverse a test-mode Authorization. + sig { + params(authorization: String, params: T.any(::Stripe::TestHelpers::Issuing::AuthorizationService::ReverseParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Authorization) + } + def reverse(authorization, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/issuing/card_service.rbi b/rbi/stripe/services/test_helpers/issuing/card_service.rbi new file mode 100644 index 000000000..81d7df95a --- /dev/null +++ b/rbi/stripe/services/test_helpers/issuing/card_service.rbi @@ -0,0 +1,76 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Issuing + class CardService < StripeService + class DeliverCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class FailCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReturnCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ShipCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SubmitCardParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Updates the shipping status of the specified Issuing Card object to delivered. + sig { + params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::DeliverCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def deliver_card(card, params = {}, opts = {}); end + + # Updates the shipping status of the specified Issuing Card object to failure. + sig { + params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::FailCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def fail_card(card, params = {}, opts = {}); end + + # Updates the shipping status of the specified Issuing Card object to returned. + sig { + params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::ReturnCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def return_card(card, params = {}, opts = {}); end + + # Updates the shipping status of the specified Issuing Card object to shipped. + sig { + params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::ShipCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def ship_card(card, params = {}, opts = {}); end + + # Updates the shipping status of the specified Issuing Card object to submitted. This method requires Stripe Version ‘2024-09-30.acacia' or later. + sig { + params(card: String, params: T.any(::Stripe::TestHelpers::Issuing::CardService::SubmitCardParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Card) + } + def submit_card(card, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi b/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi new file mode 100644 index 000000000..344708515 --- /dev/null +++ b/rbi/stripe/services/test_helpers/issuing/personalization_design_service.rbi @@ -0,0 +1,67 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Issuing + class PersonalizationDesignService < StripeService + class ActivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class DeactivateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class RejectParams < Stripe::RequestParams + class RejectionReasons < Stripe::RequestParams + # The reason(s) the card logo was rejected. + sig { returns(T::Array[String]) } + attr_accessor :card_logo + # The reason(s) the carrier text was rejected. + sig { returns(T::Array[String]) } + attr_accessor :carrier_text + sig { params(card_logo: T::Array[String], carrier_text: T::Array[String]).void } + def initialize(card_logo: nil, carrier_text: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The reason(s) the personalization design was rejected. + sig { + returns(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::RejectParams::RejectionReasons) + } + attr_accessor :rejection_reasons + sig { + params(expand: T::Array[String], rejection_reasons: ::Stripe::TestHelpers::Issuing::PersonalizationDesignService::RejectParams::RejectionReasons).void + } + def initialize(expand: nil, rejection_reasons: nil); end + end + # Updates the status of the specified testmode personalization design object to active. + sig { + params(personalization_design: String, params: T.any(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::ActivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def activate(personalization_design, params = {}, opts = {}); end + + # Updates the status of the specified testmode personalization design object to inactive. + sig { + params(personalization_design: String, params: T.any(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::DeactivateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def deactivate(personalization_design, params = {}, opts = {}); end + + # Updates the status of the specified testmode personalization design object to rejected. + sig { + params(personalization_design: String, params: T.any(::Stripe::TestHelpers::Issuing::PersonalizationDesignService::RejectParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::PersonalizationDesign) + } + def reject(personalization_design, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi b/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi new file mode 100644 index 000000000..748dc0487 --- /dev/null +++ b/rbi/stripe/services/test_helpers/issuing/transaction_service.rbi @@ -0,0 +1,705 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Issuing + class TransactionService < StripeService + class RefundParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :refund_amount + sig { params(expand: T::Array[String], refund_amount: Integer).void } + def initialize(expand: nil, refund_amount: nil); end + end + class CreateForceCaptureParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + sig { returns(String) } + attr_accessor :category + # City where the seller is located + sig { returns(String) } + attr_accessor :city + # Country where the seller is located + sig { returns(String) } + attr_accessor :country + # Name of the seller + sig { returns(String) } + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + sig { returns(String) } + attr_accessor :network_id + # Postal code where the seller is located + sig { returns(String) } + attr_accessor :postal_code + # State where the seller is located + sig { returns(String) } + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + sig { returns(String) } + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + sig { returns(String) } + attr_accessor :url + sig { + params(category: String, city: String, country: String, name: String, network_id: String, postal_code: String, state: String, terminal_id: String, url: String).void + } + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ); end + end + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + sig { returns(String) } + attr_accessor :arrival_airport_code + # The airline carrier code. + sig { returns(String) } + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + sig { returns(String) } + attr_accessor :departure_airport_code + # The flight number. + sig { returns(String) } + attr_accessor :flight_number + # The flight's service class. + sig { returns(String) } + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + sig { returns(T::Boolean) } + attr_accessor :stopover_allowed + sig { + params(arrival_airport_code: String, carrier: String, departure_airport_code: String, flight_number: String, service_class: String, stopover_allowed: T::Boolean).void + } + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ); end + end + # The time that the flight departed. + sig { returns(Integer) } + attr_accessor :departure_at + # The name of the passenger. + sig { returns(String) } + attr_accessor :passenger_name + # Whether the ticket is refundable. + sig { returns(T::Boolean) } + attr_accessor :refundable + # The legs of the trip. + sig { + returns(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight::Segment]) + } + attr_accessor :segments + # The travel agency that issued the ticket. + sig { returns(String) } + attr_accessor :travel_agency + sig { + params(departure_at: Integer, passenger_name: String, refundable: T::Boolean, segments: T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight::Segment], travel_agency: String).void + } + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + sig { returns(Integer) } + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + sig { returns(Integer) } + attr_accessor :nights + sig { params(check_in_at: Integer, nights: Integer).void } + def initialize(check_in_at: nil, nights: nil); end + end + class Receipt < Stripe::RequestParams + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # Attribute for param field quantity + sig { returns(String) } + attr_accessor :quantity + # Attribute for param field total + sig { returns(Integer) } + attr_accessor :total + # Attribute for param field unit_cost + sig { returns(Integer) } + attr_accessor :unit_cost + sig { + params(description: String, quantity: String, total: Integer, unit_cost: Integer).void + } + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + end + # Fleet-specific information for transactions using Fleet cards. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet) + } + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight) + } + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fuel) + } + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Lodging) + } + attr_accessor :lodging + # The line items in the purchase. + sig { + returns(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Receipt]) + } + attr_accessor :receipt + # A merchant-specific order number. + sig { returns(String) } + attr_accessor :reference + sig { + params(fleet: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fleet, flight: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Flight, fuel: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Fuel, lodging: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Lodging, receipt: T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails::Receipt], reference: String).void + } + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ); end + end + # The total amount to attempt to capture. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Card associated with this transaction. + sig { returns(String) } + attr_accessor :card + # The currency of the capture. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::MerchantData) + } + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails) + } + attr_accessor :purchase_details + sig { + params(amount: Integer, card: String, currency: String, expand: T::Array[String], merchant_data: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::MerchantData, purchase_details: ::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams::PurchaseDetails).void + } + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ); end + end + class CreateUnlinkedRefundParams < Stripe::RequestParams + class MerchantData < Stripe::RequestParams + # A categorization of the seller's type of business. See our [merchant categories guide](https://stripe.com/docs/issuing/merchant-categories) for a list of possible values. + sig { returns(String) } + attr_accessor :category + # City where the seller is located + sig { returns(String) } + attr_accessor :city + # Country where the seller is located + sig { returns(String) } + attr_accessor :country + # Name of the seller + sig { returns(String) } + attr_accessor :name + # Identifier assigned to the seller by the card network. Different card networks may assign different network_id fields to the same merchant. + sig { returns(String) } + attr_accessor :network_id + # Postal code where the seller is located + sig { returns(String) } + attr_accessor :postal_code + # State where the seller is located + sig { returns(String) } + attr_accessor :state + # An ID assigned by the seller to the location of the sale. + sig { returns(String) } + attr_accessor :terminal_id + # URL provided by the merchant on a 3DS request + sig { returns(String) } + attr_accessor :url + sig { + params(category: String, city: String, country: String, name: String, network_id: String, postal_code: String, state: String, terminal_id: String, url: String).void + } + def initialize( + category: nil, + city: nil, + country: nil, + name: nil, + network_id: nil, + postal_code: nil, + state: nil, + terminal_id: nil, + url: nil + ); end + end + class PurchaseDetails < Stripe::RequestParams + class Fleet < Stripe::RequestParams + class CardholderPromptData < Stripe::RequestParams + # Driver ID. + sig { returns(String) } + attr_accessor :driver_id + # Odometer reading. + sig { returns(Integer) } + attr_accessor :odometer + # An alphanumeric ID. This field is used when a vehicle ID, driver ID, or generic ID is entered by the cardholder, but the merchant or card network did not specify the prompt type. + sig { returns(String) } + attr_accessor :unspecified_id + # User ID. + sig { returns(String) } + attr_accessor :user_id + # Vehicle number. + sig { returns(String) } + attr_accessor :vehicle_number + sig { + params(driver_id: String, odometer: Integer, unspecified_id: String, user_id: String, vehicle_number: String).void + } + def initialize( + driver_id: nil, + odometer: nil, + unspecified_id: nil, + user_id: nil, + vehicle_number: nil + ); end + end + class ReportedBreakdown < Stripe::RequestParams + class Fuel < Stripe::RequestParams + # Gross fuel amount that should equal Fuel Volume multipled by Fuel Unit Cost, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class NonFuel < Stripe::RequestParams + # Gross non-fuel amount that should equal the sum of the line items, inclusive of taxes. + sig { returns(String) } + attr_accessor :gross_amount_decimal + sig { params(gross_amount_decimal: String).void } + def initialize(gross_amount_decimal: nil); end + end + class Tax < Stripe::RequestParams + # Amount of state or provincial Sales Tax included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :local_amount_decimal + # Amount of national Sales Tax or VAT included in the transaction amount. Null if not reported by merchant or not subject to tax. + sig { returns(String) } + attr_accessor :national_amount_decimal + sig { params(local_amount_decimal: String, national_amount_decimal: String).void } + def initialize(local_amount_decimal: nil, national_amount_decimal: nil); end + end + # Breakdown of fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel) + } + attr_accessor :fuel + # Breakdown of non-fuel portion of the purchase. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel) + } + attr_accessor :non_fuel + # Information about tax included in this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax) + } + attr_accessor :tax + sig { + params(fuel: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Fuel, non_fuel: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::NonFuel, tax: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown::Tax).void + } + def initialize(fuel: nil, non_fuel: nil, tax: nil); end + end + # Answers to prompts presented to the cardholder at the point of sale. Prompted fields vary depending on the configuration of your physical fleet cards. Typical points of sale support only numeric entry. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData) + } + attr_accessor :cardholder_prompt_data + # The type of purchase. One of `fuel_purchase`, `non_fuel_purchase`, or `fuel_and_non_fuel_purchase`. + sig { returns(String) } + attr_accessor :purchase_type + # More information about the total amount. This information is not guaranteed to be accurate as some merchants may provide unreliable data. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown) + } + attr_accessor :reported_breakdown + # The type of fuel service. One of `non_fuel_transaction`, `full_service`, or `self_service`. + sig { returns(String) } + attr_accessor :service_type + sig { + params(cardholder_prompt_data: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::CardholderPromptData, purchase_type: String, reported_breakdown: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet::ReportedBreakdown, service_type: String).void + } + def initialize( + cardholder_prompt_data: nil, + purchase_type: nil, + reported_breakdown: nil, + service_type: nil + ); end + end + class Flight < Stripe::RequestParams + class Segment < Stripe::RequestParams + # The three-letter IATA airport code of the flight's destination. + sig { returns(String) } + attr_accessor :arrival_airport_code + # The airline carrier code. + sig { returns(String) } + attr_accessor :carrier + # The three-letter IATA airport code that the flight departed from. + sig { returns(String) } + attr_accessor :departure_airport_code + # The flight number. + sig { returns(String) } + attr_accessor :flight_number + # The flight's service class. + sig { returns(String) } + attr_accessor :service_class + # Whether a stopover is allowed on this flight. + sig { returns(T::Boolean) } + attr_accessor :stopover_allowed + sig { + params(arrival_airport_code: String, carrier: String, departure_airport_code: String, flight_number: String, service_class: String, stopover_allowed: T::Boolean).void + } + def initialize( + arrival_airport_code: nil, + carrier: nil, + departure_airport_code: nil, + flight_number: nil, + service_class: nil, + stopover_allowed: nil + ); end + end + # The time that the flight departed. + sig { returns(Integer) } + attr_accessor :departure_at + # The name of the passenger. + sig { returns(String) } + attr_accessor :passenger_name + # Whether the ticket is refundable. + sig { returns(T::Boolean) } + attr_accessor :refundable + # The legs of the trip. + sig { + returns(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment]) + } + attr_accessor :segments + # The travel agency that issued the ticket. + sig { returns(String) } + attr_accessor :travel_agency + sig { + params(departure_at: Integer, passenger_name: String, refundable: T::Boolean, segments: T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight::Segment], travel_agency: String).void + } + def initialize( + departure_at: nil, + passenger_name: nil, + refundable: nil, + segments: nil, + travel_agency: nil + ); end + end + class Fuel < Stripe::RequestParams + # [Conexxus Payment System Product Code](https://www.conexxus.org/conexxus-payment-system-product-codes) identifying the primary fuel product purchased. + sig { returns(String) } + attr_accessor :industry_product_code + # The quantity of `unit`s of fuel that was dispensed, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :quantity_decimal + # The type of fuel that was purchased. One of `diesel`, `unleaded_plus`, `unleaded_regular`, `unleaded_super`, or `other`. + sig { returns(String) } + attr_accessor :type + # The units for `quantity_decimal`. One of `charging_minute`, `imperial_gallon`, `kilogram`, `kilowatt_hour`, `liter`, `pound`, `us_gallon`, or `other`. + sig { returns(String) } + attr_accessor :unit + # The cost in cents per each unit of fuel, represented as a decimal string with at most 12 decimal places. + sig { returns(String) } + attr_accessor :unit_cost_decimal + sig { + params(industry_product_code: String, quantity_decimal: String, type: String, unit: String, unit_cost_decimal: String).void + } + def initialize( + industry_product_code: nil, + quantity_decimal: nil, + type: nil, + unit: nil, + unit_cost_decimal: nil + ); end + end + class Lodging < Stripe::RequestParams + # The time of checking into the lodging. + sig { returns(Integer) } + attr_accessor :check_in_at + # The number of nights stayed at the lodging. + sig { returns(Integer) } + attr_accessor :nights + sig { params(check_in_at: Integer, nights: Integer).void } + def initialize(check_in_at: nil, nights: nil); end + end + class Receipt < Stripe::RequestParams + # Attribute for param field description + sig { returns(String) } + attr_accessor :description + # Attribute for param field quantity + sig { returns(String) } + attr_accessor :quantity + # Attribute for param field total + sig { returns(Integer) } + attr_accessor :total + # Attribute for param field unit_cost + sig { returns(Integer) } + attr_accessor :unit_cost + sig { + params(description: String, quantity: String, total: Integer, unit_cost: Integer).void + } + def initialize(description: nil, quantity: nil, total: nil, unit_cost: nil); end + end + # Fleet-specific information for transactions using Fleet cards. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet) + } + attr_accessor :fleet + # Information about the flight that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight) + } + attr_accessor :flight + # Information about fuel that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fuel) + } + attr_accessor :fuel + # Information about lodging that was purchased with this transaction. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Lodging) + } + attr_accessor :lodging + # The line items in the purchase. + sig { + returns(T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Receipt]) + } + attr_accessor :receipt + # A merchant-specific order number. + sig { returns(String) } + attr_accessor :reference + sig { + params(fleet: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fleet, flight: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Flight, fuel: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Fuel, lodging: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Lodging, receipt: T::Array[::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails::Receipt], reference: String).void + } + def initialize( + fleet: nil, + flight: nil, + fuel: nil, + lodging: nil, + receipt: nil, + reference: nil + ); end + end + # The total amount to attempt to refund. This amount is in the provided currency, or defaults to the cards currency, and in the [smallest currency unit](https://stripe.com/docs/currencies#zero-decimal). + sig { returns(Integer) } + attr_accessor :amount + # Card associated with this unlinked refund transaction. + sig { returns(String) } + attr_accessor :card + # The currency of the unlinked refund. If not provided, defaults to the currency of the card. Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about the seller (grocery store, e-commerce website, etc.) where the card authorization happened. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::MerchantData) + } + attr_accessor :merchant_data + # Additional purchase information that is optionally provided by the merchant. + sig { + returns(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails) + } + attr_accessor :purchase_details + sig { + params(amount: Integer, card: String, currency: String, expand: T::Array[String], merchant_data: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::MerchantData, purchase_details: ::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams::PurchaseDetails).void + } + def initialize( + amount: nil, + card: nil, + currency: nil, + expand: nil, + merchant_data: nil, + purchase_details: nil + ); end + end + # Allows the user to capture an arbitrary amount, also known as a forced capture. + sig { + params(params: T.any(::Stripe::TestHelpers::Issuing::TransactionService::CreateForceCaptureParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction) + } + def create_force_capture(params = {}, opts = {}); end + + # Allows the user to refund an arbitrary amount, also known as a unlinked refund. + sig { + params(params: T.any(::Stripe::TestHelpers::Issuing::TransactionService::CreateUnlinkedRefundParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction) + } + def create_unlinked_refund(params = {}, opts = {}); end + + # Refund a test-mode Transaction. + sig { + params(transaction: String, params: T.any(::Stripe::TestHelpers::Issuing::TransactionService::RefundParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Issuing::Transaction) + } + def refund(transaction, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/issuing_service.rbi b/rbi/stripe/services/test_helpers/issuing_service.rbi new file mode 100644 index 000000000..0353bbccb --- /dev/null +++ b/rbi/stripe/services/test_helpers/issuing_service.rbi @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class IssuingService < StripeService + attr_reader :authorizations + attr_reader :cards + attr_reader :personalization_designs + attr_reader :transactions + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/refund_service.rbi b/rbi/stripe/services/test_helpers/refund_service.rbi new file mode 100644 index 000000000..1f02eec8c --- /dev/null +++ b/rbi/stripe/services/test_helpers/refund_service.rbi @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class RefundService < StripeService + class ExpireParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Expire a refund with a status of requires_action. + sig { + params(refund: String, params: T.any(::Stripe::TestHelpers::RefundService::ExpireParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Refund) + } + def expire(refund, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/terminal/reader_service.rbi b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi new file mode 100644 index 000000000..645cdd4d4 --- /dev/null +++ b/rbi/stripe/services/test_helpers/terminal/reader_service.rbi @@ -0,0 +1,62 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Terminal + class ReaderService < StripeService + class PresentPaymentMethodParams < Stripe::RequestParams + class CardPresent < Stripe::RequestParams + # The card number, as a string without any separators. + sig { returns(String) } + attr_accessor :number + sig { params(number: String).void } + def initialize(number: nil); end + end + class InteracPresent < Stripe::RequestParams + # Card Number + sig { returns(String) } + attr_accessor :number + sig { params(number: String).void } + def initialize(number: nil); end + end + # Simulated on-reader tip amount. + sig { returns(Integer) } + attr_accessor :amount_tip + # Simulated data for the card_present payment method. + sig { + returns(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::CardPresent) + } + attr_accessor :card_present + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Simulated data for the interac_present payment method. + sig { + returns(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::InteracPresent) + } + attr_accessor :interac_present + # Simulated payment type. + sig { returns(String) } + attr_accessor :type + sig { + params(amount_tip: Integer, card_present: ::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::CardPresent, expand: T::Array[String], interac_present: ::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams::InteracPresent, type: String).void + } + def initialize( + amount_tip: nil, + card_present: nil, + expand: nil, + interac_present: nil, + type: nil + ); end + end + # Presents a payment method on a simulated reader. Can be used to simulate accepting a payment, saving a card or refunding a transaction. + sig { + params(reader: String, params: T.any(::Stripe::TestHelpers::Terminal::ReaderService::PresentPaymentMethodParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Terminal::Reader) + } + def present_payment_method(reader, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/terminal_service.rbi b/rbi/stripe/services/test_helpers/terminal_service.rbi new file mode 100644 index 000000000..5315483c3 --- /dev/null +++ b/rbi/stripe/services/test_helpers/terminal_service.rbi @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class TerminalService < StripeService + attr_reader :readers + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/test_clock_service.rbi b/rbi/stripe/services/test_helpers/test_clock_service.rbi new file mode 100644 index 000000000..79f1279f6 --- /dev/null +++ b/rbi/stripe/services/test_helpers/test_clock_service.rbi @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class TestClockService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The initial frozen time for this test clock. + sig { returns(Integer) } + attr_accessor :frozen_time + # The name for this test clock. + sig { returns(String) } + attr_accessor :name + sig { params(expand: T::Array[String], frozen_time: Integer, name: String).void } + def initialize(expand: nil, frozen_time: nil, name: nil); end + end + class AdvanceParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The time to advance the test clock. Must be after the test clock's current frozen time. Cannot be more than two intervals in the future from the shortest subscription in this test clock. If there are no subscriptions in this test clock, it cannot be more than two years in the future. + sig { returns(Integer) } + attr_accessor :frozen_time + sig { params(expand: T::Array[String], frozen_time: Integer).void } + def initialize(expand: nil, frozen_time: nil); end + end + # Starts advancing a test clock to a specified time in the future. Advancement is done when status changes to Ready. + sig { + params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClockService::AdvanceParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def advance(test_clock, params = {}, opts = {}); end + + # Creates a new test clock that can be attached to new customers and quotes. + sig { + params(params: T.any(::Stripe::TestHelpers::TestClockService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def create(params = {}, opts = {}); end + + # Deletes a test clock. + sig { + params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClockService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def delete(test_clock, params = {}, opts = {}); end + + # Returns a list of your test clocks. + sig { + params(params: T.any(::Stripe::TestHelpers::TestClockService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a test clock. + sig { + params(test_clock: String, params: T.any(::Stripe::TestHelpers::TestClockService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::TestHelpers::TestClock) + } + def retrieve(test_clock, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi b/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi new file mode 100644 index 000000000..986c2a4a9 --- /dev/null +++ b/rbi/stripe/services/test_helpers/treasury/inbound_transfer_service.rbi @@ -0,0 +1,64 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Treasury + class InboundTransferService < StripeService + class FailParams < Stripe::RequestParams + class FailureDetails < Stripe::RequestParams + # Reason for the failure. + sig { returns(String) } + attr_accessor :code + sig { params(code: String).void } + def initialize(code: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about a failed InboundTransfer. + sig { + returns(::Stripe::TestHelpers::Treasury::InboundTransferService::FailParams::FailureDetails) + } + attr_accessor :failure_details + sig { + params(expand: T::Array[String], failure_details: ::Stripe::TestHelpers::Treasury::InboundTransferService::FailParams::FailureDetails).void + } + def initialize(expand: nil, failure_details: nil); end + end + class ReturnInboundTransferParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class SucceedParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Transitions a test mode created InboundTransfer to the failed status. The InboundTransfer must already be in the processing state. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::InboundTransferService::FailParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def fail(id, params = {}, opts = {}); end + + # Marks the test mode InboundTransfer object as returned and links the InboundTransfer to a ReceivedDebit. The InboundTransfer must already be in the succeeded state. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::InboundTransferService::ReturnInboundTransferParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def return_inbound_transfer(id, params = {}, opts = {}); end + + # Transitions a test mode created InboundTransfer to the succeeded status. The InboundTransfer must already be in the processing state. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::InboundTransferService::SucceedParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def succeed(id, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi b/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi new file mode 100644 index 000000000..89775da99 --- /dev/null +++ b/rbi/stripe/services/test_helpers/treasury/outbound_payment_service.rbi @@ -0,0 +1,123 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Treasury + class OutboundPaymentService < StripeService + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + sig { returns(String) } + attr_accessor :trace_id + sig { params(trace_id: String).void } + def initialize(trace_id: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :omad + sig { params(chips: String, imad: String, omad: String).void } + def initialize(chips: nil, imad: nil, omad: nil); end + end + # ACH network tracking details. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::Ach) + } + attr_accessor :ach + # The US bank account network used to send funds. + sig { returns(String) } + attr_accessor :type + # US domestic wire network tracking details. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::Ach, type: String, us_domestic_wire: ::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails::UsDomesticWire).void + } + def initialize(ach: nil, type: nil, us_domestic_wire: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about network-specific tracking information. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails) + } + attr_accessor :tracking_details + sig { + params(expand: T::Array[String], tracking_details: ::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams::TrackingDetails).void + } + def initialize(expand: nil, tracking_details: nil); end + end + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReturnOutboundPaymentParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # The return code to be set on the OutboundPayment object. + sig { returns(String) } + attr_accessor :code + sig { params(code: String).void } + def initialize(code: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Optional hash to set the return code. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundPaymentService::ReturnOutboundPaymentParams::ReturnedDetails) + } + attr_accessor :returned_details + sig { + params(expand: T::Array[String], returned_details: ::Stripe::TestHelpers::Treasury::OutboundPaymentService::ReturnOutboundPaymentParams::ReturnedDetails).void + } + def initialize(expand: nil, returned_details: nil); end + end + # Transitions a test mode created OutboundPayment to the failed status. The OutboundPayment must already be in the processing state. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::FailParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def fail(id, params = {}, opts = {}); end + + # Transitions a test mode created OutboundPayment to the posted status. The OutboundPayment must already be in the processing state. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::PostParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def post(id, params = {}, opts = {}); end + + # Transitions a test mode created OutboundPayment to the returned status. The OutboundPayment must already be in the processing state. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::ReturnOutboundPaymentParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def return_outbound_payment(id, params = {}, opts = {}); end + + # Updates a test mode created OutboundPayment with tracking details. The OutboundPayment must not be cancelable, and cannot be in the canceled or failed states. + sig { + params(id: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundPaymentService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def update(id, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi b/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi new file mode 100644 index 000000000..f1c7a6416 --- /dev/null +++ b/rbi/stripe/services/test_helpers/treasury/outbound_transfer_service.rbi @@ -0,0 +1,123 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Treasury + class OutboundTransferService < StripeService + class UpdateParams < Stripe::RequestParams + class TrackingDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH trace ID for funds sent over the `ach` network. + sig { returns(String) } + attr_accessor :trace_id + sig { params(trace_id: String).void } + def initialize(trace_id: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # CHIPS System Sequence Number (SSN) for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :chips + # IMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :imad + # OMAD for funds sent over the `us_domestic_wire` network. + sig { returns(String) } + attr_accessor :omad + sig { params(chips: String, imad: String, omad: String).void } + def initialize(chips: nil, imad: nil, omad: nil); end + end + # ACH network tracking details. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::Ach) + } + attr_accessor :ach + # The US bank account network used to send funds. + sig { returns(String) } + attr_accessor :type + # US domestic wire network tracking details. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::Ach, type: String, us_domestic_wire: ::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails::UsDomesticWire).void + } + def initialize(ach: nil, type: nil, us_domestic_wire: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about network-specific tracking information. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails) + } + attr_accessor :tracking_details + sig { + params(expand: T::Array[String], tracking_details: ::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams::TrackingDetails).void + } + def initialize(expand: nil, tracking_details: nil); end + end + class FailParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class PostParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class ReturnOutboundTransferParams < Stripe::RequestParams + class ReturnedDetails < Stripe::RequestParams + # Reason for the return. + sig { returns(String) } + attr_accessor :code + sig { params(code: String).void } + def initialize(code: nil); end + end + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Details about a returned OutboundTransfer. + sig { + returns(::Stripe::TestHelpers::Treasury::OutboundTransferService::ReturnOutboundTransferParams::ReturnedDetails) + } + attr_accessor :returned_details + sig { + params(expand: T::Array[String], returned_details: ::Stripe::TestHelpers::Treasury::OutboundTransferService::ReturnOutboundTransferParams::ReturnedDetails).void + } + def initialize(expand: nil, returned_details: nil); end + end + # Transitions a test mode created OutboundTransfer to the failed status. The OutboundTransfer must already be in the processing state. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::FailParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def fail(outbound_transfer, params = {}, opts = {}); end + + # Transitions a test mode created OutboundTransfer to the posted status. The OutboundTransfer must already be in the processing state. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::PostParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def post(outbound_transfer, params = {}, opts = {}); end + + # Transitions a test mode created OutboundTransfer to the returned status. The OutboundTransfer must already be in the processing state. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::ReturnOutboundTransferParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def return_outbound_transfer(outbound_transfer, params = {}, opts = {}); end + + # Updates a test mode created OutboundTransfer with tracking details. The OutboundTransfer must not be cancelable, and cannot be in the canceled or failed states. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::TestHelpers::Treasury::OutboundTransferService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def update(outbound_transfer, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi b/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi new file mode 100644 index 000000000..3143341de --- /dev/null +++ b/rbi/stripe/services/test_helpers/treasury/received_credit_service.rbi @@ -0,0 +1,114 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Treasury + class ReceivedCreditService < StripeService + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + sig { returns(String) } + attr_accessor :account_holder_name + # The bank account number. + sig { returns(String) } + attr_accessor :account_number + # The bank account's routing number. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_name: String, account_number: String, routing_number: String).void + } + def initialize( + account_holder_name: nil, + account_number: nil, + routing_number: nil + ); end + end + # The source type. + sig { returns(String) } + attr_accessor :type + # Optional fields for `us_bank_account`. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(type: String, us_bank_account: ::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount).void + } + def initialize(type: nil, us_bank_account: nil); end + end + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # ACH Addenda record + sig { returns(String) } + attr_accessor :addenda + sig { params(addenda: String).void } + def initialize(addenda: nil); end + end + # Optional fields for `ach`. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::NetworkDetails::Ach) + } + attr_accessor :ach + # The type of flow that originated the ReceivedCredit. + sig { returns(String) } + attr_accessor :type + sig { + params(ach: ::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::NetworkDetails::Ach, type: String).void + } + def initialize(ach: nil, type: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to send funds to. + sig { returns(String) } + attr_accessor :financial_account + # Initiating payment method details for the object. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails) + } + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + # Details about the network used for the ReceivedCredit. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::NetworkDetails) + } + attr_accessor :network_details + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], financial_account: String, initiating_payment_method_details: ::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::InitiatingPaymentMethodDetails, network: String, network_details: ::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams::NetworkDetails).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ); end + end + # Use this endpoint to simulate a test mode ReceivedCredit initiated by a third party. In live mode, you can't directly create ReceivedCredits initiated by third parties. + sig { + params(params: T.any(::Stripe::TestHelpers::Treasury::ReceivedCreditService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedCredit) + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi b/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi new file mode 100644 index 000000000..36c70ae10 --- /dev/null +++ b/rbi/stripe/services/test_helpers/treasury/received_debit_service.rbi @@ -0,0 +1,114 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + module Treasury + class ReceivedDebitService < StripeService + class CreateParams < Stripe::RequestParams + class InitiatingPaymentMethodDetails < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # The bank account holder's name. + sig { returns(String) } + attr_accessor :account_holder_name + # The bank account number. + sig { returns(String) } + attr_accessor :account_number + # The bank account's routing number. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_name: String, account_number: String, routing_number: String).void + } + def initialize( + account_holder_name: nil, + account_number: nil, + routing_number: nil + ); end + end + # The source type. + sig { returns(String) } + attr_accessor :type + # Optional fields for `us_bank_account`. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(type: String, us_bank_account: ::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails::UsBankAccount).void + } + def initialize(type: nil, us_bank_account: nil); end + end + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this ReceivedDebit. + sig { returns(String) } + attr_accessor :addenda + sig { params(addenda: String).void } + def initialize(addenda: nil); end + end + # Optional fields for `ach`. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::NetworkDetails::Ach) + } + attr_accessor :ach + # The type of flow that originated the ReceivedDebit. + sig { returns(String) } + attr_accessor :type + sig { + params(ach: ::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::NetworkDetails::Ach, type: String).void + } + def initialize(ach: nil, type: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to pull funds from. + sig { returns(String) } + attr_accessor :financial_account + # Initiating payment method details for the object. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails) + } + attr_accessor :initiating_payment_method_details + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + # Details about the network used for the ReceivedDebit. + sig { + returns(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::NetworkDetails) + } + attr_accessor :network_details + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], financial_account: String, initiating_payment_method_details: ::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::InitiatingPaymentMethodDetails, network: String, network_details: ::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams::NetworkDetails).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + initiating_payment_method_details: nil, + network: nil, + network_details: nil + ); end + end + # Use this endpoint to simulate a test mode ReceivedDebit initiated by a third party. In live mode, you can't directly create ReceivedDebits initiated by third parties. + sig { + params(params: T.any(::Stripe::TestHelpers::Treasury::ReceivedDebitService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedDebit) + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers/treasury_service.rbi b/rbi/stripe/services/test_helpers/treasury_service.rbi new file mode 100644 index 000000000..7e303663a --- /dev/null +++ b/rbi/stripe/services/test_helpers/treasury_service.rbi @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module TestHelpers + class TreasuryService < StripeService + attr_reader :inbound_transfers + attr_reader :outbound_payments + attr_reader :outbound_transfers + attr_reader :received_credits + attr_reader :received_debits + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/test_helpers_service.rbi b/rbi/stripe/services/test_helpers_service.rbi new file mode 100644 index 000000000..5c11f782d --- /dev/null +++ b/rbi/stripe/services/test_helpers_service.rbi @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TestHelpersService < StripeService + attr_reader :confirmation_tokens + attr_reader :customers + attr_reader :issuing + attr_reader :refunds + attr_reader :terminal + attr_reader :test_clocks + attr_reader :treasury + end +end \ No newline at end of file diff --git a/rbi/stripe/services/token_service.rbi b/rbi/stripe/services/token_service.rbi new file mode 100644 index 000000000..8d6b58933 --- /dev/null +++ b/rbi/stripe/services/token_service.rbi @@ -0,0 +1,1132 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TokenService < StripeService + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CreateParams < Stripe::RequestParams + class Account < Stripe::RequestParams + class Company < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class OwnershipDeclaration < Stripe::RequestParams + # The Unix timestamp marking when the beneficial owner attestation was made. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the beneficial owner attestation was made. + sig { returns(String) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: String).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + class Verification < Stripe::RequestParams + class Document < Stripe::RequestParams + # The back of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of a document returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `additional_verification`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document verifying the business. + sig { + returns(::Stripe::TokenService::CreateParams::Account::Company::Verification::Document) + } + attr_accessor :document + sig { + params(document: ::Stripe::TokenService::CreateParams::Account::Company::Verification::Document).void + } + def initialize(document: nil); end + end + # The company's primary address. + sig { returns(::Stripe::TokenService::CreateParams::Account::Company::Address) } + attr_accessor :address + # The Kana variation of the company's primary address (Japan only). + sig { returns(::Stripe::TokenService::CreateParams::Account::Company::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the company's primary address (Japan only). + sig { returns(::Stripe::TokenService::CreateParams::Account::Company::AddressKanji) } + attr_accessor :address_kanji + # Whether the company's directors have been provided. Set this Boolean to `true` after creating all the company's directors with [the Persons API](/api/persons) for accounts with a `relationship.director` requirement. This value is not automatically set to `true` after creating directors, so it needs to be updated to indicate all directors have been provided. + sig { returns(T::Boolean) } + attr_accessor :directors_provided + # Whether the company's executives have been provided. Set this Boolean to `true` after creating all the company's executives with [the Persons API](/api/persons) for accounts with a `relationship.executive` requirement. + sig { returns(T::Boolean) } + attr_accessor :executives_provided + # The export license ID number of the company, also referred as Import Export Code (India only). + sig { returns(String) } + attr_accessor :export_license_id + # The purpose code to use for export transactions (India only). + sig { returns(String) } + attr_accessor :export_purpose_code + # The company's legal name. + sig { returns(String) } + attr_accessor :name + # The Kana variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kana + # The Kanji variation of the company's legal name (Japan only). + sig { returns(String) } + attr_accessor :name_kanji + # Whether the company's owners have been provided. Set this Boolean to `true` after creating all the company's owners with [the Persons API](/api/persons) for accounts with a `relationship.owner` requirement. + sig { returns(T::Boolean) } + attr_accessor :owners_provided + # This hash is used to attest that the beneficial owner information provided to Stripe is both current and correct. + sig { + returns(::Stripe::TokenService::CreateParams::Account::Company::OwnershipDeclaration) + } + attr_accessor :ownership_declaration + # Whether the user described by the data in the token has been shown the Ownership Declaration and indicated that it is correct. + sig { returns(T::Boolean) } + attr_accessor :ownership_declaration_shown_and_signed + # The company's phone number (used for verification). + sig { returns(String) } + attr_accessor :phone + # The identification number given to a company when it is registered or incorporated, if distinct from the identification number used for filing taxes. (Examples are the CIN for companies and LLP IN for partnerships in India, and the Company Registration Number in Hong Kong). + sig { returns(String) } + attr_accessor :registration_number + # The category identifying the legal structure of the company or legal entity. See [Business structure](/connect/identity-verification#business-structure) for more details. Pass an empty string to unset this value. + sig { returns(T.nilable(String)) } + attr_accessor :structure + # The business ID number of the company, as appropriate for the company’s country. (Examples are an Employer ID Number in the U.S., a Business Number in Canada, or a Company Number in the UK.) + sig { returns(String) } + attr_accessor :tax_id + # The jurisdiction in which the `tax_id` is registered (Germany-based companies only). + sig { returns(String) } + attr_accessor :tax_id_registrar + # The VAT number of the company. + sig { returns(String) } + attr_accessor :vat_id + # Information on the verification state of the company. + sig { returns(::Stripe::TokenService::CreateParams::Account::Company::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::TokenService::CreateParams::Account::Company::Address, address_kana: ::Stripe::TokenService::CreateParams::Account::Company::AddressKana, address_kanji: ::Stripe::TokenService::CreateParams::Account::Company::AddressKanji, directors_provided: T::Boolean, executives_provided: T::Boolean, export_license_id: String, export_purpose_code: String, name: String, name_kana: String, name_kanji: String, owners_provided: T::Boolean, ownership_declaration: ::Stripe::TokenService::CreateParams::Account::Company::OwnershipDeclaration, ownership_declaration_shown_and_signed: T::Boolean, phone: String, registration_number: String, structure: T.nilable(String), tax_id: String, tax_id_registrar: String, vat_id: String, verification: ::Stripe::TokenService::CreateParams::Account::Company::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + directors_provided: nil, + executives_provided: nil, + export_license_id: nil, + export_purpose_code: nil, + name: nil, + name_kana: nil, + name_kanji: nil, + owners_provided: nil, + ownership_declaration: nil, + ownership_declaration_shown_and_signed: nil, + phone: nil, + registration_number: nil, + structure: nil, + tax_id: nil, + tax_id_registrar: nil, + vat_id: nil, + verification: nil + ); end + end + class Individual < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(director: T::Boolean, executive: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), title: String).void + } + def initialize( + director: nil, + executive: nil, + owner: nil, + percent_ownership: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::TokenService::CreateParams::Account::Individual::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { + returns(::Stripe::TokenService::CreateParams::Account::Individual::Verification::Document) + } + attr_accessor :document + sig { + params(additional_document: ::Stripe::TokenService::CreateParams::Account::Individual::Verification::AdditionalDocument, document: ::Stripe::TokenService::CreateParams::Account::Individual::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # The individual's primary address. + sig { returns(::Stripe::TokenService::CreateParams::Account::Individual::Address) } + attr_accessor :address + # The Kana variation of the individual's primary address (Japan only). + sig { returns(::Stripe::TokenService::CreateParams::Account::Individual::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the individual's primary address (Japan only). + sig { returns(::Stripe::TokenService::CreateParams::Account::Individual::AddressKanji) } + attr_accessor :address_kanji + # The individual's date of birth. + sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Dob)) } + attr_accessor :dob + # The individual's email address. + sig { returns(String) } + attr_accessor :email + # The individual's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the individual's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the individual is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The individual's gender + sig { returns(String) } + attr_accessor :gender + # The government-issued ID number of the individual, as appropriate for the representative's country. (Examples are a Social Security Number in the U.S., or a Social Insurance Number in Canada). Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The government-issued secondary ID number of the individual, as appropriate for the representative's country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token created with Stripe.js](/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The individual's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the individual's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The individual's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The individual's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The individual's registered address. + sig { + returns(::Stripe::TokenService::CreateParams::Account::Individual::RegisteredAddress) + } + attr_accessor :registered_address + # Describes the person’s relationship to the account. + sig { returns(::Stripe::TokenService::CreateParams::Account::Individual::Relationship) } + attr_accessor :relationship + # The last four digits of the individual's Social Security Number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The individual's verification document information. + sig { returns(::Stripe::TokenService::CreateParams::Account::Individual::Verification) } + attr_accessor :verification + sig { + params(address: ::Stripe::TokenService::CreateParams::Account::Individual::Address, address_kana: ::Stripe::TokenService::CreateParams::Account::Individual::AddressKana, address_kanji: ::Stripe::TokenService::CreateParams::Account::Individual::AddressKanji, dob: T.nilable(::Stripe::TokenService::CreateParams::Account::Individual::Dob), email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), phone: String, political_exposure: String, registered_address: ::Stripe::TokenService::CreateParams::Account::Individual::RegisteredAddress, relationship: ::Stripe::TokenService::CreateParams::Account::Individual::Relationship, ssn_last_4: String, verification: ::Stripe::TokenService::CreateParams::Account::Individual::Verification).void + } + def initialize( + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + # The business type. + sig { returns(String) } + attr_accessor :business_type + # Information about the company or business. + sig { returns(::Stripe::TokenService::CreateParams::Account::Company) } + attr_accessor :company + # Information about the person represented by the account. + sig { returns(::Stripe::TokenService::CreateParams::Account::Individual) } + attr_accessor :individual + # Whether the user described by the data in the token has been shown [the Stripe Connected Account Agreement](/connect/account-tokens#stripe-connected-account-agreement). When creating an account token to create a new Connect account, this value must be `true`. + sig { returns(T::Boolean) } + attr_accessor :tos_shown_and_accepted + sig { + params(business_type: String, company: ::Stripe::TokenService::CreateParams::Account::Company, individual: ::Stripe::TokenService::CreateParams::Account::Individual, tos_shown_and_accepted: T::Boolean).void + } + def initialize( + business_type: nil, + company: nil, + individual: nil, + tos_shown_and_accepted: nil + ); end + end + class BankAccount < Stripe::RequestParams + # The name of the person or business that owns the bank account. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_name + # The type of entity that holds the account. It can be `company` or `individual`. This field is required when attaching the bank account to a `Customer` object. + sig { returns(String) } + attr_accessor :account_holder_type + # The account number for the bank account, in string form. Must be a checking account. + sig { returns(String) } + attr_accessor :account_number + # The bank account type. This can only be `checking` or `savings` in most countries. In Japan, this can only be `futsu` or `toza`. + sig { returns(String) } + attr_accessor :account_type + # The country in which the bank account is located. + sig { returns(String) } + attr_accessor :country + # The currency the bank account is in. This must be a country/currency pairing that [Stripe supports.](https://stripe.com/docs/payouts) + sig { returns(String) } + attr_accessor :currency + # The ID of a Payment Method with a `type` of `us_bank_account`. The Payment Method's bank account information will be copied and returned as a Bank Account Token. This parameter is exclusive with respect to all other parameters in the `bank_account` hash. You must include the top-level `customer` parameter if the Payment Method is attached to a `Customer` object. If the Payment Method is not attached to a `Customer` object, it will be consumed and cannot be used again. You may not use Payment Methods which were created by a Setup Intent with `attach_to_self=true`. + sig { returns(String) } + attr_accessor :payment_method + # The routing number, sort code, or other country-appropriate institution number for the bank account. For US bank accounts, this is required and should be the ACH routing number, not the wire routing number. If you are providing an IBAN for `account_number`, this field is not required. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_name: String, account_holder_type: String, account_number: String, account_type: String, country: String, currency: String, payment_method: String, routing_number: String).void + } + def initialize( + account_holder_name: nil, + account_holder_type: nil, + account_number: nil, + account_type: nil, + country: nil, + currency: nil, + payment_method: nil, + routing_number: nil + ); end + end + class Card < Stripe::RequestParams + class Networks < Stripe::RequestParams + # The customer's preferred card network for co-branded cards. Supports `cartes_bancaires`, `mastercard`, or `visa`. Selection of a network that does not apply to the card will be stored as `invalid_preference` on the card. + sig { returns(String) } + attr_accessor :preferred + sig { params(preferred: String).void } + def initialize(preferred: nil); end + end + # City / District / Suburb / Town / Village. + sig { returns(String) } + attr_accessor :address_city + # Billing address country, if provided. + sig { returns(String) } + attr_accessor :address_country + # Address line 1 (Street address / PO Box / Company name). + sig { returns(String) } + attr_accessor :address_line1 + # Address line 2 (Apartment / Suite / Unit / Building). + sig { returns(String) } + attr_accessor :address_line2 + # State / County / Province / Region. + sig { returns(String) } + attr_accessor :address_state + # ZIP or postal code. + sig { returns(String) } + attr_accessor :address_zip + # Required in order to add the card to an account; in all other cases, this parameter is not used. When added to an account, the card (which must be a debit card) can be used as a transfer destination for funds in this currency. + sig { returns(String) } + attr_accessor :currency + # Card security code. Highly recommended to always include this value. + sig { returns(String) } + attr_accessor :cvc + # Two-digit number representing the card's expiration month. + sig { returns(String) } + attr_accessor :exp_month + # Two- or four-digit number representing the card's expiration year. + sig { returns(String) } + attr_accessor :exp_year + # Cardholder's full name. + sig { returns(String) } + attr_accessor :name + # Contains information about card networks used to process the payment. + sig { returns(::Stripe::TokenService::CreateParams::Card::Networks) } + attr_accessor :networks + # The card number, as a string without any separators. + sig { returns(String) } + attr_accessor :number + sig { + params(address_city: String, address_country: String, address_line1: String, address_line2: String, address_state: String, address_zip: String, currency: String, cvc: String, exp_month: String, exp_year: String, name: String, networks: ::Stripe::TokenService::CreateParams::Card::Networks, number: String).void + } + def initialize( + address_city: nil, + address_country: nil, + address_line1: nil, + address_line2: nil, + address_state: nil, + address_zip: nil, + currency: nil, + cvc: nil, + exp_month: nil, + exp_year: nil, + name: nil, + networks: nil, + number: nil + ); end + end + class CvcUpdate < Stripe::RequestParams + # The CVC value, in string form. + sig { returns(String) } + attr_accessor :cvc + sig { params(cvc: String).void } + def initialize(cvc: nil); end + end + class Person < Stripe::RequestParams + class AdditionalTosAcceptances < Stripe::RequestParams + class Account < Stripe::RequestParams + # The Unix timestamp marking when the account representative accepted the service agreement. + sig { returns(Integer) } + attr_accessor :date + # The IP address from which the account representative accepted the service agreement. + sig { returns(String) } + attr_accessor :ip + # The user agent of the browser from which the account representative accepted the service agreement. + sig { returns(T.nilable(String)) } + attr_accessor :user_agent + sig { params(date: Integer, ip: String, user_agent: T.nilable(String)).void } + def initialize(date: nil, ip: nil, user_agent: nil); end + end + # Details on the legal guardian's acceptance of the main Stripe service agreement. + sig { + returns(::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances::Account) + } + attr_accessor :account + sig { + params(account: ::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances::Account).void + } + def initialize(account: nil); end + end + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class AddressKana < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class AddressKanji < Stripe::RequestParams + # City or ward. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Block or building number. + sig { returns(String) } + attr_accessor :line1 + # Building details. + sig { returns(String) } + attr_accessor :line2 + # Postal code. + sig { returns(String) } + attr_accessor :postal_code + # Prefecture. + sig { returns(String) } + attr_accessor :state + # Town or cho-me. + sig { returns(String) } + attr_accessor :town + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String, town: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil, + town: nil + ); end + end + class Dob < Stripe::RequestParams + # The day of birth, between 1 and 31. + sig { returns(Integer) } + attr_accessor :day + # The month of birth, between 1 and 12. + sig { returns(Integer) } + attr_accessor :month + # The four-digit year of birth. + sig { returns(Integer) } + attr_accessor :year + sig { params(day: Integer, month: Integer, year: Integer).void } + def initialize(day: nil, month: nil, year: nil); end + end + class Documents < Stripe::RequestParams + class CompanyAuthorization < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Passport < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + class Visa < Stripe::RequestParams + # One or more document ids returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `account_requirement`. + sig { returns(T::Array[String]) } + attr_accessor :files + sig { params(files: T::Array[String]).void } + def initialize(files: nil); end + end + # One or more documents that demonstrate proof that this person is authorized to represent the company. + sig { + returns(::Stripe::TokenService::CreateParams::Person::Documents::CompanyAuthorization) + } + attr_accessor :company_authorization + # One or more documents showing the person's passport page with photo and personal data. + sig { returns(::Stripe::TokenService::CreateParams::Person::Documents::Passport) } + attr_accessor :passport + # One or more documents showing the person's visa required for living in the country where they are residing. + sig { returns(::Stripe::TokenService::CreateParams::Person::Documents::Visa) } + attr_accessor :visa + sig { + params(company_authorization: ::Stripe::TokenService::CreateParams::Person::Documents::CompanyAuthorization, passport: ::Stripe::TokenService::CreateParams::Person::Documents::Passport, visa: ::Stripe::TokenService::CreateParams::Person::Documents::Visa).void + } + def initialize(company_authorization: nil, passport: nil, visa: nil); end + end + class RegisteredAddress < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + class Relationship < Stripe::RequestParams + # Whether the person is the authorizer of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :authorizer + # Whether the person is a director of the account's legal entity. Directors are typically members of the governing board of the company, or responsible for ensuring the company meets its regulatory obligations. + sig { returns(T::Boolean) } + attr_accessor :director + # Whether the person has significant responsibility to control, manage, or direct the organization. + sig { returns(T::Boolean) } + attr_accessor :executive + # Whether the person is the legal guardian of the account's representative. + sig { returns(T::Boolean) } + attr_accessor :legal_guardian + # Whether the person is an owner of the account’s legal entity. + sig { returns(T::Boolean) } + attr_accessor :owner + # The percent owned by the person of the account's legal entity. + sig { returns(T.nilable(Float)) } + attr_accessor :percent_ownership + # Whether the person is authorized as the primary representative of the account. This is the person nominated by the business to provide information about themselves, and general information about the account. There can only be one representative at any given time. At the time the account is created, this person should be set to the person responsible for opening the account. + sig { returns(T::Boolean) } + attr_accessor :representative + # The person's title (e.g., CEO, Support Engineer). + sig { returns(String) } + attr_accessor :title + sig { + params(authorizer: T::Boolean, director: T::Boolean, executive: T::Boolean, legal_guardian: T::Boolean, owner: T::Boolean, percent_ownership: T.nilable(Float), representative: T::Boolean, title: String).void + } + def initialize( + authorizer: nil, + director: nil, + executive: nil, + legal_guardian: nil, + owner: nil, + percent_ownership: nil, + representative: nil, + title: nil + ); end + end + class Verification < Stripe::RequestParams + class AdditionalDocument < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + class Document < Stripe::RequestParams + # The back of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :back + # The front of an ID returned by a [file upload](https://stripe.com/docs/api#create_file) with a `purpose` value of `identity_document`. The uploaded file needs to be a color image (smaller than 8,000px by 8,000px), in JPG, PNG, or PDF format, and less than 10 MB in size. + sig { returns(String) } + attr_accessor :front + sig { params(back: String, front: String).void } + def initialize(back: nil, front: nil); end + end + # A document showing address, either a passport, local ID card, or utility bill from a well-known utility company. + sig { + returns(::Stripe::TokenService::CreateParams::Person::Verification::AdditionalDocument) + } + attr_accessor :additional_document + # An identifying document, either a passport or local ID card. + sig { returns(::Stripe::TokenService::CreateParams::Person::Verification::Document) } + attr_accessor :document + sig { + params(additional_document: ::Stripe::TokenService::CreateParams::Person::Verification::AdditionalDocument, document: ::Stripe::TokenService::CreateParams::Person::Verification::Document).void + } + def initialize(additional_document: nil, document: nil); end + end + # Details on the legal guardian's or authorizer's acceptance of the required Stripe agreements. + sig { returns(::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances) } + attr_accessor :additional_tos_acceptances + # The person's address. + sig { returns(::Stripe::TokenService::CreateParams::Person::Address) } + attr_accessor :address + # The Kana variation of the person's address (Japan only). + sig { returns(::Stripe::TokenService::CreateParams::Person::AddressKana) } + attr_accessor :address_kana + # The Kanji variation of the person's address (Japan only). + sig { returns(::Stripe::TokenService::CreateParams::Person::AddressKanji) } + attr_accessor :address_kanji + # The person's date of birth. + sig { returns(T.nilable(::Stripe::TokenService::CreateParams::Person::Dob)) } + attr_accessor :dob + # Documents that may be submitted to satisfy various informational requests. + sig { returns(::Stripe::TokenService::CreateParams::Person::Documents) } + attr_accessor :documents + # The person's email address. + sig { returns(String) } + attr_accessor :email + # The person's first name. + sig { returns(String) } + attr_accessor :first_name + # The Kana variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kana + # The Kanji variation of the person's first name (Japan only). + sig { returns(String) } + attr_accessor :first_name_kanji + # A list of alternate names or aliases that the person is known by. + sig { returns(T.nilable(T::Array[String])) } + attr_accessor :full_name_aliases + # The person's gender (International regulations require either "male" or "female"). + sig { returns(String) } + attr_accessor :gender + # The person's ID number, as appropriate for their country. For example, a social security number in the U.S., social insurance number in Canada, etc. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number + # The person's secondary ID number, as appropriate for their country, will be used for enhanced verification checks. In Thailand, this would be the laser code found on the back of an ID card. Instead of the number itself, you can also provide a [PII token provided by Stripe.js](https://docs.stripe.com/js/tokens/create_token?type=pii). + sig { returns(String) } + attr_accessor :id_number_secondary + # The person's last name. + sig { returns(String) } + attr_accessor :last_name + # The Kana variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kana + # The Kanji variation of the person's last name (Japan only). + sig { returns(String) } + attr_accessor :last_name_kanji + # The person's maiden name. + sig { returns(String) } + attr_accessor :maiden_name + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The country where the person is a national. Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)), or "XX" if unavailable. + sig { returns(String) } + attr_accessor :nationality + # The person's phone number. + sig { returns(String) } + attr_accessor :phone + # Indicates if the person or any of their representatives, family members, or other closely related persons, declares that they hold or have held an important public job or function, in any jurisdiction. + sig { returns(String) } + attr_accessor :political_exposure + # The person's registered address. + sig { returns(::Stripe::TokenService::CreateParams::Person::RegisteredAddress) } + attr_accessor :registered_address + # The relationship that this person has with the account's legal entity. + sig { returns(::Stripe::TokenService::CreateParams::Person::Relationship) } + attr_accessor :relationship + # The last four digits of the person's Social Security number (U.S. only). + sig { returns(String) } + attr_accessor :ssn_last_4 + # The person's verification status. + sig { returns(::Stripe::TokenService::CreateParams::Person::Verification) } + attr_accessor :verification + sig { + params(additional_tos_acceptances: ::Stripe::TokenService::CreateParams::Person::AdditionalTosAcceptances, address: ::Stripe::TokenService::CreateParams::Person::Address, address_kana: ::Stripe::TokenService::CreateParams::Person::AddressKana, address_kanji: ::Stripe::TokenService::CreateParams::Person::AddressKanji, dob: T.nilable(::Stripe::TokenService::CreateParams::Person::Dob), documents: ::Stripe::TokenService::CreateParams::Person::Documents, email: String, first_name: String, first_name_kana: String, first_name_kanji: String, full_name_aliases: T.nilable(T::Array[String]), gender: String, id_number: String, id_number_secondary: String, last_name: String, last_name_kana: String, last_name_kanji: String, maiden_name: String, metadata: T.nilable(T::Hash[String, String]), nationality: String, phone: String, political_exposure: String, registered_address: ::Stripe::TokenService::CreateParams::Person::RegisteredAddress, relationship: ::Stripe::TokenService::CreateParams::Person::Relationship, ssn_last_4: String, verification: ::Stripe::TokenService::CreateParams::Person::Verification).void + } + def initialize( + additional_tos_acceptances: nil, + address: nil, + address_kana: nil, + address_kanji: nil, + dob: nil, + documents: nil, + email: nil, + first_name: nil, + first_name_kana: nil, + first_name_kanji: nil, + full_name_aliases: nil, + gender: nil, + id_number: nil, + id_number_secondary: nil, + last_name: nil, + last_name_kana: nil, + last_name_kanji: nil, + maiden_name: nil, + metadata: nil, + nationality: nil, + phone: nil, + political_exposure: nil, + registered_address: nil, + relationship: nil, + ssn_last_4: nil, + verification: nil + ); end + end + class Pii < Stripe::RequestParams + # The `id_number` for the PII, in string form. + sig { returns(String) } + attr_accessor :id_number + sig { params(id_number: String).void } + def initialize(id_number: nil); end + end + # Information for the account this token represents. + sig { returns(::Stripe::TokenService::CreateParams::Account) } + attr_accessor :account + # The bank account this token will represent. + sig { returns(::Stripe::TokenService::CreateParams::BankAccount) } + attr_accessor :bank_account + # The card this token will represent. If you also pass in a customer, the card must be the ID of a card belonging to the customer. Otherwise, if you do not pass in a customer, this is a dictionary containing a user's credit card details, with the options described below. + sig { returns(T.any(::Stripe::TokenService::CreateParams::Card, String)) } + attr_accessor :card + # Create a token for the customer, which is owned by the application's account. You can only use this with an [OAuth access token](https://stripe.com/docs/connect/standard-accounts) or [Stripe-Account header](https://stripe.com/docs/connect/authentication). Learn more about [cloning saved payment methods](https://stripe.com/docs/connect/cloning-saved-payment-methods). + sig { returns(String) } + attr_accessor :customer + # The updated CVC value this token represents. + sig { returns(::Stripe::TokenService::CreateParams::CvcUpdate) } + attr_accessor :cvc_update + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Information for the person this token represents. + sig { returns(::Stripe::TokenService::CreateParams::Person) } + attr_accessor :person + # The PII this token represents. + sig { returns(::Stripe::TokenService::CreateParams::Pii) } + attr_accessor :pii + sig { + params(account: ::Stripe::TokenService::CreateParams::Account, bank_account: ::Stripe::TokenService::CreateParams::BankAccount, card: T.any(::Stripe::TokenService::CreateParams::Card, String), customer: String, cvc_update: ::Stripe::TokenService::CreateParams::CvcUpdate, expand: T::Array[String], person: ::Stripe::TokenService::CreateParams::Person, pii: ::Stripe::TokenService::CreateParams::Pii).void + } + def initialize( + account: nil, + bank_account: nil, + card: nil, + customer: nil, + cvc_update: nil, + expand: nil, + person: nil, + pii: nil + ); end + end + # Creates a single-use token that represents a bank account's details. + # You can use this token with any v1 API method in place of a bank account dictionary. You can only use this token once. To do so, attach it to a [connected account](https://stripe.com/docs/api#accounts) where [controller.requirement_collection](https://stripe.com/api/accounts/object#account_object-controller-requirement_collection) is application, which includes Custom accounts. + sig { + params(params: T.any(::Stripe::TokenService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Token) + } + def create(params = {}, opts = {}); end + + # Retrieves the token with the given ID. + sig { + params(token: String, params: T.any(::Stripe::TokenService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Token) + } + def retrieve(token, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/topup_service.rbi b/rbi/stripe/services/topup_service.rbi new file mode 100644 index 000000000..5a93335f4 --- /dev/null +++ b/rbi/stripe/services/topup_service.rbi @@ -0,0 +1,172 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TopupService < StripeService + class ListParams < Stripe::RequestParams + class Amount < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # A positive integer representing how much to transfer. + sig { returns(T.any(::Stripe::TopupService::ListParams::Amount, Integer)) } + attr_accessor :amount + # A filter on the list, based on the object `created` field. The value can be a string with an integer Unix timestamp, or it can be a dictionary with a number of different query options. + sig { returns(T.any(::Stripe::TopupService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return top-ups that have the given status. One of `canceled`, `failed`, `pending` or `succeeded`. + sig { returns(String) } + attr_accessor :status + sig { + params(amount: T.any(::Stripe::TopupService::ListParams::Amount, Integer), created: T.any(::Stripe::TopupService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, status: String).void + } + def initialize( + amount: nil, + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # A positive integer representing how much to transfer. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The ID of a source to transfer funds from. For most users, this should be left unspecified which will use the bank account that was set up in the dashboard for the specified currency. In test mode, this can be a test bank token (see [Testing Top-ups](https://stripe.com/docs/connect/testing#testing-top-ups)). + sig { returns(String) } + attr_accessor :source + # Extra information about a top-up for the source's bank statement. Limited to 15 ASCII characters. + sig { returns(String) } + attr_accessor :statement_descriptor + # A string that identifies this top-up as part of a group. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), source: String, statement_descriptor: String, transfer_group: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + metadata: nil, + source: nil, + statement_descriptor: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels a top-up. Only pending top-ups can be canceled. + sig { + params(topup: String, params: T.any(::Stripe::TopupService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def cancel(topup, params = {}, opts = {}); end + + # Top up the balance of an account + sig { + params(params: T.any(::Stripe::TopupService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def create(params = {}, opts = {}); end + + # Returns a list of top-ups. + sig { + params(params: T.any(::Stripe::TopupService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a top-up that has previously been created. Supply the unique top-up ID that was returned from your previous request, and Stripe will return the corresponding top-up information. + sig { + params(topup: String, params: T.any(::Stripe::TopupService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def retrieve(topup, params = {}, opts = {}); end + + # Updates the metadata of a top-up. Other top-up details are not editable by design. + sig { + params(topup: String, params: T.any(::Stripe::TopupService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Topup) + } + def update(topup, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/transfer_reversal_service.rbi b/rbi/stripe/services/transfer_reversal_service.rbi new file mode 100644 index 000000000..53ed3a8fa --- /dev/null +++ b/rbi/stripe/services/transfer_reversal_service.rbi @@ -0,0 +1,99 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TransferReversalService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # A positive integer in cents (or local equivalent) representing how much of this transfer to reverse. Can only reverse up to the unreversed amount remaining of the transfer. Partial transfer reversals are only allowed for transfers to Stripe Accounts. Defaults to the entire transfer amount. + sig { returns(Integer) } + attr_accessor :amount + # An arbitrary string which you can attach to a reversal object. This will be unset if you POST an empty value. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # Boolean indicating whether the application fee should be refunded when reversing this transfer. If a full transfer reversal is given, the full application fee will be refunded. Otherwise, the application fee will be refunded with an amount proportional to the amount of the transfer reversed. + sig { returns(T::Boolean) } + attr_accessor :refund_application_fee + sig { + params(amount: Integer, description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), refund_application_fee: T::Boolean).void + } + def initialize( + amount: nil, + description: nil, + expand: nil, + metadata: nil, + refund_application_fee: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { params(expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void } + def initialize(expand: nil, metadata: nil); end + end + # When you create a new reversal, you must specify a transfer to create it on. + # + # When reversing transfers, you can optionally reverse part of the transfer. You can do so as many times as you wish until the entire transfer has been reversed. + # + # Once entirely reversed, a transfer can't be reversed again. This method will return an error when called on an already-reversed transfer, or when trying to reverse more money than is left on a transfer. + sig { + params(id: String, params: T.any(::Stripe::TransferReversalService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reversal) + } + def create(id, params = {}, opts = {}); end + + # You can see a list of the reversals belonging to a specific transfer. Note that the 10 most recent reversals are always available by default on the transfer object. If you need more than those 10, you can use this API method and the limit and starting_after parameters to page through additional reversals. + sig { + params(id: String, params: T.any(::Stripe::TransferReversalService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(id, params = {}, opts = {}); end + + # By default, you can see the 10 most recent reversals stored directly on the transfer object, but you can also retrieve details about a specific reversal stored on the transfer. + sig { + params(transfer: String, id: String, params: T.any(::Stripe::TransferReversalService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reversal) + } + def retrieve(transfer, id, params = {}, opts = {}); end + + # Updates the specified reversal by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + # + # This request only accepts metadata and description as arguments. + sig { + params(transfer: String, id: String, params: T.any(::Stripe::TransferReversalService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Reversal) + } + def update(transfer, id, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/transfer_service.rbi b/rbi/stripe/services/transfer_service.rbi new file mode 100644 index 000000000..09a79d4e3 --- /dev/null +++ b/rbi/stripe/services/transfer_service.rbi @@ -0,0 +1,150 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TransferService < StripeService + attr_reader :reversals + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return transfers that were created during the given date interval. + sig { returns(T.any(::Stripe::TransferService::ListParams::Created, Integer)) } + attr_accessor :created + # Only return transfers for the destination specified by this account ID. + sig { returns(String) } + attr_accessor :destination + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return transfers with the specified transfer group. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(created: T.any(::Stripe::TransferService::ListParams::Created, Integer), destination: String, ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String, transfer_group: String).void + } + def initialize( + created: nil, + destination: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil, + transfer_group: nil + ); end + end + class CreateParams < Stripe::RequestParams + # A positive integer in cents (or local equivalent) representing how much to transfer. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO code for currency](https://www.iso.org/iso-4217-currency-codes.html) in lowercase. Must be a [supported currency](https://docs.stripe.com/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The ID of a connected Stripe account. See the Connect documentation for details. + sig { returns(String) } + attr_accessor :destination + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # You can use this parameter to transfer funds from a charge before they are added to your available balance. A pending balance will transfer immediately but the funds will not become available until the original charge becomes available. [See the Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-availability) for details. + sig { returns(String) } + attr_accessor :source_transaction + # The source balance to use for this transfer. One of `bank_account`, `card`, or `fpx`. For most users, this will default to `card`. + sig { returns(String) } + attr_accessor :source_type + # A string that identifies this transaction as part of a group. See the [Connect documentation](https://stripe.com/docs/connect/separate-charges-and-transfers#transfer-options) for details. + sig { returns(String) } + attr_accessor :transfer_group + sig { + params(amount: Integer, currency: String, description: String, destination: String, expand: T::Array[String], metadata: T::Hash[String, String], source_transaction: String, source_type: String, transfer_group: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + destination: nil, + expand: nil, + metadata: nil, + source_transaction: nil, + source_type: nil, + transfer_group: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + sig { + params(description: String, expand: T::Array[String], metadata: T.nilable(T::Hash[String, String])).void + } + def initialize(description: nil, expand: nil, metadata: nil); end + end + # To send funds from your Stripe account to a connected account, you create a new transfer object. Your [Stripe balance](https://stripe.com/docs/api#balance) must be able to cover the transfer amount, or you'll receive an “Insufficient Funds” error. + sig { + params(params: T.any(::Stripe::TransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer) + } + def create(params = {}, opts = {}); end + + # Returns a list of existing transfers sent to connected accounts. The transfers are returned in sorted order, with the most recently created transfers appearing first. + sig { + params(params: T.any(::Stripe::TransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing transfer. Supply the unique transfer ID from either a transfer creation request or the transfer list, and Stripe will return the corresponding transfer information. + sig { + params(transfer: String, params: T.any(::Stripe::TransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer) + } + def retrieve(transfer, params = {}, opts = {}); end + + # Updates the specified transfer by setting the values of the parameters passed. Any parameters not provided will be left unchanged. + # + # This request accepts only metadata as an argument. + sig { + params(transfer: String, params: T.any(::Stripe::TransferService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Transfer) + } + def update(transfer, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/credit_reversal_service.rbi b/rbi/stripe/services/treasury/credit_reversal_service.rbi new file mode 100644 index 000000000..7652d4a89 --- /dev/null +++ b/rbi/stripe/services/treasury/credit_reversal_service.rbi @@ -0,0 +1,84 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class CreditReversalService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return CreditReversals for the ReceivedCredit ID. + sig { returns(String) } + attr_accessor :received_credit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return CreditReversals for a given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, received_credit: String, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_credit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ReceivedCredit to reverse. + sig { returns(String) } + attr_accessor :received_credit + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], received_credit: String).void + } + def initialize(expand: nil, metadata: nil, received_credit: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Reverses a ReceivedCredit and creates a CreditReversal object. + sig { + params(params: T.any(::Stripe::Treasury::CreditReversalService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::CreditReversal) + } + def create(params = {}, opts = {}); end + + # Returns a list of CreditReversals. + sig { + params(params: T.any(::Stripe::Treasury::CreditReversalService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing CreditReversal by passing the unique CreditReversal ID from either the CreditReversal creation request or CreditReversal list + sig { + params(credit_reversal: String, params: T.any(::Stripe::Treasury::CreditReversalService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::CreditReversal) + } + def retrieve(credit_reversal, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/debit_reversal_service.rbi b/rbi/stripe/services/treasury/debit_reversal_service.rbi new file mode 100644 index 000000000..f25611505 --- /dev/null +++ b/rbi/stripe/services/treasury/debit_reversal_service.rbi @@ -0,0 +1,88 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class DebitReversalService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return DebitReversals for the ReceivedDebit ID. + sig { returns(String) } + attr_accessor :received_debit + # Only return DebitReversals for a given resolution. + sig { returns(String) } + attr_accessor :resolution + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return DebitReversals for a given status. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, received_debit: String, resolution: String, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + received_debit: nil, + resolution: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The ReceivedDebit to reverse. + sig { returns(String) } + attr_accessor :received_debit + sig { + params(expand: T::Array[String], metadata: T::Hash[String, String], received_debit: String).void + } + def initialize(expand: nil, metadata: nil, received_debit: nil); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Reverses a ReceivedDebit and creates a DebitReversal object. + sig { + params(params: T.any(::Stripe::Treasury::DebitReversalService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::DebitReversal) + } + def create(params = {}, opts = {}); end + + # Returns a list of DebitReversals. + sig { + params(params: T.any(::Stripe::Treasury::DebitReversalService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a DebitReversal object. + sig { + params(debit_reversal: String, params: T.any(::Stripe::Treasury::DebitReversalService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::DebitReversal) + } + def retrieve(debit_reversal, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/financial_account_features_service.rbi b/rbi/stripe/services/treasury/financial_account_features_service.rbi new file mode 100644 index 000000000..8112d0642 --- /dev/null +++ b/rbi/stripe/services/treasury/financial_account_features_service.rbi @@ -0,0 +1,201 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class FinancialAccountFeaturesService < StripeService + class UpdateParams < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + sig { returns(String) } + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(bank: String, requested: T::Boolean).void } + def initialize(bank: nil, requested: nil); end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses::Aba) + } + attr_accessor :aba + sig { + params(aba: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses::Aba).void + } + def initialize(aba: nil); end + end + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH Debits via the InboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers::Ach) + } + attr_accessor :ach + sig { + params(ach: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers::Ach).void + } + def initialize(ach: nil); end + end + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::CardIssuing) + } + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::DepositInsurance) + } + attr_accessor :deposit_insurance + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Contains Features that add FinancialAddresses to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses) + } + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers) + } + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::IntraStripeFlows) + } + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments) + } + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers) + } + attr_accessor :outbound_transfers + sig { + params(card_issuing: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::CardIssuing, deposit_insurance: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::DepositInsurance, expand: T::Array[String], financial_addresses: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::FinancialAddresses, inbound_transfers: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::InboundTransfers, intra_stripe_flows: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::IntraStripeFlows, outbound_payments: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundPayments, outbound_transfers: ::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams::OutboundTransfers).void + } + def initialize( + card_issuing: nil, + deposit_insurance: nil, + expand: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves Features information associated with the FinancialAccount. + sig { + params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountFeaturesService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures) + } + def retrieve(financial_account, params = {}, opts = {}); end + + # Updates the Features associated with a FinancialAccount. + sig { + params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountFeaturesService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccountFeatures) + } + def update(financial_account, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/financial_account_service.rbi b/rbi/stripe/services/treasury/financial_account_service.rbi new file mode 100644 index 000000000..24b1bcd81 --- /dev/null +++ b/rbi/stripe/services/treasury/financial_account_service.rbi @@ -0,0 +1,506 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class FinancialAccountService < StripeService + attr_reader :features + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return FinancialAccounts that were created during the given date interval. + sig { + returns(T.any(::Stripe::Treasury::FinancialAccountService::ListParams::Created, Integer)) + } + attr_accessor :created + # An object ID cursor for use in pagination. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit ranging from 1 to 100 (defaults to 10). + sig { returns(Integer) } + attr_accessor :limit + # An object ID cursor for use in pagination. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(created: T.any(::Stripe::Treasury::FinancialAccountService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + limit: nil, + starting_after: nil + ); end + end + class CreateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + sig { returns(String) } + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(bank: String, requested: T::Boolean).void } + def initialize(bank: nil, requested: nil); end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses::Aba) + } + attr_accessor :aba + sig { + params(aba: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses::Aba).void + } + def initialize(aba: nil); end + end + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH Debits via the InboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers::Ach) + } + attr_accessor :ach + sig { + params(ach: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers::Ach).void + } + def initialize(ach: nil); end + end + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::CardIssuing) + } + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::DepositInsurance) + } + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses) + } + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers) + } + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::IntraStripeFlows) + } + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments) + } + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers) + } + attr_accessor :outbound_transfers + sig { + params(card_issuing: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::CardIssuing, deposit_insurance: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::DepositInsurance, financial_addresses: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::FinancialAddresses, inbound_transfers: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::InboundTransfers, intra_stripe_flows: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::IntraStripeFlows, outbound_payments: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundPayments, outbound_transfers: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features::OutboundTransfers).void + } + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ); end + end + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + sig { returns(String) } + attr_accessor :inbound_flows + # Restricts all outbound money movement. + sig { returns(String) } + attr_accessor :outbound_flows + sig { params(inbound_flows: String, outbound_flows: String).void } + def initialize(inbound_flows: nil, outbound_flows: nil); end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + sig { returns(T.nilable(String)) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature. Stripe or the platform can control features via the requested field. + sig { returns(::Stripe::Treasury::FinancialAccountService::CreateParams::Features) } + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::CreateParams::PlatformRestrictions) + } + attr_accessor :platform_restrictions + # The currencies the FinancialAccount can hold a balance in. + sig { returns(T::Array[String]) } + attr_accessor :supported_currencies + sig { + params(display_name: T.nilable(String), expand: T::Array[String], features: ::Stripe::Treasury::FinancialAccountService::CreateParams::Features, metadata: T::Hash[String, String], platform_restrictions: ::Stripe::Treasury::FinancialAccountService::CreateParams::PlatformRestrictions, supported_currencies: T::Array[String]).void + } + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil, + supported_currencies: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + class Features < Stripe::RequestParams + class CardIssuing < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class DepositInsurance < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class FinancialAddresses < Stripe::RequestParams + class Aba < Stripe::RequestParams + # Requested bank partner + sig { returns(String) } + attr_accessor :bank + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(bank: String, requested: T::Boolean).void } + def initialize(bank: nil, requested: nil); end + end + # Adds an ABA FinancialAddress to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses::Aba) + } + attr_accessor :aba + sig { + params(aba: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses::Aba).void + } + def initialize(aba: nil); end + end + class InboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH Debits via the InboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers::Ach) + } + attr_accessor :ach + sig { + params(ach: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers::Ach).void + } + def initialize(ach: nil); end + end + class IntraStripeFlows < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class OutboundPayments < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundPayments API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + class OutboundTransfers < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + class UsDomesticWire < Stripe::RequestParams + # Whether the FinancialAccount should have the Feature. + sig { returns(T::Boolean) } + attr_accessor :requested + sig { params(requested: T::Boolean).void } + def initialize(requested: nil); end + end + # Enables ACH transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::Ach) + } + attr_accessor :ach + # Enables US domestic wire transfers via the OutboundTransfers API. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::UsDomesticWire) + } + attr_accessor :us_domestic_wire + sig { + params(ach: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::Ach, us_domestic_wire: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers::UsDomesticWire).void + } + def initialize(ach: nil, us_domestic_wire: nil); end + end + # Encodes the FinancialAccount's ability to be used with the Issuing product, including attaching cards to and drawing funds from the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::CardIssuing) + } + attr_accessor :card_issuing + # Represents whether this FinancialAccount is eligible for deposit insurance. Various factors determine the insurance amount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::DepositInsurance) + } + attr_accessor :deposit_insurance + # Contains Features that add FinancialAddresses to the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses) + } + attr_accessor :financial_addresses + # Contains settings related to adding funds to a FinancialAccount from another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers) + } + attr_accessor :inbound_transfers + # Represents the ability for the FinancialAccount to send money to, or receive money from other FinancialAccounts (for example, via OutboundPayment). + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::IntraStripeFlows) + } + attr_accessor :intra_stripe_flows + # Includes Features related to initiating money movement out of the FinancialAccount to someone else's bucket of money. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments) + } + attr_accessor :outbound_payments + # Contains a Feature and settings related to moving money out of the FinancialAccount into another Account with the same owner. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers) + } + attr_accessor :outbound_transfers + sig { + params(card_issuing: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::CardIssuing, deposit_insurance: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::DepositInsurance, financial_addresses: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::FinancialAddresses, inbound_transfers: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::InboundTransfers, intra_stripe_flows: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::IntraStripeFlows, outbound_payments: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundPayments, outbound_transfers: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features::OutboundTransfers).void + } + def initialize( + card_issuing: nil, + deposit_insurance: nil, + financial_addresses: nil, + inbound_transfers: nil, + intra_stripe_flows: nil, + outbound_payments: nil, + outbound_transfers: nil + ); end + end + class PlatformRestrictions < Stripe::RequestParams + # Restricts all inbound money movement. + sig { returns(String) } + attr_accessor :inbound_flows + # Restricts all outbound money movement. + sig { returns(String) } + attr_accessor :outbound_flows + sig { params(inbound_flows: String, outbound_flows: String).void } + def initialize(inbound_flows: nil, outbound_flows: nil); end + end + # The display name for the FinancialAccount. Use this field to customize the names of the FinancialAccounts for your connected accounts. Unlike the `nickname` field, `display_name` is not internal metadata and will be exposed to connected accounts. + sig { returns(T.nilable(String)) } + attr_accessor :display_name + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Encodes whether a FinancialAccount has access to a particular feature, with a status enum and associated `status_details`. Stripe or the platform may control features via the requested field. + sig { returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::Features) } + attr_accessor :features + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The set of functionalities that the platform can restrict on the FinancialAccount. + sig { + returns(::Stripe::Treasury::FinancialAccountService::UpdateParams::PlatformRestrictions) + } + attr_accessor :platform_restrictions + sig { + params(display_name: T.nilable(String), expand: T::Array[String], features: ::Stripe::Treasury::FinancialAccountService::UpdateParams::Features, metadata: T::Hash[String, String], platform_restrictions: ::Stripe::Treasury::FinancialAccountService::UpdateParams::PlatformRestrictions).void + } + def initialize( + display_name: nil, + expand: nil, + features: nil, + metadata: nil, + platform_restrictions: nil + ); end + end + # Creates a new FinancialAccount. For now, each connected account can only have one FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::FinancialAccountService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount) + } + def create(params = {}, opts = {}); end + + # Returns a list of FinancialAccounts. + sig { + params(params: T.any(::Stripe::Treasury::FinancialAccountService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of a FinancialAccount. + sig { + params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount) + } + def retrieve(financial_account, params = {}, opts = {}); end + + # Updates the details of a FinancialAccount. + sig { + params(financial_account: String, params: T.any(::Stripe::Treasury::FinancialAccountService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::FinancialAccount) + } + def update(financial_account, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/inbound_transfer_service.rbi b/rbi/stripe/services/treasury/inbound_transfer_service.rbi new file mode 100644 index 000000000..81a0b0cac --- /dev/null +++ b/rbi/stripe/services/treasury/inbound_transfer_service.rbi @@ -0,0 +1,117 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class InboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return InboundTransfers that have the given status: `processing`, `succeeded`, `failed` or `canceled`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to send funds to. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The origin payment method to be debited for the InboundTransfer. + sig { returns(String) } + attr_accessor :origin_payment_method + # The complete description that appears on your customers' statements. Maximum 10 characters. + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, description: String, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], origin_payment_method: String, statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + expand: nil, + financial_account: nil, + metadata: nil, + origin_payment_method: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancels an InboundTransfer. + sig { + params(inbound_transfer: String, params: T.any(::Stripe::Treasury::InboundTransferService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def cancel(inbound_transfer, params = {}, opts = {}); end + + # Creates an InboundTransfer. + sig { + params(params: T.any(::Stripe::Treasury::InboundTransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def create(params = {}, opts = {}); end + + # Returns a list of InboundTransfers sent from the specified FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::InboundTransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing InboundTransfer. + sig { + params(id: String, params: T.any(::Stripe::Treasury::InboundTransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::InboundTransfer) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/outbound_payment_service.rbi b/rbi/stripe/services/treasury/outbound_payment_service.rbi new file mode 100644 index 000000000..6f427ce37 --- /dev/null +++ b/rbi/stripe/services/treasury/outbound_payment_service.rbi @@ -0,0 +1,300 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class OutboundPaymentService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return OutboundPayments that were created during the given date interval. + sig { + returns(T.any(::Stripe::Treasury::OutboundPaymentService::ListParams::Created, Integer)) + } + attr_accessor :created + # Only return OutboundPayments sent to this customer. + sig { returns(String) } + attr_accessor :customer + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return OutboundPayments that have the given status: `processing`, `failed`, `posted`, `returned`, or `canceled`. + sig { returns(String) } + attr_accessor :status + sig { + params(created: T.any(::Stripe::Treasury::OutboundPaymentService::ListParams::Created, Integer), customer: String, ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + created: nil, + customer: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodData < Stripe::RequestParams + class BillingDetails < Stripe::RequestParams + class Address < Stripe::RequestParams + # City, district, suburb, town, or village. + sig { returns(String) } + attr_accessor :city + # Two-letter country code ([ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2)). + sig { returns(String) } + attr_accessor :country + # Address line 1 (e.g., street, PO Box, or company name). + sig { returns(String) } + attr_accessor :line1 + # Address line 2 (e.g., apartment, suite, unit, or building). + sig { returns(String) } + attr_accessor :line2 + # ZIP or postal code. + sig { returns(String) } + attr_accessor :postal_code + # State, county, province, or region. + sig { returns(String) } + attr_accessor :state + sig { + params(city: String, country: String, line1: String, line2: String, postal_code: String, state: String).void + } + def initialize( + city: nil, + country: nil, + line1: nil, + line2: nil, + postal_code: nil, + state: nil + ); end + end + # Billing address. + sig { + returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails::Address)) + } + attr_accessor :address + # Email address. + sig { returns(T.nilable(String)) } + attr_accessor :email + # Full name. + sig { returns(T.nilable(String)) } + attr_accessor :name + # Billing phone number (including extension). + sig { returns(T.nilable(String)) } + attr_accessor :phone + sig { + params(address: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails::Address), email: T.nilable(String), name: T.nilable(String), phone: T.nilable(String)).void + } + def initialize(address: nil, email: nil, name: nil, phone: nil); end + end + class UsBankAccount < Stripe::RequestParams + # Account holder type: individual or company. + sig { returns(String) } + attr_accessor :account_holder_type + # Account number of the bank account. + sig { returns(String) } + attr_accessor :account_number + # Account type: checkings or savings. Defaults to checking if omitted. + sig { returns(String) } + attr_accessor :account_type + # The ID of a Financial Connections Account to use as a payment method. + sig { returns(String) } + attr_accessor :financial_connections_account + # Routing number of the bank account. + sig { returns(String) } + attr_accessor :routing_number + sig { + params(account_holder_type: String, account_number: String, account_type: String, financial_connections_account: String, routing_number: String).void + } + def initialize( + account_holder_type: nil, + account_number: nil, + account_type: nil, + financial_connections_account: nil, + routing_number: nil + ); end + end + # Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. + sig { + returns(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails) + } + attr_accessor :billing_details + # Required if type is set to `financial_account`. The FinancialAccount ID to send funds to. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type. + sig { returns(String) } + attr_accessor :type + # Required hash if type is set to `us_bank_account`. + sig { + returns(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::UsBankAccount) + } + attr_accessor :us_bank_account + sig { + params(billing_details: ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::BillingDetails, financial_account: String, metadata: T::Hash[String, String], type: String, us_bank_account: ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData::UsBankAccount).void + } + def initialize( + billing_details: nil, + financial_account: nil, + metadata: nil, + type: nil, + us_bank_account: nil + ); end + end + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + sig { params(network: String).void } + def initialize(network: nil); end + end + # Optional fields for `us_bank_account`. + sig { + returns(T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(us_bank_account: T.nilable(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)).void + } + def initialize(us_bank_account: nil); end + end + class EndUserDetails < Stripe::RequestParams + # IP address of the user initiating the OutboundPayment. Must be supplied if `present` is set to `true`. + sig { returns(String) } + attr_accessor :ip_address + # `True` if the OutboundPayment creation request is being made on behalf of an end user by a platform. Otherwise, `false`. + sig { returns(T::Boolean) } + attr_accessor :present + sig { params(ip_address: String, present: T::Boolean).void } + def initialize(ip_address: nil, present: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # ID of the customer to whom the OutboundPayment is sent. Must match the Customer attached to the `destination_payment_method` passed in. + sig { returns(String) } + attr_accessor :customer + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundPayment. Exclusive with `destination_payment_method_data`. + sig { returns(String) } + attr_accessor :destination_payment_method + # Hash used to generate the PaymentMethod to be used for this OutboundPayment. Exclusive with `destination_payment_method`. + sig { + returns(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData) + } + attr_accessor :destination_payment_method_data + # Payment method-specific configuration for this OutboundPayment. + sig { + returns(::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions) + } + attr_accessor :destination_payment_method_options + # End user details. + sig { returns(::Stripe::Treasury::OutboundPaymentService::CreateParams::EndUserDetails) } + attr_accessor :end_user_details + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to pull funds from. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # The description that appears on the receiving end for this OutboundPayment (for example, bank statement for external bank transfer). Maximum 10 characters for `ach` payments, 140 characters for `us_domestic_wire` payments, or 500 characters for `stripe` network transfers. The default value is "payment". + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, customer: String, description: String, destination_payment_method: String, destination_payment_method_data: ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodData, destination_payment_method_options: ::Stripe::Treasury::OutboundPaymentService::CreateParams::DestinationPaymentMethodOptions, end_user_details: ::Stripe::Treasury::OutboundPaymentService::CreateParams::EndUserDetails, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + customer: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_data: nil, + destination_payment_method_options: nil, + end_user_details: nil, + expand: nil, + financial_account: nil, + metadata: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Cancel an OutboundPayment. + sig { + params(id: String, params: T.any(::Stripe::Treasury::OutboundPaymentService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def cancel(id, params = {}, opts = {}); end + + # Creates an OutboundPayment. + sig { + params(params: T.any(::Stripe::Treasury::OutboundPaymentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def create(params = {}, opts = {}); end + + # Returns a list of OutboundPayments sent from the specified FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::OutboundPaymentService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing OutboundPayment by passing the unique OutboundPayment ID from either the OutboundPayment creation request or OutboundPayment list. + sig { + params(id: String, params: T.any(::Stripe::Treasury::OutboundPaymentService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundPayment) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/outbound_transfer_service.rbi b/rbi/stripe/services/treasury/outbound_transfer_service.rbi new file mode 100644 index 000000000..ee5599bbf --- /dev/null +++ b/rbi/stripe/services/treasury/outbound_transfer_service.rbi @@ -0,0 +1,166 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class OutboundTransferService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return OutboundTransfers that have the given status: `processing`, `canceled`, `failed`, `posted`, or `returned`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class CreateParams < Stripe::RequestParams + class DestinationPaymentMethodOptions < Stripe::RequestParams + class UsBankAccount < Stripe::RequestParams + # Specifies the network rails to be used. If not set, will default to the PaymentMethod's preferred network. See the [docs](https://stripe.com/docs/treasury/money-movement/timelines) to learn more about money movement timelines for each network type. + sig { returns(String) } + attr_accessor :network + sig { params(network: String).void } + def initialize(network: nil); end + end + # Optional fields for `us_bank_account`. + sig { + returns(T.nilable(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)) + } + attr_accessor :us_bank_account + sig { + params(us_bank_account: T.nilable(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions::UsBankAccount)).void + } + def initialize(us_bank_account: nil); end + end + class NetworkDetails < Stripe::RequestParams + class Ach < Stripe::RequestParams + # Addenda record data associated with this OutboundTransfer. + sig { returns(String) } + attr_accessor :addenda + sig { params(addenda: String).void } + def initialize(addenda: nil); end + end + # Optional fields for `ach`. + sig { + returns(::Stripe::Treasury::OutboundTransferService::CreateParams::NetworkDetails::Ach) + } + attr_accessor :ach + # The type of flow that originated the OutboundTransfer. + sig { returns(String) } + attr_accessor :type + sig { + params(ach: ::Stripe::Treasury::OutboundTransferService::CreateParams::NetworkDetails::Ach, type: String).void + } + def initialize(ach: nil, type: nil); end + end + # Amount (in cents) to be transferred. + sig { returns(Integer) } + attr_accessor :amount + # Three-letter [ISO currency code](https://www.iso.org/iso-4217-currency-codes.html), in lowercase. Must be a [supported currency](https://stripe.com/docs/currencies). + sig { returns(String) } + attr_accessor :currency + # An arbitrary string attached to the object. Often useful for displaying to users. + sig { returns(String) } + attr_accessor :description + # The PaymentMethod to use as the payment instrument for the OutboundTransfer. + sig { returns(String) } + attr_accessor :destination_payment_method + # Hash describing payment method configuration details. + sig { + returns(::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions) + } + attr_accessor :destination_payment_method_options + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount to pull funds from. + sig { returns(String) } + attr_accessor :financial_account + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Details about the network used for the OutboundTransfer. + sig { returns(::Stripe::Treasury::OutboundTransferService::CreateParams::NetworkDetails) } + attr_accessor :network_details + # Statement descriptor to be shown on the receiving end of an OutboundTransfer. Maximum 10 characters for `ach` transfers or 140 characters for `us_domestic_wire` transfers. The default value is "transfer". + sig { returns(String) } + attr_accessor :statement_descriptor + sig { + params(amount: Integer, currency: String, description: String, destination_payment_method: String, destination_payment_method_options: ::Stripe::Treasury::OutboundTransferService::CreateParams::DestinationPaymentMethodOptions, expand: T::Array[String], financial_account: String, metadata: T::Hash[String, String], network_details: ::Stripe::Treasury::OutboundTransferService::CreateParams::NetworkDetails, statement_descriptor: String).void + } + def initialize( + amount: nil, + currency: nil, + description: nil, + destination_payment_method: nil, + destination_payment_method_options: nil, + expand: nil, + financial_account: nil, + metadata: nil, + network_details: nil, + statement_descriptor: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class CancelParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # An OutboundTransfer can be canceled if the funds have not yet been paid out. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::Treasury::OutboundTransferService::CancelParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def cancel(outbound_transfer, params = {}, opts = {}); end + + # Creates an OutboundTransfer. + sig { + params(params: T.any(::Stripe::Treasury::OutboundTransferService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def create(params = {}, opts = {}); end + + # Returns a list of OutboundTransfers sent from the specified FinancialAccount. + sig { + params(params: T.any(::Stripe::Treasury::OutboundTransferService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing OutboundTransfer by passing the unique OutboundTransfer ID from either the OutboundTransfer creation request or OutboundTransfer list. + sig { + params(outbound_transfer: String, params: T.any(::Stripe::Treasury::OutboundTransferService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::OutboundTransfer) + } + def retrieve(outbound_transfer, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/received_credit_service.rbi b/rbi/stripe/services/treasury/received_credit_service.rbi new file mode 100644 index 000000000..762f15692 --- /dev/null +++ b/rbi/stripe/services/treasury/received_credit_service.rbi @@ -0,0 +1,70 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class ReceivedCreditService < StripeService + class ListParams < Stripe::RequestParams + class LinkedFlows < Stripe::RequestParams + # The source flow type. + sig { returns(String) } + attr_accessor :source_flow_type + sig { params(source_flow_type: String).void } + def initialize(source_flow_type: nil); end + end + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount that received the funds. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # Only return ReceivedCredits described by the flow. + sig { returns(::Stripe::Treasury::ReceivedCreditService::ListParams::LinkedFlows) } + attr_accessor :linked_flows + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return ReceivedCredits that have the given status: `succeeded` or `failed`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, linked_flows: ::Stripe::Treasury::ReceivedCreditService::ListParams::LinkedFlows, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + linked_flows: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of ReceivedCredits. + sig { + params(params: T.any(::Stripe::Treasury::ReceivedCreditService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing ReceivedCredit by passing the unique ReceivedCredit ID from the ReceivedCredit list. + sig { + params(id: String, params: T.any(::Stripe::Treasury::ReceivedCreditService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedCredit) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/received_debit_service.rbi b/rbi/stripe/services/treasury/received_debit_service.rbi new file mode 100644 index 000000000..514aae6d9 --- /dev/null +++ b/rbi/stripe/services/treasury/received_debit_service.rbi @@ -0,0 +1,59 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class ReceivedDebitService < StripeService + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # The FinancialAccount that funds were pulled from. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return ReceivedDebits that have the given status: `succeeded` or `failed`. + sig { returns(String) } + attr_accessor :status + sig { + params(ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, starting_after: String, status: String).void + } + def initialize( + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + starting_after: nil, + status: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Returns a list of ReceivedDebits. + sig { + params(params: T.any(::Stripe::Treasury::ReceivedDebitService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing ReceivedDebit by passing the unique ReceivedDebit ID from the ReceivedDebit list + sig { + params(id: String, params: T.any(::Stripe::Treasury::ReceivedDebitService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::ReceivedDebit) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/transaction_entry_service.rbi b/rbi/stripe/services/treasury/transaction_entry_service.rbi new file mode 100644 index 000000000..251ac1364 --- /dev/null +++ b/rbi/stripe/services/treasury/transaction_entry_service.rbi @@ -0,0 +1,107 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class TransactionEntryService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class EffectiveAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Only return TransactionEntries that were created during the given date interval. + sig { + returns(T.any(::Stripe::Treasury::TransactionEntryService::ListParams::Created, Integer)) + } + attr_accessor :created + # Attribute for param field effective_at + sig { + returns(T.any(::Stripe::Treasury::TransactionEntryService::ListParams::EffectiveAt, Integer)) + } + attr_accessor :effective_at + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The results are in reverse chronological order by `created` or `effective_at`. The default is `created`. + sig { returns(String) } + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return TransactionEntries associated with this Transaction. + sig { returns(String) } + attr_accessor :transaction + sig { + params(created: T.any(::Stripe::Treasury::TransactionEntryService::ListParams::Created, Integer), effective_at: T.any(::Stripe::Treasury::TransactionEntryService::ListParams::EffectiveAt, Integer), ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, order_by: String, starting_after: String, transaction: String).void + } + def initialize( + created: nil, + effective_at: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + transaction: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves a list of TransactionEntry objects. + sig { + params(params: T.any(::Stripe::Treasury::TransactionEntryService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves a TransactionEntry object. + sig { + params(id: String, params: T.any(::Stripe::Treasury::TransactionEntryService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::TransactionEntry) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury/transaction_service.rbi b/rbi/stripe/services/treasury/transaction_service.rbi new file mode 100644 index 000000000..06ab68015 --- /dev/null +++ b/rbi/stripe/services/treasury/transaction_service.rbi @@ -0,0 +1,114 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module Treasury + class TransactionService < StripeService + class ListParams < Stripe::RequestParams + class Created < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + class StatusTransitions < Stripe::RequestParams + class PostedAt < Stripe::RequestParams + # Minimum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :gt + # Minimum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :gte + # Maximum value to filter by (exclusive) + sig { returns(Integer) } + attr_accessor :lt + # Maximum value to filter by (inclusive) + sig { returns(Integer) } + attr_accessor :lte + sig { params(gt: Integer, gte: Integer, lt: Integer, lte: Integer).void } + def initialize(gt: nil, gte: nil, lt: nil, lte: nil); end + end + # Returns Transactions with `posted_at` within the specified range. + sig { + returns(T.any(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions::PostedAt, Integer)) + } + attr_accessor :posted_at + sig { + params(posted_at: T.any(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions::PostedAt, Integer)).void + } + def initialize(posted_at: nil); end + end + # Only return Transactions that were created during the given date interval. + sig { returns(T.any(::Stripe::Treasury::TransactionService::ListParams::Created, Integer)) } + attr_accessor :created + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Returns objects associated with this FinancialAccount. + sig { returns(String) } + attr_accessor :financial_account + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # The results are in reverse chronological order by `created` or `posted_at`. The default is `created`. + sig { returns(String) } + attr_accessor :order_by + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + # Only return Transactions that have the given status: `open`, `posted`, or `void`. + sig { returns(String) } + attr_accessor :status + # A filter for the `status_transitions.posted_at` timestamp. When using this filter, `status=posted` and `order_by=posted_at` must also be specified. + sig { returns(::Stripe::Treasury::TransactionService::ListParams::StatusTransitions) } + attr_accessor :status_transitions + sig { + params(created: T.any(::Stripe::Treasury::TransactionService::ListParams::Created, Integer), ending_before: String, expand: T::Array[String], financial_account: String, limit: Integer, order_by: String, starting_after: String, status: String, status_transitions: ::Stripe::Treasury::TransactionService::ListParams::StatusTransitions).void + } + def initialize( + created: nil, + ending_before: nil, + expand: nil, + financial_account: nil, + limit: nil, + order_by: nil, + starting_after: nil, + status: nil, + status_transitions: nil + ); end + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + # Retrieves a list of Transaction objects. + sig { + params(params: T.any(::Stripe::Treasury::TransactionService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an existing Transaction. + sig { + params(id: String, params: T.any(::Stripe::Treasury::TransactionService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::Treasury::Transaction) + } + def retrieve(id, params = {}, opts = {}); end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/treasury_service.rbi b/rbi/stripe/services/treasury_service.rbi new file mode 100644 index 000000000..a2b1b048e --- /dev/null +++ b/rbi/stripe/services/treasury_service.rbi @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class TreasuryService < StripeService + attr_reader :credit_reversals + attr_reader :debit_reversals + attr_reader :financial_accounts + attr_reader :inbound_transfers + attr_reader :outbound_payments + attr_reader :outbound_transfers + attr_reader :received_credits + attr_reader :received_debits + attr_reader :transactions + attr_reader :transaction_entries + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v1_services.rbi b/rbi/stripe/services/v1_services.rbi new file mode 100644 index 000000000..0d583d902 --- /dev/null +++ b/rbi/stripe/services/v1_services.rbi @@ -0,0 +1,83 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class V1Services < StripeService + attr_reader :accounts + attr_reader :account_links + attr_reader :account_notices + attr_reader :account_sessions + attr_reader :apple_pay_domains + attr_reader :application_fees + attr_reader :apps + attr_reader :balance + attr_reader :balance_transactions + attr_reader :billing + attr_reader :billing_portal + attr_reader :capital + attr_reader :charges + attr_reader :checkout + attr_reader :climate + attr_reader :confirmation_tokens + attr_reader :test_helpers + attr_reader :country_specs + attr_reader :coupons + attr_reader :credit_notes + attr_reader :customers + attr_reader :customer_sessions + attr_reader :disputes + attr_reader :entitlements + attr_reader :ephemeral_keys + attr_reader :events + attr_reader :exchange_rates + attr_reader :files + attr_reader :file_links + attr_reader :financial_connections + attr_reader :forwarding + attr_reader :gift_cards + attr_reader :identity + attr_reader :invoices + attr_reader :invoice_rendering_templates + attr_reader :invoice_items + attr_reader :issuing + attr_reader :mandates + attr_reader :margins + attr_reader :orders + attr_reader :payment_attempt_records + attr_reader :payment_intents + attr_reader :payment_links + attr_reader :payment_methods + attr_reader :payment_method_configurations + attr_reader :payment_method_domains + attr_reader :payment_records + attr_reader :payouts + attr_reader :plans + attr_reader :prices + attr_reader :products + attr_reader :promotion_codes + attr_reader :quotes + attr_reader :radar + attr_reader :refunds + attr_reader :reporting + attr_reader :reviews + attr_reader :sigma + attr_reader :setup_attempts + attr_reader :setup_intents + attr_reader :shipping_rates + attr_reader :sources + attr_reader :subscriptions + attr_reader :subscription_items + attr_reader :subscription_schedules + attr_reader :tax + attr_reader :tax_codes + attr_reader :tax_ids + attr_reader :tax_rates + attr_reader :terminal + attr_reader :tokens + attr_reader :topups + attr_reader :transfers + attr_reader :treasury + attr_reader :webhook_endpoints + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi b/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi new file mode 100644 index 000000000..610cfbbb6 --- /dev/null +++ b/rbi/stripe/services/v2/billing/meter_event_adjustment_service.rbi @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Billing + class MeterEventAdjustmentService < StripeService + class CreateParams < Stripe::RequestParams + class Cancel < Stripe::RequestParams + # Unique identifier for the event. You can only cancel events within 24 hours of Stripe receiving them. + sig { returns(String) } + attr_accessor :identifier + sig { params(identifier: String).void } + def initialize(identifier: nil); end + end + # Specifies which event to cancel. + sig { returns(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel) } + attr_accessor :cancel + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # Specifies whether to cancel a single event or a range of events for a time period. Time period cancellation is not supported yet. + sig { returns(String) } + attr_accessor :type + sig { + params(cancel: ::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams::Cancel, event_name: String, type: String).void + } + def initialize(cancel: nil, event_name: nil, type: nil); end + end + # Creates a meter event adjustment to cancel a previously sent meter event. + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventAdjustmentService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventAdjustment) + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing/meter_event_service.rbi b/rbi/stripe/services/v2/billing/meter_event_service.rbi new file mode 100644 index 000000000..cb7fd62d1 --- /dev/null +++ b/rbi/stripe/services/v2/billing/meter_event_service.rbi @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Billing + class MeterEventService < StripeService + class CreateParams < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # A unique identifier for the event. If not provided, one will be generated. + # We recommend using a globally unique identifier for this. We’ll enforce + # uniqueness within a rolling 24 hour period. + sig { returns(String) } + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about + # the + # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } + attr_accessor :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(String) } + attr_accessor :timestamp + sig { + params(event_name: String, identifier: String, payload: T::Hash[String, String], timestamp: String).void + } + def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end + end + # Creates a meter event. Events are validated synchronously, but are processed asynchronously. Supports up to 1,000 events per second in livemode. For higher rate-limits, please use meter event streams instead. + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEvent) + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing/meter_event_session_service.rbi b/rbi/stripe/services/v2/billing/meter_event_session_service.rbi new file mode 100644 index 000000000..a0fdf5817 --- /dev/null +++ b/rbi/stripe/services/v2/billing/meter_event_session_service.rbi @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Billing + class MeterEventSessionService < StripeService + class CreateParams < Stripe::RequestParams + + end + # Creates a meter event session to send usage on the high-throughput meter event stream. Authentication tokens are only valid for 15 minutes, so you will need to create a new meter event session when your token expires. + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventSessionService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Billing::MeterEventSession) + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi b/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi new file mode 100644 index 000000000..c280c085c --- /dev/null +++ b/rbi/stripe/services/v2/billing/meter_event_stream_service.rbi @@ -0,0 +1,55 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Billing + class MeterEventStreamService < StripeService + class CreateParams < Stripe::RequestParams + class Event < Stripe::RequestParams + # The name of the meter event. Corresponds with the `event_name` field on a meter. + sig { returns(String) } + attr_accessor :event_name + # A unique identifier for the event. If not provided, one will be generated. + # We recommend using a globally unique identifier for this. We’ll enforce + # uniqueness within a rolling 24 hour period. + sig { returns(String) } + attr_accessor :identifier + # The payload of the event. This must contain the fields corresponding to a meter’s + # `customer_mapping.event_payload_key` (default is `stripe_customer_id`) and + # `value_settings.event_payload_key` (default is `value`). Read more about + # the + # [payload](https://docs.stripe.com/billing/subscriptions/usage-based/recording-usage#payload-key-overrides). + sig { returns(T::Hash[String, String]) } + attr_accessor :payload + # The time of the event. Must be within the past 35 calendar days or up to + # 5 minutes in the future. Defaults to current timestamp if not specified. + sig { returns(String) } + attr_accessor :timestamp + sig { + params(event_name: String, identifier: String, payload: T::Hash[String, String], timestamp: String).void + } + def initialize(event_name: nil, identifier: nil, payload: nil, timestamp: nil); end + end + # List of meter events to include in the request. + sig { + returns(T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]) + } + attr_accessor :events + sig { + params(events: T::Array[::Stripe::V2::Billing::MeterEventStreamService::CreateParams::Event]).void + } + def initialize(events: nil); end + end + # Creates meter events. Events are processed asynchronously, including validation. Requires a meter event session for authentication. Supports up to 10,000 requests per second in livemode. For even higher rate-limits, contact sales. + # + # ** raises TemporarySessionExpiredError + sig { + params(params: T.any(::Stripe::V2::Billing::MeterEventStreamService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).void + } + def create(params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/billing_service.rbi b/rbi/stripe/services/v2/billing_service.rbi new file mode 100644 index 000000000..a92403818 --- /dev/null +++ b/rbi/stripe/services/v2/billing_service.rbi @@ -0,0 +1,14 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + class BillingService < StripeService + attr_reader :meter_event_session + attr_reader :meter_event_adjustments + attr_reader :meter_event_stream + attr_reader :meter_events + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/core/event_destination_service.rbi b/rbi/stripe/services/v2/core/event_destination_service.rbi new file mode 100644 index 000000000..e3897c1f0 --- /dev/null +++ b/rbi/stripe/services/v2/core/event_destination_service.rbi @@ -0,0 +1,203 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class EventDestinationService < StripeService + class CreateParams < Stripe::RequestParams + class AmazonEventbridge < Stripe::RequestParams + # The AWS account ID. + sig { returns(String) } + attr_accessor :aws_account_id + # The region of the AWS event source. + sig { returns(String) } + attr_accessor :aws_region + sig { params(aws_account_id: String, aws_region: String).void } + def initialize(aws_account_id: nil, aws_region: nil); end + end + class WebhookEndpoint < Stripe::RequestParams + # The URL of the webhook endpoint. + sig { returns(String) } + attr_accessor :url + sig { params(url: String).void } + def initialize(url: nil); end + end + # An optional description of what the event destination is used for. + sig { returns(String) } + attr_accessor :description + # The list of events to enable for this endpoint. + sig { returns(T::Array[String]) } + attr_accessor :enabled_events + # Payload type of events being subscribed to. + sig { returns(String) } + attr_accessor :event_payload + # Where events should be routed from. + sig { returns(T::Array[String]) } + attr_accessor :events_from + # Additional fields to include in the response. + sig { returns(T::Array[String]) } + attr_accessor :include + # Metadata. + sig { returns(T::Hash[String, String]) } + attr_accessor :metadata + # Event destination name. + sig { returns(String) } + attr_accessor :name + # If using the snapshot event payload, the API version events are rendered as. + sig { returns(String) } + attr_accessor :snapshot_api_version + # Event destination type. + sig { returns(String) } + attr_accessor :type + # Amazon EventBridge configuration. + sig { + returns(::Stripe::V2::Core::EventDestinationService::CreateParams::AmazonEventbridge) + } + attr_accessor :amazon_eventbridge + # Webhook endpoint configuration. + sig { + returns(::Stripe::V2::Core::EventDestinationService::CreateParams::WebhookEndpoint) + } + attr_accessor :webhook_endpoint + sig { + params(description: String, enabled_events: T::Array[String], event_payload: String, events_from: T::Array[String], include: T::Array[String], metadata: T::Hash[String, String], name: String, snapshot_api_version: String, type: String, amazon_eventbridge: ::Stripe::V2::Core::EventDestinationService::CreateParams::AmazonEventbridge, webhook_endpoint: ::Stripe::V2::Core::EventDestinationService::CreateParams::WebhookEndpoint).void + } + def initialize( + description: nil, + enabled_events: nil, + event_payload: nil, + events_from: nil, + include: nil, + metadata: nil, + name: nil, + snapshot_api_version: nil, + type: nil, + amazon_eventbridge: nil, + webhook_endpoint: nil + ); end + end + class DeleteParams < Stripe::RequestParams + + end + class DisableParams < Stripe::RequestParams + + end + class EnableParams < Stripe::RequestParams + + end + class ListParams < Stripe::RequestParams + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + sig { returns(T::Array[String]) } + attr_accessor :include + # The page size. + sig { returns(Integer) } + attr_accessor :limit + # The requested page. + sig { returns(String) } + attr_accessor :page + sig { params(include: T::Array[String], limit: Integer, page: String).void } + def initialize(include: nil, limit: nil, page: nil); end + end + class PingParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Additional fields to include in the response. + sig { returns(T::Array[String]) } + attr_accessor :include + sig { params(include: T::Array[String]).void } + def initialize(include: nil); end + end + class UpdateParams < Stripe::RequestParams + class WebhookEndpoint < Stripe::RequestParams + # The URL of the webhook endpoint. + sig { returns(String) } + attr_accessor :url + sig { params(url: String).void } + def initialize(url: nil); end + end + # An optional description of what the event destination is used for. + sig { returns(String) } + attr_accessor :description + # The list of events to enable for this endpoint. + sig { returns(T::Array[String]) } + attr_accessor :enabled_events + # Additional fields to include in the response. Currently supports `webhook_endpoint.url`. + sig { returns(T::Array[String]) } + attr_accessor :include + # Metadata. + sig { returns(T::Hash[String, T.nilable(String)]) } + attr_accessor :metadata + # Event destination name. + sig { returns(String) } + attr_accessor :name + # Webhook endpoint configuration. + sig { + returns(::Stripe::V2::Core::EventDestinationService::UpdateParams::WebhookEndpoint) + } + attr_accessor :webhook_endpoint + sig { + params(description: String, enabled_events: T::Array[String], include: T::Array[String], metadata: T::Hash[String, T.nilable(String)], name: String, webhook_endpoint: ::Stripe::V2::Core::EventDestinationService::UpdateParams::WebhookEndpoint).void + } + def initialize( + description: nil, + enabled_events: nil, + include: nil, + metadata: nil, + name: nil, + webhook_endpoint: nil + ); end + end + # Create a new event destination. + sig { + params(params: T.any(::Stripe::V2::Core::EventDestinationService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) + } + def create(params = {}, opts = {}); end + + # Delete an event destination. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) + } + def delete(id, params = {}, opts = {}); end + + # Disable an event destination. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::DisableParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) + } + def disable(id, params = {}, opts = {}); end + + # Enable an event destination. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::EnableParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) + } + def enable(id, params = {}, opts = {}); end + + # Lists all event destinations. + sig { + params(params: T.any(::Stripe::V2::Core::EventDestinationService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) + } + def list(params = {}, opts = {}); end + + # Send a `ping` event to an event destination. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::PingParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Event) + } + def ping(id, params = {}, opts = {}); end + + # Retrieves the details of an event destination. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) + } + def retrieve(id, params = {}, opts = {}); end + + # Update the details of an event destination. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventDestinationService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::EventDestination) + } + def update(id, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/core/event_service.rbi b/rbi/stripe/services/v2/core/event_service.rbi new file mode 100644 index 000000000..4df567af5 --- /dev/null +++ b/rbi/stripe/services/v2/core/event_service.rbi @@ -0,0 +1,39 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + module Core + class EventService < StripeService + class ListParams < Stripe::RequestParams + # The page size. + sig { returns(Integer) } + attr_accessor :limit + # Primary object ID used to retrieve related events. + sig { returns(String) } + attr_accessor :object_id + # The requested page. + sig { returns(String) } + attr_accessor :page + sig { params(limit: Integer, object_id: String, page: String).void } + def initialize(limit: nil, object_id: nil, page: nil); end + end + class RetrieveParams < Stripe::RequestParams + + end + # List events, going back up to 30 days. + sig { + params(params: T.any(::Stripe::V2::Core::EventService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the details of an event. + sig { + params(id: String, params: T.any(::Stripe::V2::Core::EventService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::V2::Event) + } + def retrieve(id, params = {}, opts = {}); end + end + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2/core_service.rbi b/rbi/stripe/services/v2/core_service.rbi new file mode 100644 index 000000000..483968747 --- /dev/null +++ b/rbi/stripe/services/v2/core_service.rbi @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + module V2 + class CoreService < StripeService + attr_reader :event_destinations + attr_reader :events + end + end +end \ No newline at end of file diff --git a/rbi/stripe/services/v2_services.rbi b/rbi/stripe/services/v2_services.rbi new file mode 100644 index 000000000..4f9448fce --- /dev/null +++ b/rbi/stripe/services/v2_services.rbi @@ -0,0 +1,10 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class V2Services < StripeService + attr_reader :billing + attr_reader :core + end +end \ No newline at end of file diff --git a/rbi/stripe/services/webhook_endpoint_service.rbi b/rbi/stripe/services/webhook_endpoint_service.rbi new file mode 100644 index 000000000..5edb15671 --- /dev/null +++ b/rbi/stripe/services/webhook_endpoint_service.rbi @@ -0,0 +1,131 @@ +# File generated from our OpenAPI spec +# frozen_string_literal: true + +# typed: true +module Stripe + class WebhookEndpointService < StripeService + class DeleteParams < Stripe::RequestParams + + end + class RetrieveParams < Stripe::RequestParams + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + sig { params(expand: T::Array[String]).void } + def initialize(expand: nil); end + end + class UpdateParams < Stripe::RequestParams + # An optional description of what the webhook is used for. + sig { returns(T.nilable(String)) } + attr_accessor :description + # Disable the webhook endpoint if set to true. + sig { returns(T::Boolean) } + attr_accessor :disabled + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + sig { returns(T::Array[String]) } + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The URL of the webhook endpoint. + sig { returns(String) } + attr_accessor :url + sig { + params(description: T.nilable(String), disabled: T::Boolean, enabled_events: T::Array[String], expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), url: String).void + } + def initialize( + description: nil, + disabled: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ); end + end + class ListParams < Stripe::RequestParams + # A cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list. + sig { returns(String) } + attr_accessor :ending_before + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10. + sig { returns(Integer) } + attr_accessor :limit + # A cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list. + sig { returns(String) } + attr_accessor :starting_after + sig { + params(ending_before: String, expand: T::Array[String], limit: Integer, starting_after: String).void + } + def initialize(ending_before: nil, expand: nil, limit: nil, starting_after: nil); end + end + class CreateParams < Stripe::RequestParams + # Events sent to this endpoint will be generated with this Stripe Version instead of your account's default Stripe Version. + sig { returns(String) } + attr_accessor :api_version + # Whether this endpoint should receive events from connected accounts (`true`), or from your account (`false`). Defaults to `false`. + sig { returns(T::Boolean) } + attr_accessor :connect + # An optional description of what the webhook is used for. + sig { returns(T.nilable(String)) } + attr_accessor :description + # The list of events to enable for this endpoint. You may specify `['*']` to enable all events, except those that require explicit selection. + sig { returns(T::Array[String]) } + attr_accessor :enabled_events + # Specifies which fields in the response should be expanded. + sig { returns(T::Array[String]) } + attr_accessor :expand + # Set of [key-value pairs](https://stripe.com/docs/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`. + sig { returns(T.nilable(T::Hash[String, String])) } + attr_accessor :metadata + # The URL of the webhook endpoint. + sig { returns(String) } + attr_accessor :url + sig { + params(api_version: String, connect: T::Boolean, description: T.nilable(String), enabled_events: T::Array[String], expand: T::Array[String], metadata: T.nilable(T::Hash[String, String]), url: String).void + } + def initialize( + api_version: nil, + connect: nil, + description: nil, + enabled_events: nil, + expand: nil, + metadata: nil, + url: nil + ); end + end + # A webhook endpoint must have a url and a list of enabled_events. You may optionally specify the Boolean connect parameter. If set to true, then a Connect webhook endpoint that notifies the specified url about events from all connected accounts is created; otherwise an account webhook endpoint that notifies the specified url only about events from your account is created. You can also create webhook endpoints in the [webhooks settings](https://dashboard.stripe.com/account/webhooks) section of the Dashboard. + sig { + params(params: T.any(::Stripe::WebhookEndpointService::CreateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def create(params = {}, opts = {}); end + + # You can also delete webhook endpoints via the [webhook endpoint management](https://dashboard.stripe.com/account/webhooks) page of the Stripe dashboard. + sig { + params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpointService::DeleteParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def delete(webhook_endpoint, params = {}, opts = {}); end + + # Returns a list of your webhook endpoints. + sig { + params(params: T.any(::Stripe::WebhookEndpointService::ListParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::ListObject) + } + def list(params = {}, opts = {}); end + + # Retrieves the webhook endpoint with the given ID. + sig { + params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpointService::RetrieveParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def retrieve(webhook_endpoint, params = {}, opts = {}); end + + # Updates the webhook endpoint. You may edit the url, the list of enabled_events, and the status of your endpoint. + sig { + params(webhook_endpoint: String, params: T.any(::Stripe::WebhookEndpointService::UpdateParams, T::Hash[T.untyped, T.untyped]), opts: T.untyped).returns(Stripe::WebhookEndpoint) + } + def update(webhook_endpoint, params = {}, opts = {}); end + end +end \ No newline at end of file diff --git a/test/stripe/request_params_test.rb b/test/stripe/request_params_test.rb index 7d68ef24e..3f4b1aeb1 100644 --- a/test/stripe/request_params_test.rb +++ b/test/stripe/request_params_test.rb @@ -7,8 +7,19 @@ class RequestOptionsTest < Test::Unit::TestCase class FooCreateParams < Stripe::RequestParams attr_accessor :fun, :team + def initialize(fun: nil, team: nil) + super + @fun = fun + @team = team + end + class Fun < Stripe::RequestParams attr_accessor :games + + def initialize(games: nil) + super + @games = games + end end end